# A2A Agent Card Security Scanner: Identity, Auth & SSRF (`neon_innovation_lab/a2a-agent-card-security-scanner`) Actor

Automated security linter for Agent2Agent (A2A) Agent Cards (/.well-known/agent-card.json). Audits cryptographic JWS signatures, SSRF risks, prompt injections, and unauthenticated dangerous primitives.

- **URL**: https://apify.com/neon_innovation_lab/a2a-agent-card-security-scanner.md
- **Developed by:** [Neon Innovation Lab](https://apify.com/neon_innovation_lab) (community)
- **Categories:** Agents, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$15.00 / 1,000 agent card security audits

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## A2A Agent Card Security Scanner: Audit Identity, Auth & SSRF

Automated cloud DevSecOps security linter and compliance auditor for the **Linux Foundation LF AI & Data / Google Cloud Agent2Agent (A2A) Protocol**. Inspects public and staging `/.well-known/agent-card.json` endpoints to identify cryptographic spoofing, internal SSRF exposure, unauthenticated dangerous primitives, and prompt injection attacks in seconds.

***

### ⚡ What is the A2A Agent Card Security Scanner?

The **A2A Agent Card Security Scanner** provides zero-friction, automated security surveillance for autonomous AI agent networks. As enterprise multi-agent meshes scale across corporate boundaries, an agent's digital identity and access contract are governed exclusively by its **Agent Card** (`/.well-known/agent-card.json`).

This Actor continuously audits Agent Cards against the normative security requirements defined in **A2A Specification §8 & §13**, producing normalized **Trust Scores (0–100)**, letter grades (A+ through F), and structured compliance findings for DevSecOps, compliance teams, and agent orchestrators.

***

### 💰 Transparent Pay-Per-Event (PPE) Pricing

| Action / Event | Cost | Details |
|---|---|---|
| **Actor Initialization (`apify-actor-start`)** | **$0.03** | Charged once per run container startup. |
| **Card Audited (`card-audited`)** | **$0.05** | Billed only upon successful audit of a live Agent Card. |
| **Dataset Item Export (`apify-default-dataset-item`)** | **$0.002** | Automatic per-row dataset export fee. |
| **Unreachable / 404 Targets** | **$0.00** | Strict zero-charge guarantee for failed network fetches. |

***

### 🛡️ The 10 Audited Security Threat Vectors

| Rule ID | Severity | Category | What is Detected |
|---|---|---|---|
| `A2A-SEC-001` | **CRITICAL** | `AGENT_SPOOFING` | **Unsigned Agent Card**: Missing cryptographic JWS signatures in `signatures`. Violates RFC 7515. |
| `A2A-SEC-002` | **CRITICAL** | `CRYPTO_INTEGRITY` | **Insecure Signature**: Algorithm is `none` or symmetric `HS256`, or `jku` origin does not match provider domain. |
| `A2A-SEC-003` | **HIGH** | `CLEARTEXT_TRANSPORT` | **Insecure HTTP**: Any endpoint in `supportedInterfaces`, provider, or auth metadata uses `http://` instead of `https://`. |
| `A2A-SEC-004` | **CRITICAL** | `SSRF_EXPOSURE` | **Internal SSRF Exposure**: Interface or webhook points to `localhost`, RFC 1918 private IPs, or cloud metadata (`169.254.169.254`). |
| `A2A-SEC-005` | **HIGH** | `PROMPT_INJECTION` | **Adversarial Directives**: System prompt override phrases or zero-width Unicode obfuscation detected in metadata or skill examples. |
| `A2A-SEC-006` | **HIGH** | `DANGEROUS_PRIMITIVES` | **Unauthenticated Dangerous Skills**: High-privilege actions (shell, sql, payments) lack `securityRequirements`. |
| `A2A-SEC-007` | **MEDIUM** | `DEPRECATED_AUTH` | **Deprecated OAuth Flows**: Declares `implicit` or `password` (ROPC) flows, officially deprecated in `a2a.proto`. |
| `A2A-SEC-008` | **MEDIUM** | `CREDENTIAL_LEAK` | **Query Param API Key**: API key location is `"query"`, exposing secrets in web server logs and HTTP referrers. |
| `A2A-SEC-009` | **HIGH** | `CAPABILITY_ESCALATION` | **Unauthenticated Extended Card**: Declares `extendedAgentCard: true` without required authentication schemes. |
| `A2A-SEC-010` | **LOW** | `SPEC_COMPLIANCE` | **Schema Compliance**: Missing REQUIRED Protobuf fields (`name`, `description`, `version`, `supportedInterfaces`, `skills`). |

***

### ⚖️ Competitor Benchmark

| Feature | A2A Security Scanner (This Actor) | Cisco `a2a-scanner` | Manual Security Review |
|---|---|---|---|
| **Deployment Model** | 1-Click Apify Cloud / Scheduled Cron | Self-hosted Python 3.11+ / UV | Manual penetration testing |
| **Audit Speed** | **< 3 seconds per card** | 20–45 seconds | Hours to days |
| **LLM Token Cost** | **$0.00 (Zero-Token AST)** | High ($0.05–$0.20 per scan) | High consulting fees |
| **Automated Alerts** | Slack, Webhooks, PagerDuty | Requires custom integration | Email reports |
| **SARIF Export** | Available via companion CLI | Custom JSON only | PDF reports |

***

### 💻 Integration Examples

#### Python (`apify-client`)

```python
from apify_client import ApifyClient

client = ApifyClient('YOUR_APIFY_TOKEN')

run_input = {
    "agentCardUrls": [
        "https://agent.example.com/.well-known/agent-card.json"
    ],
    "strictMode": True,
    "failOn": "HIGH"
}

run = client.actor("neon_innovation_lab/a2a-agent-card-security-scanner").call(run_input=run_input)

for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(f"Agent: {item['agentName']} | Score: {item['trustScore']}/100 | Grade: {item['grade']} | Verdict: {item['verdict']}")
    for finding in item["findings"]:
        print(f"  [{finding['severity']}] {finding['ruleName']}: {finding['message']}")
```

#### Node.js (`apify-client`)

```javascript
import { ApifyClient } from 'apify-client';

const client = new ApifyClient({ token: 'YOUR_APIFY_TOKEN' });

const run = await client.actor('neon_innovation_lab/a2a-agent-card-security-scanner').call({
  agentCardUrls: ['https://agent.example.com/.well-known/agent-card.json'],
  strictMode: false,
  failOn: 'HIGH'
});

const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach(report => {
  console.log(`${report.agentName}: Grade ${report.grade} (${report.trustScore}/100) - ${report.verdict}`);
});
```

### More from Neon Innovation Lab

- [MCP Server Security Scanner](https://apify.com/neon_innovation_lab/mcp-security-auditor): audit MCP servers for SSRF, prompt injection and unsafe file access.
- [Zero-Trust MCP Gateway](https://apify.com/neon_innovation_lab/zero-trust-mcp-gateway): redact secrets and PII and block risky calls in front of an MCP server.
- [DevOps & Cloud Code Auditor](https://apify.com/neon_innovation_lab/devops-code-auditor): find cloud cost leaks, table-locking migrations and OWASP gaps.
- [Google Maps Leads Scraper](https://apify.com/neon_innovation_lab/google-maps-b2b-lead-enricher): businesses from Google Maps with phones, websites and emails found on their sites.

# Actor input Schema

## `agentCardUrls` (type: `array`):

List of URLs pointing to /.well-known/agent-card.json to audit for security vulnerabilities.

## `strictMode` (type: `boolean`):

If enabled, fails (passed: false) on any MEDIUM severity findings in addition to CRITICAL and HIGH.

## `failOn` (type: `string`):

Minimum severity level that marks the audit verdict as failed.

## Actor input object example

```json
{
  "agentCardUrls": [
    "https://raw.githubusercontent.com/Ansarii/a2a-audit/main/fixtures/compliant-agent-card.json",
    "https://raw.githubusercontent.com/Ansarii/a2a-audit/main/fixtures/vulnerable-agent-card.json"
  ],
  "strictMode": false,
  "failOn": "HIGH"
}
```

# Actor output Schema

## `overview` (type: `string`):

View the verified audit reports and trust scores for all scanned Agent Cards.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "agentCardUrls": [
        "https://raw.githubusercontent.com/Ansarii/a2a-audit/main/fixtures/compliant-agent-card.json",
        "https://raw.githubusercontent.com/Ansarii/a2a-audit/main/fixtures/vulnerable-agent-card.json"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("neon_innovation_lab/a2a-agent-card-security-scanner").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "agentCardUrls": [
        "https://raw.githubusercontent.com/Ansarii/a2a-audit/main/fixtures/compliant-agent-card.json",
        "https://raw.githubusercontent.com/Ansarii/a2a-audit/main/fixtures/vulnerable-agent-card.json",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("neon_innovation_lab/a2a-agent-card-security-scanner").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "agentCardUrls": [
    "https://raw.githubusercontent.com/Ansarii/a2a-audit/main/fixtures/compliant-agent-card.json",
    "https://raw.githubusercontent.com/Ansarii/a2a-audit/main/fixtures/vulnerable-agent-card.json"
  ]
}' |
apify call neon_innovation_lab/a2a-agent-card-security-scanner --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,neon_innovation_lab/a2a-agent-card-security-scanner"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/rbKwLTXzsdfGW6cZi/builds/d1GLRNkhpk7ePfc3U/openapi.json
