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
@@ -7,11 +7,13 @@ import (
"fmt"
"os"
"os/exec"
"github.com/kandev/kandev/internal/common/subproc"
)
// CommandContext creates a Git initialization command for platforms without inherited fd support.
func CommandContext(ctx context.Context, targetPath string, _ *os.File) (*exec.Cmd, error) {
command := exec.CommandContext(ctx, "git", "init", "--initial-branch=main")
command := subproc.NewGitCommand(ctx, "init", "--initial-branch=main")
command.Dir = targetPath
return command, nil
}