Skip to content

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

Description

@github-actions

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):

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

  2. pkg/workflow/pip_validation.go:83exec.Command(pipPath, "index", "versions", pkgName, "--pre"). Remediation: validate pkgName against PyPI naming rules prior to invocation; same as above.

  3. pkg/workflow/dependabot_manifests.go:263exec.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.

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

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

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