Skip to content

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

Description

@github-actions

Sighthound Security Scan Findings

Top 5 findings (all Critical severity, CWE-78 Command Injection) from the latest Sighthound scan.

1. Command Injection — pkg/gitutil/gitutil.go:176

Severity: Critical | Confidence: High
Snippet: exec.Command("git", "-C", gitRoot, "show", "HEAD:"+relPath)
Function: ReadFileFromHEAD
Remediation: relPath is concatenated into a git argument. Validate/sanitize relPath or use -- separator. Ensure it originates from trusted input only.

2. Command Injection — pkg/workflow/dependabot.go:339

Severity: Critical | Confidence: High
Snippet: exec.Command(npmPath, "install", "--package-lock-only")
Remediation: npmPath is derived dynamically. Validate it is an absolute path within expected system directories.

3. Command Injection — pkg/workflow/pip_validation.go:80

Severity: Critical | Confidence: High
Snippet: exec.Command(pipCmd, "index", "versions", pkgName, "--pre")
Remediation: pkgName may come from user/workflow input. Validate against a strict allowlist (alphanumeric, -, _, .) before use.

4. Command Injection — pkg/cli/upgrade_command.go:482

Severity: Critical | Confidence: High
Snippet: exec.Command(exe, newArgs...)
Function: relaunchWithSameArgs
Remediation: Validate exe is an absolute, trusted path; restrict newArgs to prevent injection of unexpected flags.

5. Command Injection — pkg/cli/runner_guard.go:68-78

Severity: Critical | Confidence: High
Snippet: exec.Command("docker", "run", ..., gitRoot+":/workdir", ..., scanPath)
Function: runRunnerGuardOnDirectory
Remediation: Validate gitRoot and scanPath are absolute paths without shell metacharacters; use filepath.Clean and assert within an expected base directory.


Scan root: /tmp/gh-aw/sighthound/repo | Total findings: 134 | Shown: top 5 actionable (non-test)

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • awmgmcpg

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "awmgmcpg"

See Network Configuration for more information.

Generated by 🛡️ Sighthound Security Scan · sonnet46 12.3 AIC · ⌖ 4.66 AIC · ⊞ 4.4K ·

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions