{"id":34442818,"url":"https://github.com/cisco-ai-defense/a2a-scanner","last_synced_at":"2026-02-12T07:50:47.410Z","repository":{"id":328230242,"uuid":"1110206646","full_name":"cisco-ai-defense/a2a-scanner","owner":"cisco-ai-defense","description":"Scan A2A agents for potential threats and security issues","archived":false,"fork":false,"pushed_at":"2026-01-13T19:42:34.000Z","size":360,"stargazers_count":80,"open_issues_count":2,"forks_count":13,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-13T21:42:23.717Z","etag":null,"topics":["a2a-protocol","a2a-server","agent-security","security-scanner"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cisco-ai-defense.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-12-04T21:31:46.000Z","updated_at":"2026-01-13T19:42:39.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cisco-ai-defense/a2a-scanner","commit_stats":null,"previous_names":["cisco-ai-defense/a2a-scanner"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/cisco-ai-defense/a2a-scanner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-ai-defense%2Fa2a-scanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-ai-defense%2Fa2a-scanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-ai-defense%2Fa2a-scanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-ai-defense%2Fa2a-scanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cisco-ai-defense","download_url":"https://codeload.github.com/cisco-ai-defense/a2a-scanner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cisco-ai-defense%2Fa2a-scanner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29361810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-12T01:03:07.613Z","status":"online","status_checked_at":"2026-02-12T02:00:06.911Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["a2a-protocol","a2a-server","agent-security","security-scanner"],"created_at":"2025-12-22T14:00:22.229Z","updated_at":"2026-02-12T07:50:47.402Z","avatar_url":"https://github.com/cisco-ai-defense.png","language":"Python","funding_links":[],"categories":["Defense \u0026 Security Controls","⚔️ Red Teaming \u0026 Vulnerability Scanners","🛠️ Tools \u0026 Utilities"],"sub_categories":["Model \u0026 Artifact Scanning"],"readme":"# A2A Security Scanner\n\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Python](https://img.shields.io/badge/Python-3.11%2B-blue)](https://www.python.org/)\n[![PyPI](https://img.shields.io/pypi/v/cisco-ai-a2a-scanner)](https://pypi.org/project/cisco-ai-a2a-scanner/)\n[![UV](https://img.shields.io/badge/uv-compatible-green)](https://github.com/astral-sh/uv)\n\n**Scan Agent-to-Agent (A2A) protocol implementations for security threats and vulnerabilities.**\n\n---\n\n## Overview\n\nThe A2A Security Scanner provides comprehensive security analysis for Agent-to-Agent protocol implementations. It combines static analysis, runtime monitoring, and AI-powered semantic detection to identify security threats across the A2A protocol stack.\n\n### Key Features\n\n- **Multiple Specialized Analyzers**: YARA rules, spec validation, heuristics, LLM-powered detection, and endpoint testing\n- **Multiple Threat Categories**: Complete coverage of A2A threat taxonomy\n- **REST API**: Easy integration into CI/CD pipelines and applications\n- **CLI Tools**: Command-line interface for manual security audits\n- **Agent Card Validation**: A2A protocol compliance checking\n\n---\n\n## Installation\n\n### Prerequisites\n\n- Python 3.11+\n- uv (Python package manager) - recommended\n- LLM Provider API Key (optional, for LLM analyzer)\n\n### Installing as a CLI Tool\n\n```bash\n# Install UV\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n# or: brew install uv\n\nuv tool install --python 3.13 cisco-ai-a2a-scanner\n\n# Verify installation\na2a-scanner list-analyzers\n```\n\nAlternatively, you can install from source:\n\n```bash\nuv tool install --python 3.13 --from git+https://github.com/cisco-ai-defense/a2a-scanner cisco-ai-a2a-scanner\n\n# Verify installation\na2a-scanner list-analyzers\n```\n\n### Installing for Local Development\n\n```bash\ngit clone https://github.com/cisco-ai-defense/a2a-scanner.git\ncd a2a-scanner\n\n# Install UV (if not already installed)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n# or: brew install uv\n\nuv sync\n\n# Activate virtual environment\nsource .venv/bin/activate  # Linux/macOS\n# .venv\\Scripts\\activate   # Windows\n\n# Verify installation\na2a-scanner list-analyzers\n```\n\n### Install as a Dependency in Other Projects\n\nAdd A2A Scanner as a dependency using uv. From your project root (initialize with uv if needed):\n\n```bash\nuv init  # if not already done\nuv add cisco-ai-a2a-scanner\n# then activate the virtual environment:\n# macOS and Linux: source .venv/bin/activate\n# Windows CMD: .venv\\Scripts\\activate\n# Windows PWSH: .venv\\Scripts\\Activate.ps1\nuv sync\n```\n\nThe module name is `a2ascanner`. Import this module with:\n\n```python\n# import everything (not recommended)\nimport a2ascanner\n\n# selective imports (recommended). For example:\nfrom a2ascanner import Scanner, Config\nfrom a2ascanner.core.models import ThreatSeverity\n```\n\n---\n\n## Quick Start\n\n### Scan an Agent Card\n\n```bash\n# Scan a JSON agent card file\na2a-scanner scan-card examples/sample_agent_cards/unsafe_agent.json\n\n# Scan with specific analyzers\na2a-scanner scan-card agent.json --analyzers yara,spec\n\n# JSON output\na2a-scanner scan-card agent.json --output results.json\n```\n\n### Scan Source Code\n\n```bash\n# Scan a directory\na2a-scanner scan-directory /path/to/agent/code\n\n# Scan a single file\na2a-scanner scan-file agent.py\n\n# Scan with pattern\na2a-scanner scan-directory ./agents --pattern \"**/*.py\"\n```\n\n### Scan Live Agent Endpoint\n\n```bash\n# Scan a running agent\na2a-scanner scan-endpoint https://agent.example.com/api\n\n# With authentication\na2a-scanner scan-endpoint https://agent.example.com/api --bearer-token \"$TOKEN\"\n```\n\n### 🎮 Try Interactive Demo\n\nWant to see the analyzers in action? Run the interactive demo:\n\n```bash\n# Interactive demo with sample data\nuv run python examples/interactive_demo.py --dev\n\n# Or use the comprehensive automated demo\nuv run python examples/comprehensive_demo.py\n```\n\nThe interactive demo lets you test all analyzers (YARA, Spec, Heuristic, LLM, Endpoint) with:\n- Built-in sample malicious agent cards\n- Live endpoint testing (try `http://localhost:9998`)\n- Color-coded threat severity display\n- Session summary with aggregate statistics\n\nSee [Demonstrations](#demonstrations) section for full details.\n\n---\n\n## Development Mode\n\nFor local development and testing, use the `--dev` flag to relax security checks:\n\n### What Dev Mode Does\n\nWhen `--dev` is enabled, the scanner allows:\n- **Localhost URLs** (`http://localhost:8000`)\n- **Private IP addresses** (`http://192.168.1.1`, `http://10.0.0.x`)\n- **Self-signed SSL certificates** (skips verification)\n- **HTTP connections** (without flagging as insecure)\n\n### CLI Usage\n\n```bash\n# Scan local agent endpoint\na2a-scanner --dev scan-endpoint http://localhost:8000\n\n# Scan with debug logging\na2a-scanner --dev --debug scan-endpoint http://localhost:9999\n\n# Scan agent card from local URL\na2a-scanner --dev scan-card agent.json\n```\n\n### API Server with Dev Mode\n\n```bash\n# Enable dev mode via environment variable\nexport A2A_SCANNER_DEV_MODE=true\n\n# Start API server\na2a-scanner-api --reload\n\n# Now all API requests allow localhost and skip SSL verification\ncurl -X POST http://localhost:8000/scan/endpoint \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"endpoint_url\": \"http://localhost:8000\"}'\n```\n\n### Programmatic Usage\n\n```python\nfrom a2ascanner.config.config import Config\nfrom a2ascanner.core.scanner import Scanner\n\n# Enable dev mode\nconfig = Config(dev_mode=True)\nscanner = Scanner(config)\n\n# Scan localhost endpoint\nresult = await scanner.scan_endpoint(\"http://localhost:8000\")\n```\n\n### ⚠️ Security Warning\n\n**DO NOT USE `--dev` IN PRODUCTION!**\n\nDev mode disables critical security features:\n- SSRF protection for localhost and private IPs\n- SSL certificate verification\n- Secure protocol enforcement\n\nUse dev mode only in:\n- Local development environments\n- Internal testing networks\n- CI/CD pipelines (isolated)\n\nSee [`DEV_MODE_GUIDE.md`](https://github.com/cisco-ai-defense/a2a-scanner/blob/main/DEV_MODE_GUIDE.md) for complete documentation.\n\n---\n\n## CLI Usage\n\nThe scanner provides several commands for different scanning scenarios:\n\n### Commands\n\n- **`scan-card`**: Scan an agent card JSON file\n- **`scan-file`**: Scan a single source code file\n- **`scan-directory`**: Scan a directory of files\n- **`scan-endpoint`**: Scan a live agent endpoint\n- **`scan-registry`**: Scan agents from a registry\n- **`list-analyzers`**: List available analyzers\n\n### Common Options\n\n```bash\n# Development mode (allows localhost, skips SSL verification)\n--dev                       # Enable for local testing\n\n# Debug and logging\n--debug                     # Enable debug logging\n\n# Select specific analyzers\n--analyzers yara,spec,heuristic,llm,endpoint\n\n# Output formats\n--output results.json       # JSON output\n--verbose                   # Detailed output\n\n# Pattern matching\n--pattern \"*.py\"           # File pattern matching\n\n# Authentication\n--bearer-token TOKEN       # Bearer token for endpoints\n--no-verify-ssl            # Skip SSL verification (or use --dev)\n```\n\n### Examples\n\n#### Scan with YARA Rules Only\n\n```bash\na2a-scanner scan-card agent.json --analyzers yara\n```\n\n#### Scan with LLM Analyzer\n\n```bash\n# Configure LLM (Azure OpenAI)\nexport A2A_SCANNER_LLM_PROVIDER=azure\nexport A2A_SCANNER_LLM_API_KEY=your-key\nexport A2A_SCANNER_LLM_MODEL=gpt-4\nexport A2A_SCANNER_LLM_BASE_URL=https://your-instance.openai.azure.com\n\n# Scan with LLM\na2a-scanner scan-card agent.json --analyzers llm\n```\n\n#### Scan Multiple Files\n\n```bash\n# Scan all Python files in agents directory\na2a-scanner scan-directory ./agents --pattern \"**/*.py\"\n```\n\n---\n\n## API Server Usage\n\nThe API server provides a REST interface for integrating security scanning into applications and pipelines.\n\n### Start the Server\n\n```bash\n# Start on default port (8000)\na2a-scanner-api\n\n# Custom host and port\na2a-scanner-api --host 0.0.0.0 --port 8080\n\n# Development mode with auto-reload\na2a-scanner-api --reload\n\n# Enable dev mode for local testing (allows localhost, skips SSL)\nexport A2A_SCANNER_DEV_MODE=true\na2a-scanner-api --reload\n```\n\n### API Endpoints\n\nOnce running, the API provides:\n\n- **`POST /scan/agent-card`** - Scan an agent card JSON\n- **`POST /scan/source-code`** - Scan source code\n- **`POST /scan/endpoint`** - Scan a live agent endpoint\n- **`POST /scan/full`** - Full scan (all methods)\n- **`GET /health`** - Health check endpoint\n- **`GET /`** - API documentation\n\n### Example API Request\n\n```bash\n# Scan an agent card\ncurl -X POST http://localhost:8000/scan/agent-card \\\n  -H \"Content-Type: application/json\" \\\n  -d @agent_card.json\n\n# Scan source code\ncurl -X POST http://localhost:8000/scan/source-code \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"source_path\": \"/path/to/code\"}'\n```\n\nInteractive API documentation is available at `http://localhost:8000/docs` when the server is running.\n\n---\n\n## Threat Detection\n\nThe scanner detects threats across the entire A2A protocol stack:\n\n### Detection Methods\n\n#### 1. YARA Rules\n\nStatic pattern matching for detecting malicious patterns in agent cards, including agent impersonation, prompt injection, capability abuse, data exfiltration, routing manipulation, and tool poisoning attacks.\n\n**Location**: `a2ascanner/data/yara_rules/`\n\n#### 2. Spec Analyzer\n\nValidates A2A protocol compliance:\n\n- Required field validation\n- Data type checking\n- URL format validation\n- Skill structure verification\n- Capability validation\n\n#### 3. Heuristic Analyzer\n\nLogic-based detection:\n\n- Suspicious URL patterns\n- Cloud metadata access\n- Command execution patterns\n- Credential harvesting indicators\n\n#### 4. LLM Analyzer\n\nAI-powered semantic analysis:\n\n- Intent classification\n- Context grounding\n- Subtle manipulation detection\n- Anomaly detection\n\n#### 5. Endpoint Analyzer\n\nDynamic security testing of running A2A agent endpoints to verify security posture and protocol compliance.\n\n**Security Checks:**\n- **HTTPS enforcement** - Verifies secure protocol usage (flags HTTP endpoints)\n- **Security headers validation** - Checks for X-Content-Type-Options, X-Frame-Options, HSTS\n- **Agent card presence** - Validates card exists at standard locations (/.well-known/agent-card.json)\n- **URL mismatch detection** - Ensures agent card URL matches endpoint URL\n- **Health endpoint checks** - Verifies /health or /healthz endpoints exist\n- **Network reachability** - Tests endpoint accessibility and response time\n- **Protocol compliance** - Validates A2A protocol adherence\n\n**Usage - CLI:**\n\n```bash\n# Basic endpoint scan\na2a-scanner scan-endpoint https://agent.example.com/api\n\n# With authentication\na2a-scanner scan-endpoint https://agent.example.com/api \\\n  --bearer-token \"your-token-here\"\n\n# Scan with custom timeout\na2a-scanner scan-endpoint https://agent.example.com/api \\\n  --timeout 60\n\n# Local development endpoint (requires --dev flag)\na2a-scanner --dev scan-endpoint http://localhost:8080\n\n# Skip SSL verification (not recommended for production)\na2a-scanner scan-endpoint https://agent.example.com/ \\\n  --no-verify-ssl\n\n# Save results to JSON\na2a-scanner scan-endpoint https://agent.example.com/api \\\n  --output results.json\n```\n\n**Usage - Programmatic:**\n\n```python\nfrom a2ascanner.core.scanner import Scanner\nfrom a2ascanner.config.config import Config\nimport asyncio\n\nasync def scan_agent_endpoint():\n    # Create scanner instance\n    config = Config(dev_mode=False)  # Set to True for localhost\n    scanner = Scanner(config)\n    \n    # Scan endpoint\n    result = await scanner.scan_endpoint(\n        endpoint_url=\"https://agent.example.com/api\",\n        bearer_token=\"your-token\",  # Optional\n        timeout=30.0,               # Optional\n        verify_ssl=True             # Optional\n    )\n    \n    # Check results\n    if result.threats:\n        print(f\"Found {len(result.threats)} security issues:\")\n        for threat in result.threats:\n            print(f\"  [{threat.severity}] {threat.summary}\")\n    else:\n        print(\"Endpoint passed all security checks!\")\n    \n    return result\n\n# Run the scan\nasyncio.run(scan_agent_endpoint())\n```\n\n**Usage - API Server:**\n\n```bash\n# Scan endpoint via REST API\ncurl -X POST http://localhost:8000/scan/endpoint \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"endpoint_url\": \"https://agent.example.com/api\",\n    \"bearer_token\": \"your-token\",\n    \"timeout\": 30,\n    \"verify_ssl\": true\n  }'\n```\n\n**Use Cases:**\n- **Production audits** - Regular security assessments of live agent endpoints\n- **CI/CD integration** - Automated security checks before deployment\n- **Continuous monitoring** - Periodic health and security validation\n- **Pre-deployment validation** - Security verification before going live\n- **Compliance checking** - Ensure endpoints meet security standards\n- **Registry validation** - Verify agents in registry are properly configured\n\n**Common Issues Detected:**\n\n| Issue | Severity | Description |\n|-------|----------|-------------|\n| Endpoint unreachable | HIGH | Agent endpoint is not responding or network error |\n| Insecure HTTP | HIGH | Endpoint uses HTTP instead of HTTPS |\n| Missing agent card | MEDIUM | No agent card found at standard locations |\n| URL mismatch | MEDIUM | Agent card URL doesn't match endpoint URL |\n| Missing security headers | MEDIUM | Missing X-Content-Type-Options, X-Frame-Options, or HSTS |\n| No health endpoint | LOW | Missing /health or /healthz monitoring endpoint |\n\n**Dev Mode for Local Testing:**\n\nWhen testing local development endpoints, use `--dev` flag:\n\n```yaml\n# .github/workflows/security-scan.yml\nname: A2A Security Scan\n\non:\n  push:\n    branches: [main]\n  pull_request:\n\njobs:\n  endpoint-scan:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n      \n      - name: Set up Python\n        uses: actions/setup-python@v4\n        with:\n          python-version: '3.11'\n      \n      - name: Install uv\n        run: curl -LsSf https://astral.sh/uv/install.sh | sh\n      \n      - name: Install A2A Scanner\n        run: uv tool install --python 3.13 cisco-ai-a2a-scanner\n      \n      - name: Scan endpoint\n        run: |\n          a2a-scanner scan-endpoint \\\n            ${{ secrets.AGENT_ENDPOINT_URL }} \\\n            --bearer-token ${{ secrets.AGENT_TOKEN }} \\\n            --output scan-results.json\n      \n      - name: Upload results\n        uses: actions/upload-artifact@v3\n        with:\n          name: security-scan-results\n          path: scan-results.json\n```\n\n---\n\n## Configuration\n\n### Environment Variables\n\nConfigure the scanner using environment variables:\n\n```bash\n# LLM Analyzer Configuration\nexport A2A_SCANNER_LLM_PROVIDER=azure      # azure or openai\nexport A2A_SCANNER_LLM_API_KEY=your-key\nexport A2A_SCANNER_LLM_MODEL=gpt-4\nexport A2A_SCANNER_LLM_BASE_URL=https://your-instance.openai.azure.com\nexport A2A_SCANNER_LLM_API_VERSION=2025-01-01-preview\n\n# API Server Configuration\nexport A2A_SCANNER_API_HOST=0.0.0.0\nexport A2A_SCANNER_API_PORT=8000\n\n# Proxy Configuration\nexport A2A_SCANNER_PROXY_PORT=8080\n```\n\n### Configuration File\n\nAlternatively, use a `.env` file in the project root:\n\n```bash\ncp .env.example .env\n# Edit .env with your configuration\n```\n\n---\n\n## Testing\n\n### Validate Installation\n\n```bash\n# List available analyzers\na2a-scanner list-analyzers\n\n# Run health check\ncurl http://localhost:8000/health\n```\n\n### Test on Sample Agents\n\n```bash\n# Scan safe agent card\na2a-scanner scan-card examples/sample_agent_cards/safe_agent.json\n\n# Scan unsafe agent card\na2a-scanner scan-card examples/sample_agent_cards/unsafe_agent.json\n```\n\n### Run Test Suite\n\n```bash\n# Run all tests\npytest tests/\n\n# Run with coverage\npytest tests/ --cov=a2ascanner --cov-report=term\n\n# Run specific test file\npytest tests/test_api.py -v\n```\n\n---\n\n## For Developers\n\n### Demonstrations\n\n#### Comprehensive Analyzer Demo \n\nLocation: `examples/comprehensive_demo.py`\n\n**All-in-one demonstration showcasing all analyzers with professional terminal output.**\n\n```bash\n# Full interactive demo\nuv run python examples/comprehensive_demo.py\n\n# Quick mode (no pauses)\nuv run python examples/comprehensive_demo.py --quick\n\n# Test specific analyzer\nuv run python examples/comprehensive_demo.py --analyzer yara\n```\n\n\n#### Interactive Analyzer Demo \n\nLocation: `examples/interactive_demo.py`\n\n**Hands-on interactive demo where you provide the data to scan.**\n\n```bash\n# Run interactive demo with dev mode (for localhost testing)\nuv run python examples/interactive_demo.py --dev\n\n# Run without dev mode (production testing)\nuv run python examples/interactive_demo.py\n```\n\n**Available Analyzers:**\n1. **YARA** - Pattern-based threat detection using compiled YARA rules\n2. **Spec** - A2A protocol compliance validation (required fields, formats, structures)\n3. **Heuristic** - Logic-based security checks (URL patterns, superlative language)\n4. **Endpoint** - Live endpoint security audit (HTTPS, headers, health checks)\n5. **LLM** - AI-powered semantic analysis (requires API key configuration)\n\n**Input Options:**\n- **Agent Cards**: File path, direct JSON input, URL fetch, or sample malicious card\n- **Endpoints**: Custom URL with dev mode option for localhost testing\n\n\n\n\n**Example Session:**\n```bash\n$ uv run python examples/interactive_demo.py --dev\n\nSelect analyzer to test:\n  1. YARA      - Pattern-based threat detection\n  2. Spec      - A2A protocol compliance\n  3. Heuristic - Logic-based security checks\n  4. Endpoint  - Live endpoint security audit\n\nYour choice [1-4]: 2\n\nHow would you like to provide the agent card?\n  1. Path to JSON file\n  2. Direct JSON input\n  3. URL to fetch agent card\n  4. Use sample malicious agent card\n\nYour choice [1-4]: 4\n\nResults from SPEC Analyzer:\n⚠️  Found 3 potential threat(s):\n  • HIGH: Missing required field 'skills'\n  • MEDIUM: Invalid capabilities type\n  • LOW: Missing 'id' field\n```\n\n### Static Analysis Examples\nSee the `examples/` directory for static file analysis:\n- **Malicious agent card examples** - Various spoofing techniques\n- **Tool poisoning demonstrations** - Malicious tool definitions\n- **Registry poisoning examples** - Mass registration attacks\n\nExample threat files include:\n- `tool_poison.py` - Tool poisoning with exfiltration\n- `context_poison_writer.py` - Context contamination\n- `judge_persuade.py` - Routing manipulation\n\n---\n\n## 🛠️ Development\n\n### Setup Development Environment\n\n```bash\n# Clone repository\ngit clone https://github.com/cisco-ai-defense/a2a-scanner.git\ncd a2a-scanner\n\n# Install UV (if not already installed)\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n# or: brew install uv\n\n# Sync dependencies\nuv sync\n\n# Activate virtual environment\nsource .venv/bin/activate  # Linux/macOS\n# .venv\\Scripts\\activate   # Windows\n\n# Verify installation\na2a-scanner list-analyzers\n```\n\n### Running Tests\n\nAfter activating the virtual environment (`source .venv/bin/activate`):\n\n```bash\n# Run all tests\npytest tests/ -q\n\n# Verbose output\npytest tests/ -v\n\n# With coverage report\npytest tests/ --cov=a2ascanner --cov-report=term-missing\n\n# Run specific test categories\npytest tests/test_api.py          # API tests\npytest tests/test_analyzers.py    # Analyzer tests\npytest tests/test_yara.py         # YARA rule tests\npytest tests/test_heuristic.py    # Heuristic tests\n```\n\n\u003e **Note**: You can also use `uv run pytest tests/` without activating the virtual environment.\n\n### Managing Dependencies\n\n```bash\n# Add a runtime dependency\nuv add \u003cpackage-name\u003e\n\n# Add a development dependency\nuv add --dev \u003cpackage-name\u003e\n\n# Update all dependencies\nuv sync --upgrade\n\n# Remove a dependency\nuv remove \u003cpackage-name\u003e\n```\n\n### About UV\n\nUV is a fast Python package manager and environment manager written in Rust:\n\n- Fast dependency resolution (10-100x faster than pip)\n- Reproducible builds with lock files\n- Smart caching system\n- Automatic environment management\n- Built-in Python version management\n\n### Common Commands\n\n```bash\n# Activate virtual environment\nsource .venv/bin/activate  # Linux/macOS\n.venv\\Scripts\\activate     # Windows\n\n# Then use commands directly\na2a-scanner scan-card test.json\npytest tests/\npython script.py\n```\n\n---\n\n## Documentation\n\nFor detailed documentation, see the [docs/](https://github.com/cisco-ai-defense/a2a-scanner/tree/main/docs) directory:\n\n- **[CONTRIBUTING.md](https://github.com/cisco-ai-defense/a2a-scanner/blob/main/CONTRIBUTING.md)** - Contribution guidelines\n- **[DEV_MODE_GUIDE.md](https://github.com/cisco-ai-defense/a2a-scanner/blob/main/DEV_MODE_GUIDE.md)** - Development mode documentation\n- **[docs/architecture.md](https://github.com/cisco-ai-defense/a2a-scanner/blob/main/docs/architecture.md)** - System architecture\n- **[docs/analyzer_guide.md](https://github.com/cisco-ai-defense/a2a-scanner/blob/main/docs/analyzer_guide.md)** - Analyzer implementation guide\n- **[docs/usage_guide.md](https://github.com/cisco-ai-defense/a2a-scanner/blob/main/docs/usage_guide.md)** - Comprehensive usage guide\n- **[docs/testing_guide.md](https://github.com/cisco-ai-defense/a2a-scanner/blob/main/docs/testing_guide.md)** - Testing documentation\n- **[docs/a2a-threats-taxonomy.md](https://github.com/cisco-ai-defense/a2a-scanner/blob/main/docs/a2a-threats-taxonomy.md)** - A2A threat taxonomy reference\n- **[docs/scanner_placement_guide.md](https://github.com/cisco-ai-defense/a2a-scanner/blob/main/docs/scanner_placement_guide.md)** - Scanner placement strategies\n\n---\n\n\n## Contact Cisco for AI Defense\n\nFor enterprise-grade A2A security solutions and support:\n\n**Cisco AI Defense**: https://www.cisco.com/site/us/en/products/security/ai-defense/index.html\n\n---\n\n## License\n\nDistributed under the Apache 2.0 License. See [LICENSE](https://github.com/cisco-ai-defense/a2a-scanner/blob/main/LICENSE) for more information.\n\nCopyright 2025 Cisco Systems, Inc. and its affiliates\n\n---\n\n## Related Projects\n\n- **[A2A Protocol](https://github.com/a2aproject/A2A)** - Official A2A specification\n- **[A2A Samples](https://github.com/a2aproject/a2a-samples)** - Example agent implementations\n\n---\n\n## About\n\n**A2A Security Scanner** provides comprehensive security analysis for Agent-to-Agent protocol implementations, combining static analysis, runtime monitoring, and AI-powered detection to identify vulnerabilities across the A2A protocol stack.\n\n### Topics\n\n`security` `ai` `a2a` `agents` `yara` `llm` `threat-detection`\n\n---\n\n*Project Link: https://github.com/cisco-ai-defense/a2a-scanner*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-ai-defense%2Fa2a-scanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcisco-ai-defense%2Fa2a-scanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcisco-ai-defense%2Fa2a-scanner/lists"}