Summary
Sighthound identified critical CWE-78 Command Injection findings in two pkg/cli/ files. These are Tier C — Restricted Pending Review under the UK AI Open Code Governance assessment.
Findings
1. pkg/cli/upgrade_command.go:482 — relaunchWithSameArgs
newArgs := append(append([]string(nil), os.Args[1:]...), extraFlag)
exe, _ := os.Executable()
cmd := exec.Command(exe, newArgs...)
exe comes from os.Executable() (safe), but newArgs derives from os.Args[1:] which may be attacker-influenced in some execution contexts. The Sighthound finding flags dynamic data in newArgs.
Remediation: Constrain newArgs explicitly — only pass known-safe flags rather than forwarding raw os.Args. Add a validation allowlist for permitted arguments.
2. pkg/cli/runner_guard.go:68 — Docker volume mount with scanPath
// #nosec G204 -- gitRoot comes from git rev-parse (trusted source) and is validated as absolute path.
cmd := exec.Command("docker", "run", "--rm", "-v", gitRoot+":/workdir", "-w", "/workdir", RunnerGuardImage, "scan", scanPath, ...)
The #nosec G204 annotation covers gitRoot but scanPath may be derived from user-supplied relative directory paths. A crafted scanPath containing : or path separators could alter the Docker volume mount syntax.
Remediation: Explicitly validate scanPath as a clean relative path (no :, no ..). Consider filepath.Clean + a character allowlist before interpolation.
Risk Scoring (UK AI Governance)
| Dimension |
Score |
| Exposure amplification (AI-authored exec paths) |
4/5 |
| Patchability |
2/5 |
| Detectability |
3/5 |
| Operational fragility |
4/5 |
| Ownership confidence |
3/5 |
| Overall |
3.2 — Tier C |
SLA
High — resolve within 7 days.
Discussion
Full governance report: [uk-ai-resilience] Risk & Resilience Governance Report — 2026-07-20
References
Generated by UK AI Operational Resilience · 100.9 AIC · ⌖ 5.86 AIC · ⊞ 5.2K · ◷
Summary
Sighthound identified critical CWE-78 Command Injection findings in two
pkg/cli/files. These are Tier C — Restricted Pending Review under the UK AI Open Code Governance assessment.Findings
1.
pkg/cli/upgrade_command.go:482—relaunchWithSameArgsexecomes fromos.Executable()(safe), butnewArgsderives fromos.Args[1:]which may be attacker-influenced in some execution contexts. The Sighthound finding flags dynamic data innewArgs.Remediation: Constrain
newArgsexplicitly — only pass known-safe flags rather than forwarding raw os.Args. Add a validation allowlist for permitted arguments.2.
pkg/cli/runner_guard.go:68— Docker volume mount withscanPathThe
#nosec G204annotation coversgitRootbutscanPathmay be derived from user-supplied relative directory paths. A craftedscanPathcontaining:or path separators could alter the Docker volume mount syntax.Remediation: Explicitly validate
scanPathas a clean relative path (no:, no..). Considerfilepath.Clean+ a character allowlist before interpolation.Risk Scoring (UK AI Governance)
SLA
High — resolve within 7 days.
Discussion
Full governance report: [uk-ai-resilience] Risk & Resilience Governance Report — 2026-07-20
References