AgentGuard Scanner
Open-source security scanner for AI agent configurations and deployments. Runs 100% locally with zero network calls for config/paste scanning.
Installation
pip install agentguard-scanner
Quick Start
Python API
import asyncio
from agentguard_scanner import VulnerabilityScanner, ScanRequest, ScanInputType
async def scan_config():
scanner = VulnerabilityScanner()
request = ScanRequest(
paste_content=open("CLAUDE.md").read(),
scan_input_type=ScanInputType.PASTE_MD,
)
result = await scanner.scan(request)
for finding in result.findings:
print(f"[{finding.severity.value}] {finding.title}")
asyncio.run(scan_config())
Scan a live agent URL
import asyncio
from agentguard_scanner import VulnerabilityScanner, ScanRequest
async def scan_url():
scanner = VulnerabilityScanner()
request = ScanRequest(target_url="https://my-agent.example.com")
result = await scanner.scan(request)
print(f"Risk score: {result.risk_score}/10")
print(f"Findings: {result.findings_count}")
asyncio.run(scan_url())
What It Scans
URL-based scanning (connects to your agent only)
- Authentication — JWT none algorithm, expired tokens, signature bypass, algorithm confusion, session fixation, IDOR, privilege escalation
- Prompt Injection — Direct injection, indirect injection, goal hijacking, system prompt leakage (canary-based detection)
- SSRF — Localhost access, private network, cloud metadata endpoints, webhook SSRF
- MCP Security — Unauthenticated tool execution, config exposure, dangerous tools
- Tool Execution — Command injection, path traversal, arbitrary code execution, shell access
- Config Security — Exposed config files, environment variables, secret leakage, debug mode, git exposure
Paste/file scanning (zero network calls)
- Agent Configs (CLAUDE.md, .cursorrules, system prompts) — Overly permissive instructions, missing safety boundaries, privilege escalation, data exfiltration vectors, jailbreak susceptibility
- Tool Definitions (MCP configs, function schemas) — Dangerous tools, unconstrained inputs, SSRF vectors, command injection risk, missing auth
- Generic Content — Secret detection (12+ patterns), prompt injection indicators, config exposure, PII detection
Output Formats
from agentguard_scanner.formatters import format_json, format_sarif, format_table
# Human-readable table
print(format_table(result))
# Machine-readable JSON
print(format_json(result))
# SARIF 2.1.0 (GitHub Code Scanning, VS Code)
print(format_sarif(result))
License
Apache-2.0 — audit the code, use it anywhere, contribute back.
Release files for agentguard-scanner 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| agentguard_scanner-0.1.0.tar.gz | 78.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentguard_scanner-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 155.6 kB
Release files / agentguard_scanner-0.1.0.tar.gz
| Download URL | agentguard_scanner-0.1.0.tar.gz |
|---|---|
| Size | 78.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96802e183850ce52516786cf14ed5d755c2d91b45d18422516c3fe8713157545
|
|
BLAKE2b-256 checksum How to use checksums |
b9d2bfdd689dc8886de606e48f0935334fc9f80afeda7b4326ae142ea95ab8cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency logRelease files / agentguard_scanner-0.1.0-py3-none-any.whl
| Download URL | agentguard_scanner-0.1.0-py3-none-any.whl |
|---|---|
| Size | 76.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5cf97db4b6e02706d449eaebdf27c240a1e1518c9b14b18cfd17194bc17016c4
|
|
BLAKE2b-256 checksum How to use checksums |
0f097aa39a7cccbcc11aef96088cf9cd83cd8ca766e0dc73cb21f68abd1c3527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 25, 2026.
Transparency log