git-guardrails-claude-code
Pass
Audited by Gen Agent Trust Hub on Aug 19, 2026
Risk Level: SAFE
Full Analysis
- [PRIVILEGE_ESCALATION]: The skill provides a bash script (
scripts/block-dangerous-git.sh) and guides the user to grant it execution permissions viachmod +xfor use as a tool hook. This is a standard and expected part of the hook installation process for the skill's own scripts.\n- [PERSISTENCE_MECHANISMS]: The setup process involves modifying Claude Code's configuration files (settings.json) to register a persistentPreToolUsehook. This ensures the guardrails are active across all sessions to provide continuous protection.\n- [INDIRECT_PROMPT_INJECTION]: The guardrail script ingests command strings from the agent's tool input to filter destructive actions. \n - Ingestion points: Data enters the process through the
stdinpipe inscripts/block-dangerous-git.shduring the tool-use lifecycle.\n - Boundary markers: None present; the script matches against the raw command string.\n
- Capability inventory: The script has the capability to block the agent's tool execution by returning exit code 2 when dangerous patterns are detected.\n
- Sanitization: The script uses
jqto safely extract the command payload from the structured JSON tool input.
Audit Metadata