verify_security_guard
Scans workspace files and code buffers for hardcoded secrets and API keys, or installs a git pre-commit hook to block credential leaks before committing.
Instructions
Scans workspace files and code buffers for hardcoded secrets and API keys, or installs the automated git pre-commit zero-leak security guard, distinguishing from 'audit_code_quality' and 'enforce_architecture_rules' by identifying high-entropy credentials and git hooks rather than checking code complexity or enforcing layer rules.
Parameters:
action(str, optional, default='scan'): Security action: 'scan' to inspect files or content for secret leaks, 'install_pre_commit' to install the automated git zero-leak hook.project_root(str, optional, default='.'): Target repository root to scan or install hook into (default: current directory).content(str, optional, default=''): Optional raw text string to scan for secrets in memory without scanning disk files.
Behavior:
Read-only when action is 'scan'; installs hook file when action is 'install_pre_commit'.
Idempotent: Scans produce identical results; hook installation is idempotent.
100% Offline: Zero data transmission; all entropy and pattern checks execute locally.
Auth & Rate Limits: Zero authentication or cloud credentials required; runs in <50ms.
Error Handling: Reports exact line numbers and entropy score when secrets are detected.
Usage Guidelines:
When to use: Ensure zero confidential credentials (OpenAI, Anthropic, Gemini, GitHub tokens, private keys) are exposed in code before committing or sharing context.
When NOT to use: Do not use for general code quality, cyclomatic complexity, and duplicate code scans (use 'audit_code_quality' instead); do not use for enforcing layer boundary architecture rules (use 'enforce_architecture_rules' instead).
Returns: Security audit report showing 100% Zero-Leak certification or list of detected secret leaks with line numbers, or hook installation confirmation.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | No | Security action: 'scan' to inspect files or content for secret leaks, 'install_pre_commit' to install the automated git zero-leak hook. | scan |
| content | No | Optional raw text string to scan for secrets in memory without scanning disk files. | |
| project_root | No | Target repository root to scan or install hook into (default: current directory). | . |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |