Sighthound scan found 158 total findings, 120 actionable (outside test/testdata). Top 5 highest-severity findings (all Critical/High confidence, "Command Injection" pattern from exec.Command using pkgName/argument variables built from potentially dynamic data):
-
pkg/workflow/pip_validation.go:225 — exec.Command(uvPath, "pip", "show", pkgName, "--no-cache"). Remediation: ensure pkgName is validated against a strict allowlist pattern (e.g. PyPI package name regex) before use; never pass through shell interpolation; confirm args stay as a fixed slice (already true here) — the flag is likely due to pkgName originating from external config/frontmatter.
-
pkg/workflow/pip_validation.go:83 — exec.Command(pipPath, "index", "versions", pkgName, "--pre"). Remediation: validate pkgName against PyPI naming rules prior to invocation; same as above.
-
pkg/workflow/dependabot_manifests.go:263 — exec.Command(npmPath, "install", "--package-lock-only", "--ignore-scripts"). Remediation: verify working directory/manifest inputs are sanitized; confirm --ignore-scripts is always present (good practice) and that no untrusted path/args are concatenated.
-
pkg/cli/grype.go:336 — exec.Command(dockerPath, dockerArgs...). Remediation: audit construction of dockerArgs to ensure no unsanitized user-controlled strings (image names, tags) reach the slice; validate against expected formats.
-
pkg/cli/upgrade_command.go:507 — exec.Command(exe, newArgs...). Remediation: confirm exe and newArgs are derived only from trusted, internally-generated values (not user input) before re-exec.
General guidance: all flagged as "Command Injection" due to dynamic arguments passed to exec.Command. Since these use exec.Command (not sh -c), risk is present only if individual argument values are attacker-controlled without validation. Recommend auditing the upstream source of pkgName, dockerArgs, and newArgs in each case and adding explicit input validation/allowlisting where the values originate from external or less-trusted sources.
Full details: 158 findings scanned, 120 actionable; see workflow run for complete actionable.json.
Generated by 🛡️ Sighthound Security Scan · auto · 17.7 AIC · ⌖ 5.1 AIC · ⊞ 8.3K · ◷
Sighthound scan found 158 total findings, 120 actionable (outside test/testdata). Top 5 highest-severity findings (all Critical/High confidence, "Command Injection" pattern from
exec.CommandusingpkgName/argument variables built from potentially dynamic data):pkg/workflow/pip_validation.go:225—exec.Command(uvPath, "pip", "show", pkgName, "--no-cache"). Remediation: ensurepkgNameis validated against a strict allowlist pattern (e.g. PyPI package name regex) before use; never pass through shell interpolation; confirm args stay as a fixed slice (already true here) — the flag is likely due topkgNameoriginating from external config/frontmatter.pkg/workflow/pip_validation.go:83—exec.Command(pipPath, "index", "versions", pkgName, "--pre"). Remediation: validatepkgNameagainst PyPI naming rules prior to invocation; same as above.pkg/workflow/dependabot_manifests.go:263—exec.Command(npmPath, "install", "--package-lock-only", "--ignore-scripts"). Remediation: verify working directory/manifest inputs are sanitized; confirm--ignore-scriptsis always present (good practice) and that no untrusted path/args are concatenated.pkg/cli/grype.go:336—exec.Command(dockerPath, dockerArgs...). Remediation: audit construction ofdockerArgsto ensure no unsanitized user-controlled strings (image names, tags) reach the slice; validate against expected formats.pkg/cli/upgrade_command.go:507—exec.Command(exe, newArgs...). Remediation: confirmexeandnewArgsare derived only from trusted, internally-generated values (not user input) before re-exec.General guidance: all flagged as "Command Injection" due to dynamic arguments passed to
exec.Command. Since these useexec.Command(notsh -c), risk is present only if individual argument values are attacker-controlled without validation. Recommend auditing the upstream source ofpkgName,dockerArgs, andnewArgsin each case and adding explicit input validation/allowlisting where the values originate from external or less-trusted sources.Full details: 158 findings scanned, 120 actionable; see workflow run for complete
actionable.json.