Sighthound scanned github/gh-aw and identified 153 findings (36 Critical, 13 High, 72 Medium after filtering). Below are the 5 highest-severity findings (all Critical, High confidence), all flagged as potential Command Injection due to command arguments built from dynamic/untrusted data.
1. pkg/workflow/pip_validation.go:192
- Severity: Critical | Confidence: High
- Snippet:
exec.Command(uvPath, "pip", "show", pkgName, "--no-cache")
- Remediation:
pkgName originates from package spec parsing; ensure it is validated/allow-listed before being passed to exec.Command args (already avoids sh -c, but confirm pkgName cannot contain shell metacharacters or unexpected flags, e.g. reject values starting with -).
2. pkg/workflow/pip_validation.go:85
- Severity: Critical | Confidence: High
- Snippet:
exec.Command(pipPath, "index", "versions", pkgName, "--pre")
- Remediation: Same as above — validate
pkgName strictly (e.g. against PEP 508 package name regex) before use as a command argument to prevent argument injection.
3. pkg/workflow/dependabot.go:342
- Severity: Critical | Confidence: High
- Snippet:
exec.Command(npmPath, "install", "--package-lock-only")
- Remediation: Confirm no dynamic/untrusted values are interpolated into this command's working directory or environment; add explicit validation of any user-controlled inputs feeding into this call path.
4. pkg/cli/poutine.go:229
- Severity: Critical | Confidence: High
- Snippet:
exec.Command(dockerPath, "run", "--rm", "-v", volumeMount, "-w", "/workdir", PoutineImage, "analyze_local", ".", "--format", "json", "--quiet")
- Remediation: Ensure
volumeMount (derived from a local path) is canonicalized and validated to prevent path traversal or injection of extra Docker flags; consider using filepath.Clean/allow-listing before building the mount spec.
5. pkg/cli/poutine.go:109
General guidance: For all of the above, ensure inputs are validated/allow-listed (not derived from unsanitized external content), continue avoiding sh -c string concatenation, and pass arguments as a fixed slice (already done in these cases) — the main residual risk is unvalidated content of individual arguments (package names, paths) rather than shell injection.
See full findings in the Sighthound scan summary for the remaining 148 items (13 High, 72 Medium) not included here for brevity.
Generated by 🛡️ Sighthound Security Scan · auto · 18.7 AIC · ⌖ 2.22 AIC · ⊞ 7.7K · ◷
Sighthound scanned github/gh-aw and identified 153 findings (36 Critical, 13 High, 72 Medium after filtering). Below are the 5 highest-severity findings (all Critical, High confidence), all flagged as potential Command Injection due to command arguments built from dynamic/untrusted data.
1.
pkg/workflow/pip_validation.go:192exec.Command(uvPath, "pip", "show", pkgName, "--no-cache")pkgNameoriginates from package spec parsing; ensure it is validated/allow-listed before being passed toexec.Commandargs (already avoidssh -c, but confirmpkgNamecannot contain shell metacharacters or unexpected flags, e.g. reject values starting with-).2.
pkg/workflow/pip_validation.go:85exec.Command(pipPath, "index", "versions", pkgName, "--pre")pkgNamestrictly (e.g. against PEP 508 package name regex) before use as a command argument to prevent argument injection.3.
pkg/workflow/dependabot.go:342exec.Command(npmPath, "install", "--package-lock-only")4.
pkg/cli/poutine.go:229exec.Command(dockerPath, "run", "--rm", "-v", volumeMount, "-w", "/workdir", PoutineImage, "analyze_local", ".", "--format", "json", "--quiet")volumeMount(derived from a local path) is canonicalized and validated to prevent path traversal or injection of extra Docker flags; consider usingfilepath.Clean/allow-listing before building the mount spec.5.
pkg/cli/poutine.go:109dockerPath run ... -v volumeMount ...)volumeMountbefore constructing the Docker command.General guidance: For all of the above, ensure inputs are validated/allow-listed (not derived from unsanitized external content), continue avoiding
sh -cstring concatenation, and pass arguments as a fixed slice (already done in these cases) — the main residual risk is unvalidated content of individual arguments (package names, paths) rather than shell injection.See full findings in the Sighthound scan summary for the remaining 148 items (13 High, 72 Medium) not included here for brevity.