Sighthound scan flagged 158 findings (120 actionable outside test/testdata paths). Top 5 highest-severity findings selected for triage — note these are largely exec.Command(..., argsSlice...) calls flagged as low-confidence "Command Injection" (likely false positives since args are passed as a slice, not shell-interpreted), but worth a quick review:
-
pkg/workflow/pip_validation.go:230 — Severity: Critical, Confidence: Low
exec.Command(uvPath, "pip", "show", pkgName, "--no-cache")
Remediation: Confirm pkgName is validated/allow-listed before use; args are passed as a fixed slice (no shell), so risk is low if pkgName can't inject additional flags maliciously. Add explicit validation/tests if not already present.
-
pkg/workflow/pip_validation.go:88 — Severity: Critical, Confidence: Low
exec.Command(pipPath, "index", "versions", pkgName, "--pre")
Remediation: Same as above — verify pkgName sanitization/allow-list prior to invocation.
-
pkg/workflow/dependabot_manifests.go:282 — Severity: Critical, Confidence: Low
exec.Command(npmPath, "install", "--package-lock-only", "--ignore-scripts")
Remediation: Confirm working directory/manifest inputs are trusted; --ignore-scripts is a good mitigation already present.
-
pkg/cli/grype.go:336 — Severity: Critical, Confidence: Low
exec.Command(dockerPath, dockerArgs...)
Remediation: Verify dockerArgs (e.g., image refs) are validated/escaped before being placed in the slice; confirm no shell interpolation occurs downstream.
-
pkg/cli/upgrade_command.go:507 — Severity: Critical, Confidence: Low
exec.Command(exe, newArgs...)
Remediation: Confirm exe and newArgs originate from trusted, validated sources (not directly from user/network input) before re-exec.
All flagged calls use exec.Command with argument slices (not sh -c string concatenation), which mitigates classic shell injection. Recommend a manual review of each pkgName/dockerArgs/newArgs source to confirm inputs are validated/allow-listed, and closing as false-positive or hardening with explicit input validation where gaps are found.
Generated by 🛡️ Sighthound Security Scan · auto · 17.8 AIC · ⌖ 5.87 AIC · ⊞ 8.3K · ◷
Sighthound scan flagged 158 findings (120 actionable outside test/testdata paths). Top 5 highest-severity findings selected for triage — note these are largely
exec.Command(..., argsSlice...)calls flagged as low-confidence "Command Injection" (likely false positives since args are passed as a slice, not shell-interpreted), but worth a quick review:pkg/workflow/pip_validation.go:230— Severity: Critical, Confidence: Lowexec.Command(uvPath, "pip", "show", pkgName, "--no-cache")Remediation: Confirm
pkgNameis validated/allow-listed before use; args are passed as a fixed slice (no shell), so risk is low ifpkgNamecan't inject additional flags maliciously. Add explicit validation/tests if not already present.pkg/workflow/pip_validation.go:88— Severity: Critical, Confidence: Lowexec.Command(pipPath, "index", "versions", pkgName, "--pre")Remediation: Same as above — verify
pkgNamesanitization/allow-list prior to invocation.pkg/workflow/dependabot_manifests.go:282— Severity: Critical, Confidence: Lowexec.Command(npmPath, "install", "--package-lock-only", "--ignore-scripts")Remediation: Confirm working directory/manifest inputs are trusted;
--ignore-scriptsis a good mitigation already present.pkg/cli/grype.go:336— Severity: Critical, Confidence: Lowexec.Command(dockerPath, dockerArgs...)Remediation: Verify
dockerArgs(e.g., image refs) are validated/escaped before being placed in the slice; confirm no shell interpolation occurs downstream.pkg/cli/upgrade_command.go:507— Severity: Critical, Confidence: Lowexec.Command(exe, newArgs...)Remediation: Confirm
exeandnewArgsoriginate from trusted, validated sources (not directly from user/network input) before re-exec.All flagged calls use
exec.Commandwith argument slices (notsh -cstring concatenation), which mitigates classic shell injection. Recommend a manual review of eachpkgName/dockerArgs/newArgssource to confirm inputs are validated/allow-listed, and closing as false-positive or hardening with explicit input validation where gaps are found.