git-guardrails-claude-code
Pass
Audited by Gen Agent Trust Hub on Aug 29, 2026
Risk Level: SAFEPERSISTENCECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [PERSISTENCE]: The skill modifies project-level or global configuration files (
.claude/settings.json) to install aPreToolUsehook. This configuration ensures that the safety filter remains active across subsequent agent sessions.\n- [COMMAND_EXECUTION]: The skill requires setting executable permissions on a bash script (chmod +x) and configuring the agent to execute this script as part of its tool-use lifecycle. The script uses standard system utilities likejqandgrepto implement its logic.\n- [INDIRECT_PROMPT_INJECTION]: The safety hook processestool_inputdata received from the agent to detect and block restricted command patterns. Although this creates an ingestion point for untrusted data, the logic is designed to increase safety by restricting the agent's capabilities.\n - Ingestion points:
scripts/block-dangerous-git.shreads JSON formatted tool input from standard input.\n - Boundary markers: None present.\n
- Capability inventory: The script performs pattern matching and exits with specific codes to signal the agent to block execution.\n
- Sanitization: Uses
jqfor robust JSON parsing and regular expression matching for command validation.
Audit Metadata