Skip to content

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

Description

@github-actions

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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 ·

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