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.py executes the git binary using the list-based subprocess.run method. 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. The cwd argument is safely resolved using Path.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 (via git diff output of repository files).
  • Boundary markers: None; the skill returns raw unified diff text to the agent context.
  • Capability inventory: subprocess.run calls within scripts/git_diff.py to interact with the git binary.
  • Sanitization: None; the tool is designed to return the exact repository state as requested.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 8, 2026, 03:37 AM
Security Audit — agent-trust-hub — git-diff