git-guardrails-claude-code
Pass
Audited by Gen Agent Trust Hub on Oct 26, 2026
Risk Level: SAFECOMMAND_EXECUTIONPERSISTENCEINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill instructions direct the agent to use
chmod +xto grant execution permissions to theblock-dangerous-git.shscript during the setup process. - [PERSISTENCE]: The skill modifies the
.claude/settings.jsonconfiguration file (either at the project level or globally in the user's home directory) to register aPreToolUsehook. This configuration ensures the guardrail script is persistently executed before any Bash commands in future agent sessions. - [INDIRECT_PROMPT_INJECTION]: The guardrail script evaluates command strings provided as tool input to identify and block dangerous patterns.
- Ingestion points: The
block-dangerous-git.shscript reads JSON data containing the command from standard input (stdin). - Boundary markers: The script does not use specific boundary markers, as it performs direct regex matching on the command string.
- Capability inventory: The script is limited to string analysis and exiting with specific status codes; it lacks capabilities for network access or file system modifications.
- Sanitization: The script uses
jqto extract the command string from the JSON input, preventing basic command injection into the monitoring logic itself.
Audit Metadata