Offline · stdlib-only · MIT

agentsec


39 small, offline security tools for people building and running AI agents: MCP servers and clients, coding agents, RAG pipelines, and tool-calling apps.

View on GitHub Quick start Releases Playground Benchmark Tools Guides Why agentsec

Try it in 30 seconds

pip install git+https://github.com/dunkleschitz/agentsec.git
agentsec mcpposture ~/.cursor/mcp.json

Or clone and run a tool as a standalone script, no install required:

git clone https://github.com/dunkleschitz/agentsec.git
cd agentsec/tools/mcpposture
python3 mcpposture.py examples/risky_claude_desktop_config.json

You can also run five of the scanners in your browser. They execute locally with Pyodide; nothing you paste is uploaded. A labeled detection benchmark reports precision and recall on a small synthetic corpus, with a before/after table and a held-out set, and lists the misses.

The tools

toolpoison

Hidden instructions and rug-pulls in MCP tool manifests

tracesweep

Secrets leaked into agent transcripts and logs

runledger

Offline token and cost accounting for agent runs

vibeaudit

Security smells in AI-written Python and JS/TS

canarytrap

Prompt-injection test harness with canary payloads

mcpposture

Least-privilege grades for MCP client configs

rundiff

Behavioral diff of two agent runs

scopefit

Least-privilege check for GitHub tokens agents used

toolgate

Policy-as-code for agent tool calls

slopcheck

Hallucinated and typo-squatted package names

ragsieve

Indirect prompt injection in RAG source documents

yolocheck

Permission and autonomy grades for coding agents

rulesguard

Backdoors in AGENTS.md, CLAUDE.md, and rule files

outfence

Dangerous LLM output before it is rendered

aibom

AI bill of materials and shadow-AI drift in a repo

trifecta

Lethal trifecta across an agent's whole toolset

pickleprobe

Code-execution risk in pickle model files, unread

promptleak

System-prompt leakage in transcripts and outputs

agentci

Prompt injection risk in AI-agent GitHub Actions

mcpsink

Taint from MCP tool arguments into dangerous sinks

agentcard

Auth and injection issues in A2A Agent Cards

loopguard

Runaway loops and retry storms in transcripts

toolpin

Hashed MCP tool lockfile and rug-pull drift

resultguard

Indirect prompt injection in tool results

fetchfence

SSRF and destination risk in URLs an agent fetched

ctxbudget

Oversized tool results and context-window blowups

modelpin

Floating model aliases and mid-run model switches

hitlguard

Missing human approval on consequential tool calls

pathfence

Sensitive file paths an agent actually touched

shellfence

Dangerous shell commands an agent actually ran

schemafence

Unconstrained high-privilege tool-schema parameters

memfence

Poisoning in persistent agent memory stores

tmplfence

User input interpolated into system prompt templates

piiguard

PII in transcripts, with optional redaction

secretflow

Secrets flowing from tool results into later tool args

Guides

Prompt injection through tool results

Tool results sit next to the system prompt. Scan them before the next turn.

Pinning MCP tools against drift

Treat tools/list like a lockfile. Fail CI when a tool quietly changes.

A 10-minute security audit for your AI agent

No red team required. Six offline scanners, standard library only.

Heuristic scanners, not a security boundary. A clean result does not mean something is safe. Mappings to the OWASP Top 10 for LLM Applications (2025) and the OWASP Top 10 for Agentic Applications (2026) are in the README. All example secrets in the repository are fake.