Skip to content

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

Description

@github-actions

Sighthound scan flagged 116 actionable findings; top 5 by severity (all Critical/High confidence, "Command Injection" pattern) below.

  1. pkg/cli/runner_guard.go:114exec.Command(dockerPath, "run", "--rm", "-v", volumeMount, ...). volumeMount appears built from dynamic/untrusted path data. Remediation: validate/sanitize the mount path, avoid shell interpolation, keep args as a fixed slice (already the case) but confirm volumeMount and containerScanPath are derived only from trusted, validated local paths.

  2. pkg/cli/grant.go:176exec.Command(dockerPath, "run", "--rm", "-v", volumeMount, GrantImage, "--config", containerPolicyPath, ..., imageRef). imageRef/volumeMount may originate from user/workflow input. Remediation: validate imageRef against an expected image-name pattern before use; ensure paths are canonicalized and confined to expected directories.

  3. pkg/cli/poutine.go:229exec.Command(dockerPath, "run", "--rm", "-v", volumeMount, "-w", "/workdir", "ghcr.io/boostsecurityio/poutine:latest", "analyze_local", ".", ...). Remediation: verify volumeMount is constructed from a sanitized, absolute repo path with no attacker-controlled segments.

  4. pkg/cli/poutine.go:109 — Same pattern/image as above (duplicate call site). Remediation: same as Add workflow: githubnext/agentics/weekly-research #3 — validate volumeMount construction.

  5. pkg/cli/upgrade_command.go:502exec.Command(exe, newArgs...). exe/newArgs may include dynamic values (e.g., from CLI re-exec/upgrade flow). Remediation: confirm exe resolves to a known trusted binary path (not attacker-influenced) and newArgs values are validated/allow-listed rather than passed through unchecked.

General guidance for all: avoid sh -c/shell string concatenation (already avoided via slice args), but ensure every dynamic value feeding into exec.Command arguments (paths, image refs, flags) is validated/allow-listed at the point of construction, since Sighthound flags these as High-confidence Command Injection risks due to untrusted data reaching exec.Command.

See /tmp/gh-aw/agent/sighthound/actionable.json for full details (148 total findings, 116 actionable outside test/testdata).

Generated by 🛡️ Sighthound Security Scan · auto · 17.3 AIC · ⌖ 3.26 AIC · ⊞ 7.6K ·

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