Install
openclaw skills install agent-security-harness470 executable security tests for AI agent systems — MCP, A2A, L402, x402 wire-protocol testing, decision governance, AIUC-1 compliance, NIST AI 800-2 aligned.
openclaw skills install agent-security-harness470 executable security tests for AI agent systems. MCP + A2A + L402 + x402 wire-protocol testing. Decision-layer attack scenarios. AIUC-1 compliance mapping. One pip install away.
This is a defensive security testing tool for AI agent operators. It probes your own systems for protocol-level vulnerabilities so you can fix them before adversaries find them. It is the agentic-AI analogue of nmap, burp, or zaproxy.
Answer the question every operator needs answered before going to production:
Even if an agent is properly authenticated and authorized, can it still be manipulated into unsafe or policy-violating behavior?
CVE-2026-25253 are current-year identifiers, not fabricated. Verify any cited CVE in NVD.Michael K. Saleme (ORCID 0009-0003-6736-1900). Source is public on GitHub. Five peer-reviewed Zenodo preprints back the methodology.4.4.0; older bundles remain immutable on PyPI for reproducibility.pip install agent-security-harness
# Simulate immediately — no server needed:
agent-security test mcp --simulate
# Test a real MCP server:
agent-security test mcp --url http://localhost:8080/mcp
# Test an x402 payment endpoint:
agent-security test x402 --url https://your-x402-endpoint.com
If agent-security is not found after install, add ~/.local/bin to your PATH:
export PATH="$HOME/.local/bin:$PATH"
| Layer | Scope | Tests |
|---|---|---|
| MCP Protocol | JSON-RPC 2.0 attacks, tool injection, capability escalation | 18 |
| A2A Protocol | Agent-to-agent trust, delegation, provenance | 13 |
| L402 Payment | WWW-Authenticate flow, token replay, downgrade | 33 |
| x402 Payment | Payment challenge crafting, validation bypass | 52 |
| Decision Governance | Autonomy scoring, scope creep, policy constraint testing | 8+ |
| Jailbreak / Over-Refusal | 25 jailbreak + 25 false-positive rate tests | 50 |
| GTG-1002 APT Simulation | 17 nation-state pattern reproductions | 17 |
| Enterprise Platforms | 25 cloud + 20 enterprise platform tests | 45+ |
| AIUC-1 Compliance | Maps to 19 of 20 testable AIUC-1 requirements | 12 |
Full inventory: docs/TEST-INVENTORY.md
Non-destructive by default. All tests are read-only protocol probes. No writes, no mutations, no side effects on the target system.
Do NOT run against production systems without explicit written authorization. Use isolated staging environments or test accounts. This tool sends adversarial protocol messages; production systems may log or rate-limit them.
API key environment variables (e.g. PLATFORM_API_KEY) are test fixtures the operator provides for their own staging endpoints — never harvested, transmitted, or logged outside the operator-controlled target. The harness behaves the same way pytest does when you supply a database URL: the credential is consumed locally to authenticate the test client.
requests.post, urllib.request, or socket.connect to confirm no third-party endpoints.Telemetry is opt-IN and disabled by default. No data is collected unless the operator explicitly runs agent-security config --telemetry, which writes {"enabled": true} to ~/.agent-security/telemetry.json. Default behavior: zero outbound network calls beyond the test target URL. Disable any prior opt-in with agent-security config --no-telemetry. Full disclosure: docs/PRIVACY.md.
Five peer-reviewed preprints and three NIST submissions underpin the methodology. See README.md for full DOI list.
# GitHub Actions
- uses: msaleme/red-team-blue-team-agent-fabric@v4.4.0
with:
target-url: ${{ secrets.MCP_TEST_URL }}
suite: mcp,a2a
Full guide: docs/github-action.md
The harness can expose itself as an MCP server so any AI agent or orchestrator can invoke security tests on demand. Default mode is stdio (local IPC, no network exposure). Only enable HTTP transport when you have a specific need.
Default — stdio (recommended):
python -m mcp_server # stdio transport, no network surface
HTTP transport — requires hardening:
python -m mcp_server --transport http --port 8400 --api-key "$(openssl rand -hex 32)"
When running in HTTP mode:
--host 127.0.0.1. Do not expose to 0.0.0.0 without a reverse proxy enforcing TLS and authentication.--api-key. Clients must send Authorization: Bearer <key> on every request. Requests without a valid key are rejected.Full guide: docs/mcp-server.md