Back to skill

Security audit

Agent Swarm Network

Security checks for vulnerabilities and agentic risk

Overview

This skill is for agent coordination, but it automatically saves and restores sensitive session context in plaintext and relies on a persistent network-capable daemon.

Install only if you intentionally want persistent cross-session agent memory and peer networking. Before use, pin and verify the Pilot Protocol build, disable or closely control auto-restore and auto-snapshot behavior where possible, treat restored inbox content as untrusted, secure and regularly clear ~/.pilot, and avoid storing secrets in sessions that may be snapshotted.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T02 · Agent Memory Poisoning

Error
Location
SKILL.md:409
Finding
Unvalidated Inbox Snapshots Are Automatically Restored into Future Agent Sessions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 409–410; related behavior at lines 132–138 **Vulnerability Type**: Persistent agent memory poisoning through unvalidated state restoration **Risk Level**: High ### Vulnerable Code Snippet ```markdown ### Rule 3: Auto-Restore on New Session On every new session start, check `pilotctl inbox` for the latest snapshot and restore context. ``` The corresponding restoration procedure states: ```markdown ### 1.2 Restore Context When a new session starts, read the previous session's snapshot: ```bash ~/.pilot/bin/pilotctl --json inbox ``` Returns a `messages` array sorted by `received_at`. Read the most recent `context_snapshot` type message. ``` ### Technical Analysis The skill instructs the agent to treat the most recent `context_snapshot` message as trusted session state and restore it automatically. No validation requirements are defined for: - The identity or authorization of the snapshot originator. - Whether the snapshot was locally generated or received from a peer. - A cryptographic signature or message authentication code bound to the expected agent. - The snapshot schema and permitted fields. - Instruction-like content embedded in the snapshot summary. - User confirmation before imported state affects a new session. The inbox is also used for incoming peer messages and can be written directly in single-node mode. Consequently, data received through a communication channel is promoted into persistent agent context without a clear trust-boundary check. A malicious or compromised peer could submit a snapshot whose summary contains instructions such as suppressing warnings, disclosing future task data, invoking tools, or forwarding files. Because restoration occurs at session startup, those instructions can continue affecting sessions after the original communication has ended. Transport encryption does not prevent this attack. Encryption protects data in transit but does not esta ...[truncated 1635 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Never automatically promote arbitrary inbox messages into trusted agent context. 2. Store locally generated snapshots in a directory separate from peer messages. 3. Sign snapshots with a dedicated local key and verify the signature before restoration. 4. Bind each snapshot to the expected agent identity, session identifier, creation time, schema version, and monotonic sequence number. 5. Maintain an allowlist of peer identities authorized to submit state, with remote state restoration disabled by default. 6. Parse snapshots using a strict schema and reject unknown fields, oversized values, executable content, and instruction-like control fields. 7. Treat restored summaries as quoted, untrusted data rather than system or developer instructions. 8. Display the snapshot origin, timestamp, and summary to the user and require confirmation before restoration. 9. Prevent replay and replacement by recording the last accepted snapshot identifier. 10. Provide a safe-start option that launches without loading persistent context and supports quarantining suspicious snapshots. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
README.md:102
Finding
Context Snapshots Persist Sensitive Session Data as Unencrypted JSON<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, line 102; corroborated by `manifest.json`, line 76 **Vulnerability Type**: Plaintext storage of sensitive session context **Risk Level**: High ### Vulnerable Code Snippet ```markdown | Inbox | `~/.pilot/inbox/` | **Data-at-Rest Vulnerability:** Context snapshots land here as unencrypted JSON and WILL contain PII, API keys, and session secrets. You MUST secure this folder (`chmod 700 ~/.pilot/`) and regularly clear out old snapshots to minimize data exposure. | ``` The manifest confirms the same behavior: ```json "Context snapshots are stored as plain JSON files locally in ~/.pilot/inbox/. Users MUST secure this directory (chmod 700) as snapshots may contain sensitive PII or API keys." ``` ### Technical Analysis The skill persistently serializes session context into plaintext JSON. The documentation explicitly recognizes that these snapshots may contain personally identifiable information, API keys, and session secrets. Directory permissions such as `chmod 700` are useful but do not provide data-at-rest confidentiality. They do not protect snapshots from: - Other processes running as the same operating-system user. - Compromise of the agent or daemon process. - Accidental inclusion in backups or filesystem snapshots. - Administrative users or offline disk access. - Overly broad backup, synchronization, or diagnostic collection tools. - Secrets retained longer than their intended lifetime. The standing order to snapshot before every session ends increases both the volume and retention of sensitive information. The project does not define secret redaction, encryption, retention limits, secure deletion, or a policy preventing credentials from being serialized. ### Attack Path 1. A user conducts an agent session containing credentials, private data, source code, or other sensitive context. 2. The skill creates a context snapshot at session end. 3. Sensitive values are serialized into a plai ...[truncated 1131 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Encrypt every snapshot at rest using an authenticated encryption scheme such as AES-256-GCM or XChaCha20-Poly1305. 2. Store encryption keys in the operating-system keychain, hardware-backed keystore, or a dedicated secrets manager rather than beside the snapshots. 3. Apply secret detection and redaction before serialization. At minimum, remove API keys, bearer tokens, cookies, passwords, private keys, and authorization headers. 4. Use a minimal allowlisted snapshot schema containing only information required for restoration. 5. Make snapshot creation opt-in for sessions containing sensitive data and show the user exactly what will be persisted. 6. Apply restrictive permissions to the directory and files, such as directory mode `0700` and file mode `0600`, using safe creation flags that prevent symlink following and overwrite races. 7. Define short retention limits and automatically delete expired snapshots. 8. Document backup exclusions and ensure encrypted backups if snapshots must be retained. 9. Provide a command to enumerate, inspect, revoke, and securely remove stored snapshots. 10. Rotate potentially exposed credentials after migrating from plaintext storage. ]]>

T08 · Insecure Dependencies

Warning
Location
README.md:44
Finding
Installation Instructions Build a Security-Critical Dependency from an Unpinned Upstream Branch<![CDATA[ ## Vulnerability Details **File Location**: `README.md`, lines 44–47; related guidance in `SKILL.md`, line 82 **Vulnerability Type**: Unpinned third-party source dependency **Risk Level**: Medium ### Vulnerable Code Snippet ```bash git clone https://github.com/TeoSlayer/pilotprotocol.git cd pilotprotocol go build -o pilotctl mkdir -p ~/.pilot/bin && mv pilotctl ~/.pilot/bin/pilotctl ``` The skill documentation similarly recommends cloning the upstream repository and compiling it with `go build`, but does not specify a release tag, commit hash, checksum, signature, or reproducible dependency lock. ### Technical Analysis The installation procedure builds whatever source is present at the upstream repository's default branch at installation time. The resulting `pilotctl` binary is security-critical: the skill executes it for messaging, file transfer, daemon management, gateway bridging, and access to persistent context. Building from source can reduce risks associated with opaque precompiled binaries, but it does not by itself establish source integrity. Without pinning and verification, the effective dependency can change after this skill has been reviewed. Compromise of the upstream repository, maintainer account, build dependencies, or default branch could result in users compiling and installing attacker-controlled code. The instructions also invoke `go build` without a documented dependency-verification or reproducible-build procedure. Go module checksums provide some dependency integrity properties, but they do not establish that the selected top-level source revision is trusted or approved by this project. ### Attack Path 1. An attacker compromises the upstream Pilot Protocol repository, a maintainer account, or an unpinned transitive build dependency. 2. Malicious code is introduced into the default branch or selected dependency version. 3. A user follows the documented `git clone` and `go build` instructions. 4. The user installs the res ...[truncated 1001 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin Pilot Protocol to a reviewed, immutable commit hash or cryptographically signed release tag. 2. Publish the expected source archive and binary SHA-256 or SHA-512 checksums through a separately protected release channel. 3. Require verification of the release signature and checksum before building or installing. 4. Use a detached checkout rather than the mutable default branch, for example: ```bash git clone https://github.com/TeoSlayer/pilotprotocol.git cd pilotprotocol git checkout --detach <reviewed-commit-hash> git verify-commit <reviewed-commit-hash> go mod verify go build -trimpath -o pilotctl ``` 5. Pin and review the Go module dependency graph and retain `go.sum` in the reviewed release. 6. Document the exact supported upstream version in `manifest.json`. 7. Use reproducible builds and publish attestations or a software bill of materials. 8. Verify the installed binary's hash before each use or place it in a protected, immutable installation location. 9. Establish an update process that requires explicit user approval and repeats signature, checksum, and source-review checks. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (18)

Session Persistence

Medium
Category
Rogue Agent
Content
git clone https://github.com/TeoSlayer/pilotprotocol.git
cd pilotprotocol
go build -o pilotctl
mkdir -p ~/.pilot/bin && mv pilotctl ~/.pilot/bin/pilotctl

# 2) Install this Skill
openclaw skills install github:sarahmirrand001-oss/openclaw-skill-pilot-protocol
Confidence
95% confidence
Finding
The skill intentionally enables cross-session persistence and auto-restore of context snapshots, and the README explicitly states those snapshots are stored as plain JSON in ~/.pilot/inbox/ and may contain PII, API keys, and session secrets. In this skill's context, persistence is core functionality, but storing sensitive agent state unencrypted at rest significantly raises the risk of credential theft, privacy exposure, and unintended propagation of prior-session secrets into new sessions.

Intent-Code Divergence

Medium
Confidence
92% confidence
Finding
The README presents the skill as operating 'entirely within the local ~/.pilot/ directory' while also documenting peer-to-peer messaging, file transfer, webhook monitoring, gateway IP bridging, rendezvous on TCP :9000, and multi-node communication. This inconsistency can mislead operators about trust boundaries and network exposure, increasing the chance they deploy a network-capable daemon without appropriate firewalling, peer trust review, or data handling controls.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The invocation guidance is very broad, covering cross-session persistence, multi-agent coordination, and context overflow handling, which can cause the skill to activate in many unrelated workflows. Because this skill performs command execution, file writes, persistence, and network actions, overbroad triggering raises the chance of unnecessary privileged behavior and accidental data movement.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| **Script Exec** | `~/.pilot/pilot-publish.sh` | Event publishing helper script |
| **Process** | Daemon lifecycle | Start/stop/status of the pilotctl daemon |

> **Privacy Note:** All inter-agent traffic is encrypted end-to-end using X25519 key exchange + AES-256-GCM. Agents are private by default and require mutual trust handshake before communication. No data passes through relay servers. The rendezvous registry defaults to localhost (`127.0.0.1:9000`) — no peer-discovery metadata leaves the machine unless you explicitly change `registry_url` to a remote address. Snapshots are unencrypted JSON; you must secure the `~/.pilot/` directory (`chmod 700`).

---
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| **Script Exec** | `~/.pilot/pilot-publish.sh` | Event publishing helper script |
| **Process** | Daemon lifecycle | Start/stop/status of the pilotctl daemon |

> **Privacy Note:** All inter-agent traffic is encrypted end-to-end using X25519 key exchange + AES-256-GCM. Agents are private by default and require mutual trust handshake before communication. No data passes through relay servers. The rendezvous registry defaults to localhost (`127.0.0.1:9000`) — no peer-discovery metadata leaves the machine unless you explicitly change `registry_url` to a remote address. Snapshots are unencrypted JSON; you must secure the `~/.pilot/` directory (`chmod 700`).

---
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| **Script Exec** | `~/.pilot/pilot-publish.sh` | Event publishing helper script |
| **Process** | Daemon lifecycle | Start/stop/status of the pilotctl daemon |

> **Privacy Note:** All inter-agent traffic is encrypted end-to-end using X25519 key exchange + AES-256-GCM. Agents are private by default and require mutual trust handshake before communication. No data passes through relay servers. The rendezvous registry defaults to localhost (`127.0.0.1:9000`) — no peer-discovery metadata leaves the machine unless you explicitly change `registry_url` to a remote address. Snapshots are unencrypted JSON; you must secure the `~/.pilot/` directory (`chmod 700`).

---
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
| **Script Exec** | `~/.pilot/pilot-publish.sh` | Event publishing helper script |
| **Process** | Daemon lifecycle | Start/stop/status of the pilotctl daemon |

> **Privacy Note:** All inter-agent traffic is encrypted end-to-end using X25519 key exchange + AES-256-GCM. Agents are private by default and require mutual trust handshake before communication. No data passes through relay servers. The rendezvous registry defaults to localhost (`127.0.0.1:9000`) — no peer-discovery metadata leaves the machine unless you explicitly change `registry_url` to a remote address. Snapshots are unencrypted JSON; you must secure the `~/.pilot/` directory (`chmod 700`).

---
Confidence
80% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Session Persistence

Medium
Category
Rogue Agent
Content
| Operation | Multi-node Command | Single-node Alternative |
|-----------|-------------------|------------------------|
| Publish event | `pilotctl publish keke-agent topic --data ...` | `~/.pilot/pilot-publish.sh topic '{"key":"val"}'` |
| Send to inbox | `pilotctl send-message keke-agent --data ...` | Write file directly to `~/.pilot/inbox/` |
| Context snapshot | `pilotctl send-message ...` | `~/.pilot/context-snapshot.sh` |
| Read inbox | `pilotctl inbox` → read `~/.pilot/inbox/` | Same (read directory directly) |
| Check status | `pilotctl info` | ✅ Works normally |
Confidence
90% confidence
Finding
Directly writing messages or snapshots into `~/.pilot/inbox/` bypasses stronger protocol-level controls and normalizes filesystem-based persistence as a fallback path. If other local processes or compromised components can write there, forged or malicious inbox content could later be consumed as trusted agent state.

Session Persistence

Medium
Category
Rogue Agent
Content
# Using the snapshot script (works in both single-node and multi-node)
~/.pilot/context-snapshot.sh SESSION_ID "Key summary of current context"

# Or manually write to inbox
echo '{"type":"context_snapshot","session_id":"ID","summary":"Summary"}' > ~/.pilot/inbox/snapshot_$(date +%Y%m%d_%H%M%S).json
```
Confidence
96% confidence
Finding
The manual snapshot example writes structured context data directly into a predictable file in `~/.pilot/inbox/`, creating durable plaintext session artifacts. This is dangerous because it persists potentially sensitive context at rest and creates an injection point where later sessions may ingest attacker-planted or tampered snapshot files.

Session Persistence

Medium
Category
Rogue Agent
Content
### 1.2 Restore Context

When a new session starts, read the previous session's snapshot:

```bash
~/.pilot/bin/pilotctl --json inbox
Confidence
95% confidence
Finding
The skill explicitly instructs new sessions to read prior snapshots from the inbox and restore context, establishing cross-session persistence of potentially sensitive information. Because snapshots are described as unencrypted JSON and restoration is part of the default workflow, secrets, personal data, or stale instructions can be retained and reintroduced without strong user awareness or validation.

Session Persistence

Medium
Category
Rogue Agent
Content
### 3.2 Spawning Sub-Agents

When OpenClaw needs to create a sub-agent for overflow tasks:

```bash
# Publish agent spawn event
Confidence
81% confidence
Finding
Spawning sub-agents for overflow tasks expands the number of principals that can receive or process context, increasing persistence and propagation of user data beyond a single session or actor. In this skill, overflow handling is tied to coordination and result collection, so context may be copied into additional channels without a clear user-controlled boundary.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
The tag conventions embed a language-specific routing preference, recommending Chinese tasks be routed to certain models without indicating user choice or consent. While not directly a code execution flaw, it can steer user data to different agents or models than expected, affecting privacy, policy compliance, or trust boundaries.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The skill manifest and top-level description frame the capability as agent messaging and context coordination, but the body also adds gateway IP bridging and webhook delivery that can expose local services over HTTP and stream daemon events to an endpoint. These are materially different, network-expanding behaviors that increase attack surface and can lead to unintended service exposure or data exfiltration if invoked without explicit user awareness.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
Gateway IP bridging is broader than the stated need for agent coordination because it can publish local model or agent services onto a reachable interface and encourage access through standard HTTP tools. That turns a coordination skill into a service-exposure mechanism, which is dangerous if users invoke the skill for benign context persistence and do not expect network reachability changes.

Autonomous Decision Making

Medium
Category
Excessive Agency
Content
## Standing Orders (Automation Rules)

### Rule 1: Snapshot Before Session End
Automatically execute a context snapshot (Capability 1.1) before every session ends.

### Rule 2: Critical Events Must Be Published
The following events must always be published to the Event Stream:
Confidence
88% confidence
Finding
The standing orders instruct the skill to automatically execute snapshots before session end and to auto-restore on new sessions, which creates autonomous persistence behavior without per-event user confirmation. In a skill that handles sensitive context and writes unencrypted JSON snapshots, this can preserve and re-inject data the user did not intend to retain or reuse.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Content
"~/.pilot/pilot-publish.sh — event publishing helper"
        ],
        "system_privileges": [
            "NO root/sudo required. Gateway bridging over user ports (>1024) is strictly unprivileged."
        ]
    },
    "network_behavior": {
Confidence
70% confidence
Finding
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Vague Triggers

Medium
Confidence
93% confidence
Finding
The skill is configured to auto-run on broad lifecycle events such as session start, session end, model switch, and context overflow. In a skill designed for cross-session persistence and inter-agent communication, this increases the chance of unreviewed activation, unintended data propagation, and persistence of sensitive context without an explicit user decision each time.

Ssd 3

Medium
Confidence
96% confidence
Finding
Automatic context snapshots on session end and overflow can capture arbitrary in-session content, including secrets, PII, tokens, or confidential prompts, and store them for later reuse. Because this skill explicitly supports cross-session persistence and agent coordination, the saved data may later be restored, read by other components, or transferred indirectly, magnifying confidentiality risk.

Static analysis

No suspicious patterns detected.