Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agentguard_scanner-0.1.0.tar.gz (78.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentguard_scanner-0.1.0-py3-none-any.whl (76.6 kB view details)

Uploaded Python 3

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

Hashes for agentguard_scanner-0.1.0.tar.gz
Algorithm Hash digest
SHA256 96802e183850ce52516786cf14ed5d755c2d91b45d18422516c3fe8713157545
MD5 fd6f902404b7424d6e903fcaa76f4f94
BLAKE2b-256 b9d2bfdd689dc8886de606e48f0935334fc9f80afeda7b4326ae142ea95ab8cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentguard_scanner-0.1.0.tar.gz:

Publisher: release.yml on SGridworks/agentguard-scanner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentguard_scanner-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentguard_scanner-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5cf97db4b6e02706d449eaebdf27c240a1e1518c9b14b18cfd17194bc17016c4
MD5 67402a99aea5afd7e663c8222f40f4a2
BLAKE2b-256 0f097aa39a7cccbcc11aef96088cf9cd83cd8ca766e0dc73cb21f68abd1c3527

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentguard_scanner-0.1.0-py3-none-any.whl:

Publisher: release.yml on SGridworks/agentguard-scanner

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page