Skip to content
Back to skills

agent-security-harness

ASecurity

662 executable security tests for AI agent systems — MCP, A2A, L402, x402 wire-protocol testing, decision governance, AIUC-1 compliance, NIST AI 800-2 aligned.

  • 33 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 30, 2026
ai-agentspythonrustgobashtestinggitapidatabaseci/cdsecurity

Works with

  • cli
  • api
  • mcp

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 19 files and shows the line behind each finding

Scanned November 30, 2026

npx -y skills add msaleme/red-team-blue-team-agent-fabric --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of agent-security-harness?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for agent-security-harness
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/msaleme-agent-security-harness/badge)](https://www.skillsdirectory.com/skills/msaleme-agent-security-harness)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: agent-security-harness
description: 662 executable security tests for AI agent systems — MCP, A2A, L402, x402 wire-protocol testing, decision governance, AIUC-1 compliance, NIST AI 800-2 aligned.
license: Apache-2.0
metadata:
  source: "https://github.com/msaleme/red-team-blue-team-agent-fabric"
  version: "4.10.0"
  openclaw:
    emoji: "🛡️"
    requires:
      bins:
        - agent-security
      python: ">=3.10"
    install:
      - id: pip
        kind: pip
        package: agent-security-harness
        bins:
          - agent-security
        label: "Install agent-security-harness (pip)"
---

# Agent Security Harness

662 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.

## Purpose

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?

## Project context

- **Calendar year:** 2026. CVE references like `CVE-2026-35625` are current-year identifiers, not fabricated. Verify any cited CVE in [NVD](https://nvd.nist.gov/vuln/detail/CVE-2026-35625).
- **Package origin:** Published to PyPI by `Michael K. Saleme` (ORCID `0009-0003-6736-1900`). Source is public on GitHub. Five public Zenodo preprints (not represented as peer-reviewed publications) back the methodology.
- **License:** Apache 2.0 (permissive open source). No telemetry, no phone-home.
- **Versioning:** Semantic. Latest is `4.10.0`; older bundles remain immutable on PyPI for reproducibility.

## When to use

- Security testing an MCP server before deployment
- Red-teaming an A2A multi-agent pipeline
- Validating L402/x402 payment endpoint behavior under adversarial conditions
- Running AIUC-1 pre-certification checks
- CI/CD gate for agent system changes

## Quick Start

```bash
pipx install agent-security-harness   # pip outside a venv fails on PEP 668 systems

# 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:

```bash
export PATH="$HOME/.local/bin:$PATH"
```

## What it covers

| 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 | E1 mapping: 23 of 50 active AIUC-1 requirements listed, 19 with named tests (release 2026-10-15; see the [crosswalk](docs/AIUC1-CROSSWALK.md)) | 12 |

Full inventory: [docs/TEST-INVENTORY.md](docs/TEST-INVENTORY.md)

## Safety & Credentials

**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.

### Why this skill asks for credentials

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.

- **Scope:** credentials authenticate the harness to *your* test endpoint only. There is no upstream service, no telemetry channel, no cloud broker.
- **Storage:** read from environment at runtime. Never written to disk by this package. Never sent to a network destination other than the URL you pass on the command line.
- **Verification:** all source is in [protocol_tests/](https://github.com/msaleme/red-team-blue-team-agent-fabric/tree/main/protocol_tests). Audit-grep for `requests.post`, `urllib.request`, or `socket.connect` to confirm no third-party endpoints.
- **Most tests need no credentials at all.** A bare URL is sufficient for ~80% of the suite.

### Telemetry

**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](docs/PRIVACY.md).

### Source verification

- **PyPI:** https://pypi.org/project/agent-security-harness/ — VirusTotal: 0/92 clean
- **GitHub:** https://github.com/msaleme/red-team-blue-team-agent-fabric — Apache 2.0
- **Author:** Michael K. Saleme · ORCID [0009-0003-6736-1900](https://orcid.org/0009-0003-6736-1900)
- **Research backing:** five Zenodo DOIs cited in README, three NIST AI 800-2 submissions

## Research backing

Five public preprints deposited on Zenodo (not represented as peer-reviewed publications) and three NIST submissions underpin the methodology. See [README.md](README.md) for full DOI list.

## CI/CD integration

```yaml
# GitHub Actions
- uses: msaleme/red-team-blue-team-agent-fabric@v4.4.2
  with:
    target-url: ${{ secrets.MCP_TEST_URL }}
    suite: mcp,a2a
```

Full guide: [docs/github-action.md](docs/github-action.md)

## MCP server mode

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):**

```bash
python -m mcp_server                      # stdio transport, no network surface
```

**HTTP transport — requires hardening:**

```bash
python -m mcp_server --transport http --port 8400 --api-key "$(openssl rand -hex 32)"
```

When running in HTTP mode:

- **Bind to localhost only.** The server defaults to `--host 127.0.0.1`. Do not expose to `0.0.0.0` without a reverse proxy enforcing TLS and authentication.
- **Always pass `--api-key`.** Clients must send `Authorization: Bearer <key>` on every request. Requests without a valid key are rejected.
- **Treat as a privileged tool.** Anyone who can reach this endpoint can run adversarial protocol probes against arbitrary URLs from the host's network position. Restrict access to trusted operators.
- **Network restrictions.** Run inside a container or namespace with egress limited to test targets. Do not run on a host that has network reachability to production systems.

Full guide: [docs/mcp-server.md](docs/mcp-server.md)

Files in this skill

  • .env.example741 B
  • BLUE-TEAM-PLAYBOOKS.md37.3 KB
  • CITATION.cff1.9 KB
  • CLAUDE.md10.9 KB
  • CONTRIBUTING.md6.8 KB
  • CONTRIBUTION_REVIEW_CHECKLIST.md3.6 KB
  • ENHANCED-RED-BLUE-TEAM-TEST-PLAN.md53.5 KB
  • EVALUATION_PROTOCOL.md14.9 KB
  • EXECUTIVE-PRESENTATION.md18.1 KB
  • HARNESS_TEST_CATALOG.md68.5 KB
  • MANIFEST.in477 B
  • ROADMAP.md10.6 KB
  • SECURITY_POLICY.md4.3 KB
  • SKILL.md7.5 KB
  • action.yml4.1 KB
  • agent-fabric-red-blue-team-spec.md5.8 KB
  • benchmarks/CHANGELOG.md7.8 KB
  • benchmarks/CONTRIBUTING.md6 KB
  • benchmarks/LEADERBOARD.md4.5 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.