Open-source adversary emulation for AI agents and MCP servers.
# Add to your Claude Code skills
git clone https://github.com/KeyValueSoftwareSystems/agent-opforLast scanned: 11/29/2026
{
"issues": [
{
"type": "npm-audit",
"message": "@ai-sdk/azure: Vulnerability found",
"severity": "low"
},
{
"type": "npm-audit",
"message": "@ai-sdk/deepseek: Vulnerability found",
"severity": "low"
},
{
"type": "npm-audit",
"message": "@ai-sdk/gateway: Vulnerability found",
"severity": "low"
},
{
"type": "npm-audit",
"message": "@ai-sdk/openai: Vulnerability found",
"severity": "low"
},
{
"type": "npm-audit",
"message": "@ai-sdk/provider-utils: @ai-sdk/provider-utils has an Uncontrolled Resource Consumption issue",
"severity": "low"
},
{
"type": "npm-audit",
"message": "@eslint/config-array: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@hono/node-server: @hono/node-server: `serveStatic` decodes the request path a second time, leading to bypass of middleware on static paths",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@modelcontextprotocol/sdk: MCP TypeScript SDK: OAuth client could send credentials to an authorization server chosen by the MCP server",
"severity": "high"
},
{
"type": "npm-audit",
"message": "@typescript-eslint/eslint-plugin: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@typescript-eslint/parser: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@typescript-eslint/type-utils: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@typescript-eslint/typescript-estree: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "@typescript-eslint/utils: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "ai: Vulnerability found",
"severity": "low"
},
{
"type": "npm-audit",
"message": "body-parser: body-parser vulnerable to Denial of Service via trailing bytes after a compressed request body",
"severity": "high"
},
{
"type": "npm-audit",
"message": "brace-expansion: brace-expansion: DoS via unbounded intermediate arrays, bypassing the CVE-2026-14257 mitigation",
"severity": "high"
},
{
"type": "npm-audit",
"message": "esbuild: esbuild allows arbitrary file read when running the development server on Windows",
"severity": "low"
},
{
"type": "npm-audit",
"message": "eslint: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "fast-uri: fast-uri vulnerable to host confusion via backslash authority introducer",
"severity": "high"
},
{
"type": "npm-audit",
"message": "hono: Hono: Incomplete fix for CVE-2026-39408: `toSSG()` still writes files outside the output directory",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "ip-address: ip-address: Address6.isLinkLocal() recognizes fe80::/64 rather than fe80::/10, allowing SSRF and trust-boundary bypass to on-link hosts",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "js-yaml: js-yaml: maxTotalMergeKeys does not limit CPU use for empty merge sources",
"severity": "high"
},
{
"type": "npm-audit",
"message": "minimatch: minimatch has potential denial of service via globparts amplification",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "proxy-addr: proxy-addr vulnerable to IP spoofing via IPv4-mapped IPv6 trust subnet",
"severity": "critical"
},
{
"type": "npm-audit",
"message": "qs: qs array-limit bypass via bracket-key comma parsing",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "typescript-eslint: Vulnerability found",
"severity": "medium"
},
{
"type": "npm-audit",
"message": "zod: Zod can exhaust memory while validating oversized constrained collections",
"severity": "high"
},
{
"file": "skills/agent-redteaming/opfor-run/SKILL.md",
"line": 201,
"type": "secret-exfiltration",
"message": "Instruction appears to send credentials/secrets to an external endpoint",
"severity": "medium"
},
{
"file": "skills/agent-redteaming/opfor-setup/SKILL.md",
"line": 140,
"type": "secret-exfiltration",
"message": "Instruction appears to send credentials/secrets to an external endpoint",
"severity": "medium"
}
],
"status": "FAILED",
"scannedAt": "2026-11-29T14:00:14.096Z",
"npmAuditRan": true,
"pipAuditRan": true,
"promptInjectionRan": true
}agent-opfor is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by KeyValueSoftwareSystems. Open-source adversary emulation for AI agents and MCP servers. It has 589 GitHub stars.
agent-opfor failed AgentsLLM's automated security scan, which flagged one or more high-severity issues. Review the Security Report section carefully before using it.
Clone the repository with "git clone https://github.com/KeyValueSoftwareSystems/agent-opfor" and add it to your Claude Code skills directory (see the Installation section above).
agent-opfor is primarily written in TypeScript. It is open-source under KeyValueSoftwareSystems on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh agent-opfor against similar tools.
No comments yet. Be the first to share your thoughts!
Requires a passing catalog security scan. Resolve the flagged issues and resubmit to enable featuring.
OPFOR is short for Opposition Force — a military term for the unit that plays the enemy in training, so the rest of the army learns what real attacks feel like before they come. We named the tool after that idea: to defend AI agents better, you have to attack them first.
We've shipped 130 products for 90 startups over the last ten years. In the last 18 months, almost every one of them had an AI agent in it — and every one of those teams hit the same wall when it came to testing.
So we built OPFOR. For ourselves first. Now open source.
Apache 2.0. Built from India.
npm install -g @keyvaluesystems/agent-opfor-cli
export OPENAI_API_KEY=your-key # or GEMINI_API_KEY, ANTHROPIC_API_KEY, etc.
One-shot — runs the setup wizard and immediately starts the scan:
opfor run
Two-step — save a config you can reuse or commit to CI:
opfor setup # wizard saves a config to .opfor/configs/
opfor run --config .opfor/configs/<file> # run any time against the saved config
https://github.com/user-attachments/assets/a6a3cff2-2cf9-4486-944e-ac0163e7ea04
Opfor red-teams the full AI agent surface — prompts, tools, MCP servers, memory, and multi-turn reasoning. It generates targeted attacks for OWASP LLM Top 10, OWASP Agentic AI Top 10, OWASP MCP Top 10, OWASP API Security, and EU AI Act bias suites, fires them at your target, and judges each response with an LLM.
Most red-team tooling in this space is excellent at one thing — a probe library, a developer evaluator, a programmatic framework. Opfor covers more ground in one tool:
Different people on your team need different entry points. Opfor ships five.
| Mode | How | Best for |
|---|---|---|
| 🖥️ CLI | opfor setup → opfor run |
Engineers, CI/CD, terminal-first workflows |
| 🌐 Browser extension | Install the extension, click the icon on any chat interface | Product managers, designers, QA, security analysts — anyone who can't or won't write code |
| 🤖 MCP server | Register opfor in Cursor or Claude Desktop, then ask in chat | AI coding agents that test your other agents |
| ⚡ Skills | /opfor-setup · /opfor-run · /opfor-mcp-setup · /opfor-mcp-run |
Developers who want one-command testing inside their IDE |
| 📦 SDK | npm install @keyvaluesystems/agent-opfor-sdk, then call run / hunt from your code |
Programmatic red-teaming and custom workflows |
All five share the same evaluators, attack templates, and judge logic.
→ CLI reference · Browser extension setup · MCP setup · Skills setup · SDK reference · Session handling
When you run a scan, opfor:
Each run lands in its own subfolder under .opfor/reports/run-report-<compactTs>-<slug>-<shortId>/ containing <slug>-report.html and <slug>-report.json. Autonomous opfor hunt runs use the same layout under hunt-report-<compactTs>-<slug>-<shortId>/.
Every run reports what its instrumented LLM calls cost, broken down by model:
Token usage: 51,323 input / 6,057 output (57,380 total)
Testing cost: $0.18
deepseek/deepseek-v4-pro [attacker]: $0.037
anthropic/claude-opus-5 [judge]: $0.14
This is opfor's own spend — the attacker and judge LLMs. It excludes your target's inference cost, which opfor cannot see from the outside. The per-model split is the useful part: the judge is often the bigger share, and pointing it at a cheaper model is usually the easiest saving.
Prices come from a snapshot of LiteLLM's public price map that ships with the package, so runs work offline and a report re-rendered later produces the same figure. Cached input is billed at the provider's cache rate — multi-turn attacks re-send the conversation each turn, and that repeated prefix is often ~100× cheaper than fresh text, so the figure tracks the real bill rather than a worst case. Caveats worth knowing:
→ Token usage and testing cost
Opfor ships with curated suites that map to industry standards. Pick a suite or run individual evaluators.
| Suite ID | Standard | Focus |
|---|---|---|
owasp-llm-top10 |
OWASP LLM Top 10 (2025) | Prompt injection, jailbreaks, sensitive disclosure, system prompt leakage |
owasp-agentic-ai |
OWASP Agentic AI Top 10 | Excessive agency, tool misuse, agent goal hijack, memory poisoning |
owasp-mcp-top10 |
OWASP MCP Top 10 (2025) | Secret exposure, scope escalation, tool description injection, SSRF |
owasp-api |
OWASP API Security Top 10 | BOLA, BFLA, SQL injection |
| `eu-ai-a |