Sighthound scan flagged 121 actionable findings (154 total, excluding test/testdata). Top 5 by severity (all Critical, High confidence, "Command Injection"):
-
pkg/workflow/pip_validation.go:225 — exec.Command(uvPath, "pip", "show", pkgName, "--no-cache"). pkgName is passed as a discrete argv element (not via shell), which mitigates injection, but confirm pkgName is validated/allow-listed before use since it originates from potentially untrusted package metadata.
-
pkg/workflow/pip_validation.go:83 — exec.Command(pipPath, "index", "versions", pkgName, "--pre"). Same pattern as above; ensure pkgName is sanitized/validated against expected PyPI package name format prior to this call.
-
pkg/cli/dependabot.go:342 — exec.Command(npmPath, "install", "--package-lock-only"). Verify the working directory/package.json content used here is trusted, since npm install can execute lifecycle scripts from untrusted package.json.
-
pkg/cli/grype.go:244 — exec.Command(dockerPath, "run", "--rm", GrypeImage, validatedImageRef, "-o", "json"). Confirm validatedImageRef is strictly validated (e.g., against a regex for valid image refs) before being passed to docker run, to prevent flag injection or unexpected image references.
-
pkg/cli/experiments_command.go:738 — exec.Command("git", "show", ref+":"+fileName). String concatenation of ref and fileName into a single argument could allow crafted ref/fileName values to alter git's interpretation. Prefer passing ref and fileName as separate validated components, or validate both against expected formats before concatenation.
General remediation guidance: All flagged calls use exec.Command with argument slices (not sh -c), which avoids shell interpretation — a good baseline. However, each dynamic argument (package names, image refs, git refs/paths) should be validated against a strict allow-list or format regex before use, since these values may originate from external/untrusted sources (dependency manifests, user input, or workflow files). Add unit tests confirming rejection of malformed/malicious inputs (e.g., embedded --flag, path traversal, shell metacharacters) for each of these call sites.
Full details: see sighthound/actionable.json from this scan run (121 actionable findings total; only top 5 highest-severity shown here).
Generated by 🛡️ Sighthound Security Scan · auto · 17.4 AIC · ⌖ 2.68 AIC · ⊞ 7.8K · ◷
Sighthound scan flagged 121 actionable findings (154 total, excluding test/testdata). Top 5 by severity (all Critical, High confidence, "Command Injection"):
pkg/workflow/pip_validation.go:225 —
exec.Command(uvPath, "pip", "show", pkgName, "--no-cache").pkgNameis passed as a discrete argv element (not via shell), which mitigates injection, but confirmpkgNameis validated/allow-listed before use since it originates from potentially untrusted package metadata.pkg/workflow/pip_validation.go:83 —
exec.Command(pipPath, "index", "versions", pkgName, "--pre"). Same pattern as above; ensurepkgNameis sanitized/validated against expected PyPI package name format prior to this call.pkg/cli/dependabot.go:342 —
exec.Command(npmPath, "install", "--package-lock-only"). Verify the working directory/package.json content used here is trusted, since npm install can execute lifecycle scripts from untrusted package.json.pkg/cli/grype.go:244 —
exec.Command(dockerPath, "run", "--rm", GrypeImage, validatedImageRef, "-o", "json"). ConfirmvalidatedImageRefis strictly validated (e.g., against a regex for valid image refs) before being passed todocker run, to prevent flag injection or unexpected image references.pkg/cli/experiments_command.go:738 —
exec.Command("git", "show", ref+":"+fileName). String concatenation ofrefandfileNameinto a single argument could allow craftedref/fileNamevalues to alter git's interpretation. Prefer passingrefandfileNameas separate validated components, or validate both against expected formats before concatenation.General remediation guidance: All flagged calls use
exec.Commandwith argument slices (notsh -c), which avoids shell interpretation — a good baseline. However, each dynamic argument (package names, image refs, git refs/paths) should be validated against a strict allow-list or format regex before use, since these values may originate from external/untrusted sources (dependency manifests, user input, or workflow files). Add unit tests confirming rejection of malformed/malicious inputs (e.g., embedded--flag, path traversal, shell metacharacters) for each of these call sites.Full details: see
sighthound/actionable.jsonfrom this scan run (121 actionable findings total; only top 5 highest-severity shown here).