Open-source security scanner for AI agent configurations and deployments
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentguard_scanner-0.1.0.tar.gz.
File metadata
- Download URL: agentguard_scanner-0.1.0.tar.gz
- Upload date:
- Size: 78.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96802e183850ce52516786cf14ed5d755c2d91b45d18422516c3fe8713157545
|
|
| MD5 |
fd6f902404b7424d6e903fcaa76f4f94
|
|
| BLAKE2b-256 |
b9d2bfdd689dc8886de606e48f0935334fc9f80afeda7b4326ae142ea95ab8cf
|
Provenance
The following attestation bundles were made for agentguard_scanner-0.1.0.tar.gz:
Publisher:
release.yml on SGridworks/agentguard-scanner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentguard_scanner-0.1.0.tar.gz -
Subject digest:
96802e183850ce52516786cf14ed5d755c2d91b45d18422516c3fe8713157545 - Sigstore transparency entry: 992452232
- Sigstore integration time:
-
Permalink:
SGridworks/agentguard-scanner@1903c1820b2bf064e33e28180e8e263c3dc8a190 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/SGridworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1903c1820b2bf064e33e28180e8e263c3dc8a190 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentguard_scanner-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentguard_scanner-0.1.0-py3-none-any.whl
- Upload date:
- Size: 76.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5cf97db4b6e02706d449eaebdf27c240a1e1518c9b14b18cfd17194bc17016c4
|
|
| MD5 |
67402a99aea5afd7e663c8222f40f4a2
|
|
| BLAKE2b-256 |
0f097aa39a7cccbcc11aef96088cf9cd83cd8ca766e0dc73cb21f68abd1c3527
|
Provenance
The following attestation bundles were made for agentguard_scanner-0.1.0-py3-none-any.whl:
Publisher:
release.yml on SGridworks/agentguard-scanner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentguard_scanner-0.1.0-py3-none-any.whl -
Subject digest:
5cf97db4b6e02706d449eaebdf27c240a1e1518c9b14b18cfd17194bc17016c4 - Sigstore transparency entry: 992452233
- Sigstore integration time:
-
Permalink:
SGridworks/agentguard-scanner@1903c1820b2bf064e33e28180e8e263c3dc8a190 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/SGridworks
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@1903c1820b2bf064e33e28180e8e263c3dc8a190 -
Trigger Event:
push
-
Statement type: