Skip to content

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

Description

@github-actions

Summary

Sighthound security scan found 140 actionable findings (33 Critical, 12 High, 67 Medium). Below are the 5 highest-severity (Critical, CWE-78 Command Injection) findings for triage.

1. pkg/cli/runner_guard.go:94 — Command Injection (Critical, CWE-78)

exec.Command(dockerPath, "run", "--rm", "-v", volumeMount, "-w", "/workdir", RunnerGuardImage, "scan", containerScanPath, "--format", "json") in runRunnerGuardOnDirectory.

  • Remediation: Verify volumeMount/containerScanPath are constructed from validated/sanitized local paths only (not attacker-controlled input), avoid shell interpretation, and pass arguments as a fixed slice (already done) — confirm no untrusted string is concatenated into these path values.

2. pkg/cli/grant.go:159 — Command Injection (Critical, CWE-78)

exec.Command("docker", "run", "--rm", "-v", policyFile+":"+containerPolicyPath+":ro", GrantImage, "--config", containerPolicyPath, "--output", "json", "check", imageRef) in grantRunOnImage.

  • Remediation: Validate imageRef and policyFile do not contain shell metacharacters or path traversal sequences before use; ensure these values originate from trusted config, not user-supplied strings.

3. pkg/cli/poutine.go:201 — Command Injection (Critical, CWE-78)

exec.Command("docker", "run", "--rm", "-v", gitRoot+":/workdir", ...) in runPoutineOnFile.

  • Remediation: Confirm gitRoot is derived from a trusted, resolved local path (not user input) prior to use in the volume mount argument.

4. pkg/cli/poutine.go:100 — Command Injection (Critical, CWE-78)

Same pattern as above in runPoutineOnDirectory.

5. pkg/cli/upgrade_command.go:496 — Command Injection (Critical, CWE-78)

exec.Command(exe, newArgs...) in relaunchWithSameArgs.

  • Remediation: Ensure exe (self-executable path) and newArgs (relaunch arguments) are derived only from the current process's own os.Args/os.Executable(), not from external/untrusted sources, to prevent argument injection during self-relaunch.

Findings sourced from actionable.json (Sighthound scan). Confidence: High for all listed items. See full report for remaining Critical/High/Medium findings.

Generated by 🛡️ Sighthound Security Scan · auto · 18 AIC · ⌖ 4.67 AIC · ⊞ 7.5K ·

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions