git-diff
Pass
Audited by Gen Agent Trust Hub on Sep 8, 2026
Risk Level: SAFE
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/git_diff.pyexecutes thegitbinary using the list-basedsubprocess.runmethod. This avoids shell interpolation and protects against command injection vulnerabilities. - [DYNAMIC_EXECUTION]: Command arguments are selected from a hardcoded allowlist (
_VALID_MODES) based on the user-provided mode, ensuring no arbitrary flags can be passed to git. Thecwdargument is safely resolved usingPath.resolve()and validated as a directory before execution. - [INDIRECT_PROMPT_INJECTION]: The skill has a potential surface for indirect prompt injection because it ingests untrusted data from the repository being diffed.
- Ingestion points:
scripts/git_diff.py(viagit diffoutput of repository files). - Boundary markers: None; the skill returns raw unified diff text to the agent context.
- Capability inventory:
subprocess.runcalls withinscripts/git_diff.pyto interact with the git binary. - Sanitization: None; the tool is designed to return the exact repository state as requested.
Audit Metadata