Back to skill

Security audit

Pilot A2a Bridge

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent Pilot A2A bridge, but its example listener accepts remote tasks and returns results without documenting sender trust, validation, limits, or safe JSON handling.

Review before installing or using in automation. Only run this with trusted Pilot peers, add sender allowlists and message schema validation, constrain payload size and processing time, serialize outbound JSON safely, and keep the daemon/listener under explicit user control.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:62
Finding

Unauthenticated Remote Task Processing and Unsafe JSON Construction

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 62–73
Vulnerability Type: Missing peer authorization, insufficient input validation, and unsafe output serialization
Risk Level: Medium

Vulnerable Code

bash
while true; do
  MSG=$(pilotctl --json recv 5000 --timeout 30s)
  TYPE=$(echo "$MSG" | jq -r '.type')
  SENDER=$(echo "$MSG" | jq -r '.sender')

  case "$TYPE" in
    task)
      RESULT=$(process_task "$(echo "$MSG" | jq -r '.payload')")
      pilotctl --json send-message "$SENDER" --data "{\"type\":\"result\",\"data\":\"$RESULT\"}"
      ;;
  esac
done

Technical Analysis

The documented workflow accepts messages from the bridge and invokes process_task whenever the remotely controlled type field equals task. It does not authenticate or allowlist the sender, authorize the requested task, validate the message against a strict schema, limit payload size, or enforce processing time and resource limits.

Encryption and network tunneling do not, by themselves, prove that every reachable peer is authorized to submit work. A malicious or compromised peer could therefore supply hostile data to the undefined process_task handler. The precise downstream consequence depends on that handler; arbitrary command execution cannot be confirmed from the reviewed file alone.

The workflow also inserts RESULT directly into a JSON string. Quotes, backslashes, newlines, and other control characters in the result are not escaped. This can produce malformed JSON or allow the result to alter the structure of the outbound protocol message.

Attack Path

  1. An attacker obtains access to the Pilot overlay, controls a connected peer, or otherwise becomes capable of sending a message to the listener.
  2. The attacker submits a message whose type field is task and whose payload contains malicious, oversized, or computationally expensive input.
  3. The listener accepts the message witho ...[truncated 1077 chars]
Remediation
View remediation

Remediation Suggestions

  1. Authenticate peers using cryptographically verified identities supplied by the transport.
  2. Maintain an explicit allowlist of senders permitted to submit tasks.
  3. Authorize permitted actions separately for each sender rather than treating tunnel access as task authorization.
  4. Validate every message against a strict schema, including required fields, accepted types, allowed actions, data types, and maximum lengths.
  5. Enforce payload-size, execution-time, concurrency, and resource limits to reduce denial-of-service risk.
  6. Ensure process_task treats payloads strictly as data and never evaluates them as shell commands, code, templates, or unparameterized queries.
  7. Construct outbound JSON with a serializer rather than string interpolation:
bash
DATA=$(jq -n \
  --arg type "result" \
  --arg data "$RESULT" \
  '{type: $type, data: $data}')

pilotctl --json send-message "$SENDER" --data "$DATA"
  1. Reject malformed input and log authorization failures without recording sensitive payload contents.
  2. Document the authentication and authorization guarantees expected from pilotctl and fail closed when peer identity cannot be verified.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (2)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file includes a command that sends JSON payload data to a remote agent, which is a network operation that may transmit user or system data. The skill description does not provide any warning about privacy, sensitivity of transmitted data, or the need to verify recipients before sending.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The workflow continuously accepts remote messages, extracts attacker-controlled fields, processes payload data, and sends results back without any authentication, authorization, schema validation, rate limiting, or warning about untrusted input. In an agent-bridging context, this can enable unauthorized task invocation, abuse of downstream processing logic, data exfiltration via crafted tasks, or denial of service through repeated or malformed messages.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.