Verify Zero Leak Shannon Entropy Secrets Guard
verify_security_guardScan workspace files or in-memory code for hardcoded secrets and API keys, or install a git pre-commit hook to block credential leaks before commits.
Instructions
Scans workspace files and code buffers for hardcoded secrets and API keys, or installs the automated git pre-commit zero-leak 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: Security action: 'scan' inspects workspace files or in-memory text for confidential credentials; 'install_pre_commit' installs the automated git pre-commit security hook into .git/hooks/pre-commit.project_root: Root directory of the repository to scan or install the pre-commit hook into.content: Optional raw in-memory code string or configuration text to scan for secrets directly without touching disk files.
Behavior:
Mutability: Strictly read-only when action is 'scan'; writes executable hook file .git/hooks/pre-commit when action is 'install_pre_commit'.
Idempotency: Scans are strictly idempotent; hook installation is idempotent and will not overwrite custom existing hooks without backup.
Privacy & Network: 100% offline local regex and Shannon entropy calculation; zero secret tokens are ever transmitted over the network.
Performance & Resources: Scans 1,000 files in <100ms using <30MB RAM; hook execution completes in <50ms.
Auth: Zero authentication or cloud credentials required.
Return Structure: Emits security audit report showing 100% Zero-Leak pass status or lists detected secret leaks with file names, line numbers, and redacted tokens.
Error Handling: Gracefully reports if directory is not a git repository when attempting pre-commit installation.
Usage Guidelines:
When to use: Ensure zero confidential credentials (OpenAI, Anthropic, Gemini, GitHub tokens, AWS keys, private certificates) are committed to git or exposed in LLM prompt contexts.
When NOT to use: Do not use for checking code quality, cyclomatic complexity, or duplicate code (use 'audit_code_quality' instead); do not use for enforcing architectural layer boundaries (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.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "verify_security_guard"
}
}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 |