git-guardrails-claude-code
Pass
Audited by Gen Agent Trust Hub on Sep 7, 2026
Risk Level: SAFECOMMAND_EXECUTIONPRIVILEGE_ESCALATIONPERSISTENCEINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill installs a bash script (scripts/block-dangerous-git.sh) designed to run as a PreToolUse hook, intercepting and evaluating git commands before execution.- [PRIVILEGE_ESCALATION]: Setup instructions include using
chmod +xto grant execution permissions to the local hook script.- [PERSISTENCE]: The skill modifies the.claude/settings.jsonconfiguration file to persistently register the hook for the project or global environment. This is the intended primary purpose of the skill.- [INDIRECT_PROMPT_INJECTION]: The hook script processes tool execution data provided by the platform to identify and block prohibited command patterns. - Ingestion points: The script
scripts/block-dangerous-git.shreads tool input from stdin. - Boundary markers: The script expects structured JSON input provided by the platform environment.
- Capability inventory: The script is limited to exiting with specific return codes and printing to stderr; it contains no subprocess spawning, file writes, or network operations.
- Sanitization: Input is parsed using
jqand validated against a static list of dangerous patterns.
Audit Metadata