guard_git_diff
Inspects staged or unstaged git diffs locally and masks newly added credentials, tokens, or PII in RAM, returning a sanitized diff for AI commit generation or code review.
Instructions
Zero-Trust Agentic Guard: Inspects unstaged or staged git diffs locally, sanitizes any newly added or modified credentials, tokens, or PII in RAM, and returns safe diff for AI commit generation or code review.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cwd | No | Optional repository directory. Defaults to current workspace root. | |
| sector | No | Optional alias for 'profile'. The industry sector or compliance vertical to apply (e.g. 'medical', 'finance', 'legal', 'dev', 'hr', 'accounting', 'security', 'compliance', 'underwriting', 'telecom'). | |
| staged | No | If true, runs 'git diff --cached'. If false, runs 'git diff'. Defaults to false. | |
| profile | No | Detection profile. Available: 'Dev' (default), 'General', or any of the 30 specialized industry profiles. Defaults to 'Dev'. | |
| session_id | No | Optional session ID for multi-agent isolation. Defaults to 'default'. |