Back to skill

Security audit

Pilot Watchdog

Security checks for vulnerabilities and agentic risk

Overview

The skill has a coherent monitoring purpose, but its shell workflow handles daemon data unsafely enough to require review before installation.

Review or harden the Bash snippets before use: validate score fields as bounded integers, protect the watchdog state directory with owner-only permissions, and run the continuous loop only under an account whose files and environment you are comfortable exposing to the Pilot daemon's data path.

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:78
Finding

Unvalidated daemon data evaluated as a Bash arithmetic expression

Content
View full analysis
Remediation
View remediation
= -1000000 && CURRENT_SCORE <= 1000000 && PREVIOUS_SCORE >= -1000000 && PREVIOUS_SCORE <= 1000000 )); then CHANGE=$((CURRENT_SCORE - PREVIOUS_SCORE)) else alert "INVALID_DATA" "Peer score is outside the accepted range" continue fi else alert "INVALID_DATA" "Peer score is not a valid integer" continue fi ``` Additional hardening should include: 1. Validate the JSON schema and value types with `jq` before converting data into shell variables. 2. Reject null, string, floating-point, non-finite, out-of-range, or otherwise malformed scores. 3. Create the watchdog directory and state file with owner-only permissions, such as directory mode `0700` and file mode `0600`. 4. Set `umask 077` before creating configuration, state, or alert files. 5. Verify that the state file is a regular file owned by the expected user and is not a symbolic link before reading or replacing it. 6. Write state through a securely created temporary file in the same directory and atomically rename it into place. 7. Treat all `pilotctl` output as untrusted unless the daemon authenticates its data source and enforces a strict response schema. ]]>
Vulnerability Patterns
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (1)

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · SKILL.md (reported line 44)May include surrounding context.

Initialize Watchdog

bash
mkdir -p ~/.pilot/watchdog/{alerts,state}
cat > ~/.pilot/watchdog/config.json <<EOF
{
  "enabled": true,

Static analysis

No suspicious patterns detected.