Skip to content

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

Description

@github-actions

Sighthound scanned github/gh-aw and found 172 potential issues (130 outside test/testdata). Below are the top 5 highest-severity findings (all "Critical" / Command Injection) selected from actionable.json.

1. pkg/workflow/pip_validation.go:239

  • Severity: Critical — Command Injection
  • Snippet: exec.Command(uvPath, "pip", "show", pkgName, "--no-cache")
  • Remediation: Validate/allowlist pkgName before use (e.g. restrict to a strict package-name regex) even though exec.Command already avoids a shell; confirm no untrusted data reaches uvPath or flags either.

2. pkg/workflow/pip_validation.go:88

  • Severity: Critical — Command Injection
  • Snippet: exec.Command(pipPath, "index", "versions", pkgName, "--pre")
  • Remediation: Same as above — validate pkgName against a strict allowlist/regex before passing to exec.Command, and ensure pipPath resolution isn't influenced by untrusted input.

3. pkg/workflow/dependabot_manifests.go:282

  • Severity: Critical — Command Injection
  • Snippet: exec.Command(npmPath, "install", "--package-lock-only", "--ignore-scripts")
  • Remediation: Confirm npmPath and working directory are derived from trusted, validated sources; add explicit checks that no manifest-derived values are interpolated into the command.

4. pkg/cli/grype.go:366

  • Severity: Critical — Command Injection
  • Snippet: exec.Command(dockerPath, dockerArgs...)
  • Remediation: Audit how dockerArgs is constructed — ensure each element is built from a fixed slice of validated values, not concatenated/interpolated from untrusted input (e.g. image names, scan targets).

5. pkg/cli/zizmor.go:193

  • Severity: Critical — Command Injection
  • Snippet: exec.Command(dockerPath, dockerArgs...)
  • Remediation: Same as above — verify dockerArgs elements are constructed safely and validated, with no shell interpretation or unsanitized user/workflow-controlled input.

General guidance for all findings: avoid sh -c/shell string concatenation, always pass arguments as a fixed []string slice to exec.Command, and validate any dynamic values (package names, file paths, docker args) against strict allowlists before use.

Full scan details are available in the workflow run artifacts (Sighthound scan, run ID 33050719353).

Generated by 🛡️ Sighthound Security Scan · copilot · auto · 11.8 AIC · ⌖ 8.38 AIC · ⊞ 6.9K ·

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions