fix: enforce classified Git admission paths (#2150) (#2181)

This commit is contained in:
Carlos Florêncio
2026-08-03 11:04:34 +01:00
committed by GitHub
parent 069cc99e10
commit 431e5d40fe
71 changed files with 3130 additions and 357 deletions
+3 -2
View File
@@ -13,6 +13,7 @@ import (
"runtime"
"strings"
"github.com/kandev/kandev/internal/common/subproc"
"github.com/kandev/kandev/internal/githubauth"
)
@@ -118,8 +119,8 @@ func resolveGitHubCLIRepository(
if raw = strings.TrimSpace(getenv("GH_REPO")); raw != "" {
return parseGitHubCLIRepository(raw, defaultHost)
}
cmd := exec.CommandContext(ctx, "git", "remote", "get-url", "origin")
output, err := cmd.Output()
cmd := subproc.NewGitCommand(ctx, "remote", "get-url", "origin")
output, err := subproc.RunGitOutputClass(ctx, subproc.GitInteractive, cmd)
if err != nil {
return nil, nil
}