Metadata-Version: 2.4
Name: agentguard-scanner
Version: 0.1.0
Summary: Open-source security scanner for AI agent configurations and deployments
Project-URL: Homepage, https://github.com/SGridworks/agentguard-scanner
Project-URL: Documentation, https://github.com/SGridworks/agentguard-scanner/blob/main/README.md
Project-URL: Repository, https://github.com/SGridworks/agentguard-scanner
Project-URL: Issues, https://github.com/SGridworks/agentguard-scanner/issues
Project-URL: Changelog, https://github.com/SGridworks/agentguard-scanner/blob/main/CHANGELOG.md
Author: AgentGuard Contributors
Author-email: SGridworks <team@sgridworks.com>
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: agent,ai,llm,mcp,scanner,security,vulnerability
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Security
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.11
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.6.0
Requires-Dist: python-jose[cryptography]>=3.3.0
Requires-Dist: pyyaml>=6.0.1
Provides-Extra: dev
Requires-Dist: black>=24.0.0; extra == 'dev'
Requires-Dist: mypy>=1.8.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.23.4; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=8.0.0; extra == 'dev'
Requires-Dist: ruff>=0.3.0; extra == 'dev'
Description-Content-Type: text/markdown

# AgentGuard Scanner

Open-source security scanner for AI agent configurations and deployments. Runs 100% locally with zero network calls for config/paste scanning.

## Installation

```bash
pip install agentguard-scanner
```

## Quick Start

### Python API

```python
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

```python
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

```python
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.
