Skip to content

[sighthound] Security findings in github/gh-aw #52640

Description

@github-actions

Sighthound scan flagged 121 actionable findings (154 total, excluding test/testdata). Top 5 by severity (all Critical, High confidence, "Command Injection"):

  1. pkg/workflow/pip_validation.go:225exec.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.

  2. pkg/workflow/pip_validation.go:83exec.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.

  3. pkg/cli/dependabot.go:342exec.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.

  4. pkg/cli/grype.go:244exec.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.

  5. pkg/cli/experiments_command.go:738exec.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 ·

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions