Catalog PyPI
PACKAGE EXPLORERView in registry

agentvet

PyPI

AI Agent Security Scanner — detect prompt injection, tool auth bypass, data leaks

agent-securityai-agentclaude-codecursorllmmcpprompt-injectionscannersecuritysupply-chain
Versions collected1
Direct dependencies5From release 0.5.0
Last observed21 Oct, 08:54 UTC

README

Version 0.5.0 documentation

AgentVet

AI Agent Security Scanner — detect prompt injection, tool auth bypass, and data leaks before attackers do.

Python 3.10+ License MIT Version 0.5.0

One command. Find vulnerabilities in your AI agent code.


Features

  • 4-Tier Detection Pipeline
    • L1 — Regex + AST patterns (fast, broad coverage)
    • L2 — Ollama semantic filter (removes false positives, ~24s/batch)
    • L3 — DeepSeek deep audit (attack paths + PoC + CVSS + fix, on HIGH/CRITICAL only)
    • L4 — Cross-finding attack chain synthesis (how vulns combine into full attack campaigns) — unique to AgentVet
  • 22 Detection Rules across 7 categories: prompt injection, tool authorization, data leakage, framework security, secret exposure, MCP config, and supply-chain
  • Web Dashboard — React + Tailwind UI with scan history and per-finding drilldown
  • CLI Tool — agentvet scan ./my-agent --depth 3
  • Zero data leaves your machine (L1 is local-only; L2 uses local Ollama; L3 is opt-in via API key)

Quick Start

Prerequisites

  • Python 3.10+
  • Ollama (optional, for L2 semantic filtering)
    • Pull a model: ollama pull qwen3:8b
  • DeepSeek API key (optional, for L3 deep audit)

Install

git clone https://github.com/tlyyxjz/agentvet.git
cd agentvet

# Using pip
pip install -e .

# Or using uv
uv sync

Usage

CLI:

# L1 only (fastest, some noise)
agentvet scan ./my-agent --depth 1

# L1 + L2 (removes false positives)
agentvet scan ./my-agent --depth 2

# Full pipeline (L1 + L2 + L3 deep audit)
agentvet scan ./my-agent --depth 3

# JSON output
python quick_scan.py --target ./my-agent --depth 3 --json

Web Dashboard:

# Start backend
uvicorn web.main:app --host 0.0.0.0 --port 8765

# Start frontend (in another terminal)
cd frontend && npm install && npm run dev

Open http://localhost:5173 to use the web dashboard.


Configuration

Copy .env.example to .env and set your values:

VariableDefaultPurpose
OLLAMA_BASE_URLhttp://127.0.0.1:11434Ollama API endpoint
OLLAMA_MODELqwen3:8bModel for L2 filtering
DEEPSEEK_API_KEY—DeepSeek API key for L3 audit
DEEPSEEK_BASE_URLhttps://api.deepseek.com/v1/chat/completionsDeepSeek endpoint
DEEPSEEK_MODELdeepseek-chatModel for L3 deep audit
AGENTVET_DB./agentvet.dbSQLite database path
ALLOWED_ORIGINShttp://localhost:5173,http://localhost:3000CORS origins

Architecture

scan target
  │
  ├─ L1: RegexRule + ASTRule  (~1s,  free, ~60% coverage)
  │   └─ 17 rules auto-discovered from scanner/rules/
  │
  ├─ L2: Ollama qwen3:8b     (~24s, free, removes ~30% noise)
  │   └─ Batch classify: REAL vs NOISE
  │
  ├─ L3: DeepSeek-chat       (~10s/finding, ~$0.01/scan)
  │   └─ Per-finding: attack path + exploit demo + CVSS + fix
  │
  └─ L4: DeepSeek-chat       (~15s, one call total)
      └─ Cross-finding chain synthesis: how vulns combine into attack campaigns

Detection Rules

IDCategoryRule
PI-001Prompt InjectionDirect user input concatenation to LLM prompt
PI-002Prompt InjectionMissing input sanitization
PI-003Prompt InjectionNo system defense prompt
TA-001Tool AuthHigh-risk tool without user confirmation
TA-002Tool AuthMissing tool permission check
DL-001Data LeakSensitive data logged
DL-002Data LeakExternal service call without audit
FW-001FrameworksLangChain @tool executes dangerous op without confirm
FW-002FrameworksAutoGen code execution without Docker sandbox
FW-003FrameworksCrewAI Task allows code exec without validation
FW-004FrameworksDify plugin API endpoint missing permission check
SEC-001SecretsAI provider API key embedded in source code
SEC-002SecretsCloud provider credential in source code
SEC-003SecretsGeneric password/token/db-url in source code
MCP-001MCP ConfigMCP server registered without authentication
MCP-002MCP ConfigMCP server env contains plaintext secrets
MCP-003MCP ConfigMCP server command from user-writable path
MCP-004MCP ConfigMCP tool description contains prompt injection payload
PI-004Prompt InjectionIDE rule file (.cursorrules/.windsurfrules) with suspicious directives
TA-003Tool AuthCross-agent delegation loses caller permission context
SC-001Supply ChainSkill/plugin contains obfuscated payload or exfiltration endpoint
SC-002Supply ChainSkill manifest references suspicious external URL (pastebin/raw/gist)

All 22 rules auto-discover from scanner/rules/ — no registration needed. Each rule maps to OWASP LLM Top 10 (2025) and OWASP Agentic AI Top 10 categories.

Project Structure

agentvet/
├── scanner/          # Core scan engine
│   ├── engine.py     # ScanEngine + Rule base classes
│   ├── findings.py   # Finding + ScanReport data models
│   ├── l2_filter.py  # L2 Ollama semantic filter
│   ├── l3_audit.py   # L3 DeepSeek deep audit
│   └── rules/        # Detection rules
├── cli/              # CLI entrypoint
├── web/              # FastAPI backend
├── frontend/         # React + Vite + Tailwind
├── docs/             # Documentation
└── tests/            # Test suite (coming soon)

Roadmap

  • npm distribution (npx agentvet scan)
  • More detection rules (CSRF, SSRF, path traversal in agent tools)
  • Docker image
  • Supabase migration for cloud deployment
  • VS Code extension
  • GitHub Action (agentvet/scan)

License

MIT — see LICENSE.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.5.013 Jun 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
tlyyxjz/agentvet

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 08:54 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:c6de3cf747f5cccac322f5a1f69fed9f2b5b2ca3f56316a315d6644c2d21c2c9