agentpr_guard_audit
Audits git diffs and pull requests for AI-hallucinated packages, typosquatting, unauthorized boundary imports, and leaked secrets to verify code changes before merging.
Instructions
Audits unified git diffs or Pull Requests for AI-hallucinated NPM/PyPI packages, typosquatting attacks, unauthorized boundary imports, and leaked secrets. Use when: Verifying code changes from AI coding agents (Cursor, Claude Code, Copilot) or reviewing PRs before merging into production repositories. Do not use when: Pruning TypeScript/JavaScript AST syntax or linting container Dockerfiles. Alternative: Use tokenprune_wasm_trim for AST prompt reduction, or dockerlean_wasm_audit for Dockerfile linting. Execution: Runs locally in-memory (<5ms), read-only, idempotent, zero network calls, zero telemetry, air-gapped deterministic.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"diff": "<diff>"
},
"name": "agentpr_guard_audit"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| diff | Yes | Unified git diff or PR patch text to audit. Must include hunk headers (e.g., 'diff --git a/... b/...'). | |
| licenseKey | No | Optional TopAI Sovereign Pro offline license key (or set TOPAI_LICENSE_KEY env variable). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| report | Yes | Detailed security audit findings, blocked hallucinated packages, and boundary policy results. | |
| markdown | Yes | Formatted Markdown audit summary suitable for PR comments. | |
| securityNotice | Yes | One-line pass/fail status verification string. | |
| hasVulnerability | Yes | Flag indicating whether hallucinated packages or security hazards were intercepted. |