Back to skill

Security audit

A2a Protocol

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent A2A communication client, but it needs Review because it can send bearer tokens and message/task contents to arbitrary registries without enforcing HTTPS or clearly warning users.

Install only if you are comfortable with an A2A client that sends agent metadata, messages, tasks, and optional bearer tokens to the registry URL you configure. Use HTTPS for any non-local registry, avoid sending secrets in messages or tasks, prefer a virtual environment with pinned dependencies, and treat the missing a2a.ps1 wrapper as a packaging/documentation issue to resolve before operational use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
a2a_client.py:14
Finding
Bearer Token and Sensitive A2A Traffic Can Be Transmitted Over Plaintext HTTP<![CDATA[ ## Vulnerability Details **File Location**: `a2a_client.py`, lines 14 and 20-25 **Vulnerability Type**: Plaintext transmission of authentication credentials and sensitive data **Risk Level**: Medium ### Vulnerable Code ```python DEFAULT_REGISTRY = "http://localhost:8000" class A2AClient: """Client for A2A Protocol communication""" def __init__(self, registry_url=DEFAULT_REGISTRY, api_key=None): self.registry_url = registry_url.rstrip("/") self.session = requests.Session() if api_key: self.session.headers["Authorization"] = f"Bearer {api_key}" ``` ### Technical Analysis The client accepts an unrestricted registry URL and automatically adds the supplied API key to the session's `Authorization` header. It does not require HTTPS when authentication is enabled. Although the default URL is a loopback address, callers can provide an arbitrary remote `http://` URL through the constructor or the `--registry-url` command-line option. Requests to such a registry transmit the bearer token without transport encryption. Messages, task descriptions, task results, and agent registration information sent through the same connection are also exposed. The session-wide authorization header can additionally be exposed if request handling follows a redirect in an unsafe deployment scenario. The implementation does not independently enforce a trusted destination or an HTTPS-only redirect policy. ### Attack Path 1. A victim receives or configures a remote A2A registry URL using the `http://` scheme. 2. The victim supplies an API key through the `--api-key` option or the `A2AClient` constructor. 3. The constructor stores the key in the session-wide `Authorization: Bearer ...` header. 4. The victim performs an A2A operation such as agent registration, message submission, or task submission. 5. The request and bearer token travel over an unencrypted network connection. 6. An attacker able to observe or manipulate the n ...[truncated 704 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Require an `https://` registry URL whenever an API key is configured. 2. Allow plaintext HTTP only for explicitly validated loopback development addresses such as `127.0.0.1`, `::1`, or `localhost`. 3. Reject URLs containing unexpected user information, unsupported schemes, or untrusted destinations. 4. Apply an explicit redirect policy and prevent credentials from being forwarded to a different origin. 5. Provide a deliberate development-only override if plaintext transport is necessary, and display a clear warning when it is enabled. 6. Use certificate verification, which `requests` enables by default, and do not introduce a `verify=False` bypass. Example validation: ```python from urllib.parse import urlparse parsed = urlparse(registry_url) is_loopback = parsed.hostname in {"localhost", "127.0.0.1", "::1"} if api_key and parsed.scheme != "https" and not is_loopback: raise ValueError("HTTPS is required when API-key authentication is enabled") ``` ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:25
Finding
Third-Party Dependencies Are Installed Without Version or Integrity Pinning<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 25-28 **Vulnerability Type**: Unpinned dependency installation and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```powershell # Install Python dependencies pip install requests sseclient-py ``` ### Technical Analysis The installation instructions retrieve `requests` and `sseclient-py` without fixed versions or cryptographic hashes. Consequently, the effective code installed by users can change after the skill has been reviewed. Installation depends on the current package-index resolution state rather than a reproducible, audited dependency set. If a future package release or package-distribution account is compromised, users following these instructions may install attacker-controlled code. Python packages can execute code during installation or later when imported. The documented `sseclient-py` dependency is not used by the supplied `a2a_client.py`, unnecessarily increasing the dependency and supply-chain attack surface. There is no evidence that either named package is currently malicious. The vulnerability is the unsafe, non-reproducible dependency installation practice. ### Attack Path 1. An attacker compromises a dependency release, its publishing account, or the package source used by the victim. 2. The compromised package is published under a version satisfying the unrestricted installation command. 3. A user follows the documented `pip install requests sseclient-py` instruction. 4. `pip` resolves and downloads the attacker-controlled release because no reviewed version or hash is required. 5. Malicious package code executes during installation or when the package is subsequently imported. 6. The code runs with the privileges of the account or environment performing the installation. ### Impact Assessment Compromised dependency code could obtain the full privileges of the user running `pip` or the client. Depending on that environment, potential impact ...[truncated 469 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create a reviewed requirements or lock file containing exact dependency versions. 2. Generate and verify cryptographic hashes for every package and transitive dependency. 3. Install with hash enforcement, for example: ```powershell python -m pip install --require-hashes -r requirements.txt ``` 4. Use a trusted and controlled package index where practical. 5. Regularly scan pinned dependencies for disclosed vulnerabilities and update them through a reviewed process. 6. Remove `sseclient-py` unless streaming support that actually imports and uses it is implemented. 7. Install dependencies inside a dedicated virtual environment under a non-administrative account. 8. Keep the lock file in the audited project so that the reviewed dependency set is reproducible. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (3)

Lp3

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding
The skill clearly describes network-capable behavior, including communicating with remote agents, registering endpoints, and sending tasks, but it does not declare an explicit tool scope such as permissions or allowed-tools. This creates a governance and review gap: consumers may enable the skill without understanding that it can initiate outbound network communications, increasing the risk of unintended data exfiltration or unsafe remote interactions.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The skill advertises sending messages and tasks to remote agents, but it does not warn users that task content, agent metadata, or other prompt data may leave the local environment. In an agent-to-agent protocol skill, this omission is especially important because users may submit sensitive instructions or context that are then transmitted to third-party services.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This code sends user-provided message content and task descriptions over HTTP via the A2A registry, but there is no confirmation prompt or explicit user-facing disclosure that the supplied content will be transmitted to external services. While network communication is central to the client’s purpose, the specific data-sharing behavior for message and task payloads is not disclosed in the command flow or CLI help.

Static analysis

No suspicious patterns detected.