Back to skill

Security audit

Pilot Cron

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says, but its examples directly create persistent scheduled network tasks without enough confirmation or cleanup guidance.

Install only if you intentionally want unattended cron or systemd jobs that keep submitting Pilot network tasks after the current session. Before running the examples, review the exact script, peer selection, schedule, logs, and cost/resource impact; back up your crontab; replace the fixed temporary file with mktemp or a private file; and add stop, disable, and removal commands.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • 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)

T06 · System Persistence

Error
Location
SKILL.md:44
Finding

Persistent Scheduled Task Installation Without Lifecycle Safeguards

Content
View full analysis
~/.config/systemd/user/pilot-task.timer </dev/null | grep -v 'pilot-cron' > /tmp/crontab.tmp || true cat >> /tmp/crontab.tmp <> $HOME/.pilot/logs/health-check.log 2>&1 EOF crontab /tmp/crontab.tmp ``` ### Technical Analysis The Skill explicitly modifies the user's persistent scheduling configuration through `crontab` and an enabled systemd user timer. These jobs survive the Skill invocation and continue executing commands under the user's account without renewed authorization. Recurring scheduling is consistent with the Skill's declared purpose, so the persistence is not concealed or unrelated functionality. Nevertheless, the examples install persistent execution directly rather than first generating a preview or requesting confirmation immediately before installation. They also lack expiration controls, integrity validation for referenced scripts, duplicate-entry protection in the basic examples, and documented removal procedures. The systemd timer sets `Persistent=true`, which can cause a missed invocation to run after the user timer manager resumes. The shown timer is also incomplete because no corresponding `pilot-task.service` unit is defined. The cron workflow repeatedly discovers a Pilot peer and submits a network task every five ...[truncated 1513 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:84
Finding

Predictable Temporary File Used to Install Crontab

Content
View full analysis
/dev/null | grep -v 'pilot-cron' > /tmp/crontab.tmp || true cat >> /tmp/crontab.tmp <> $HOME/.pilot/logs/health-check.log 2>&1 EOF crontab /tmp/crontab.tmp rm /tmp/crontab.tmp ``` ### Technical Analysis The workflow uses the fixed pathname `/tmp/crontab.tmp` in a shared temporary directory. Shell output redirection follows symbolic links and does not create the file with guaranteed exclusive ownership. The file is then modified and imported into the user's crontab without validating its ownership, permissions, type, or contents. This creates symlink and time-of-check/time-of-use risks. A local process able to manipulate the pathname may cause the redirection to target another file writable by the victim or may alter the temporary file before `crontab /tmp/crontab.tmp` reads it. If cron syntax is injected successfully, attacker-selected commands can gain recurring execution under the affected user's account. Some operating systems mitigate cross-user attacks in sticky directories through protected-symlink settings. Such platform-dependent controls do not make a fixed shared temporary filename safe, and same-user processes can still interfere with it. ### Attack Path 1. A local attacker or compromised process predicts that the workflow will use `/tmp/crontab.tmp`. 2. Before the workflow runs, the attacker creates a symbolic link at that path to another file writable by the victim, or prepares to replace or modify the temporary file during execution. 3. The first redirection follows the attacker-controlled pathname, potentially truncating or overwriting the linked destination. 4. Alternatively, the attacker injects a malicious cron line after the legiti ...[truncated 870 chars]
Remediation
View remediation
/dev/null | grep -v 'pilot-cron' > "$tmp" || true cat >> "$tmp" <> $HOME/.pilot/logs/health-check.log 2>&1 EOF # Review or validate the generated contents before installation. crontab "$tmp" ``` Additional hardening should include: 1. Prefer a private runtime directory owned by the executing user. 2. Verify that the temporary file is a regular file owned by the current user. 3. Quote every pathname. 4. Validate the generated crontab syntax and reject unexpected lines before installation. 5. Preserve and restore the previous crontab if installation fails. 6. Avoid using a temporary file entirely where a safely constructed pipeline or dedicated scheduling API is available. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (10)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

*/5 * * * * $SCRIPT_DIR/health-check.sh >> $HOME/.pilot/logs/health-check.log 2>&1 EOF crontab /tmp/crontab.tmp rm /tmp/crontab.tmp

echo "Cron jobs installed"

text

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The commands modify the user's crontab and enable a persistent timer, but the skill does not prominently warn that it will create ongoing background execution and system changes. That omission is dangerous because users may not realize they are installing persistence that will continue invoking tasks and network activity after the initial interaction ends.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

This command appends a new cron entry to the user's crontab, creating session-independent persistence. In this skill's context, that means automated repeated execution of a script that may submit network tasks indefinitely, which materially raises the security and operational risk.

Content

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

Add cron job:

bash
crontab -l | { cat; echo "0 * * * * /path/to/submit-task.sh"; } | crontab -  # Every hour
crontab -l | { cat; echo "0 2 * * * /path/to/daily-backup.sh"; } | crontab -  # Daily at 2 AM

Session Persistence

Medium
Category
Rogue Agent
Confidence
91% confidence
Finding

This second crontab example likewise installs persistent scheduled execution that survives the current shell session. The risk is not the specific schedule but the unattended recurring behavior and the fact that it can repeatedly invoke local scripts and remote task submission.

Content

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

Add cron job:

bash
crontab -l | { cat; echo "0 * * * * /path/to/submit-task.sh"; } | crontab -  # Every hour
crontab -l | { cat; echo "0 2 * * * /path/to/daily-backup.sh"; } | crontab -  # Daily at 2 AM

Systemd timer (more reliable):

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly instructs the user to create persistent scheduled execution via cron and a user systemd timer, which changes host state beyond a one-shot task submission. In the context of a network-task skill, persistent scheduling increases risk because it can repeatedly trigger network operations and survive the current session without any safety framing, confirmation, or cleanup guidance.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

Enabling a user systemd timer creates persistent background execution beyond the current session. In a skill designed for network task submission, this allows recurring remote actions to continue automatically, which is sensitive behavior that should be treated as potentially dangerous automation.

Content

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

Persistent=true EOF

systemctl --user enable pilot-task.timer systemctl --user start pilot-task.timer

text

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% 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 70)May include surrounding context.

List scheduled tasks:

bash
crontab -l
systemctl --user list-timers

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The example creates executable files, modifies crontab, writes logs, and repeatedly submits tasks across the network without an explicit warning about persistence, file creation, or recurring external activity. In an agent skill context, that combination can lead to unattended behavior and unexpected resource use or remote interactions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The workflow example writes executable scripts, log files, and a temporary crontab file, then installs a recurring job that submits network tasks every 5 minutes. This extends the skill from documentation into local automation management with persistence and repeated remote actions, which is risky if copied blindly or generated by an agent without clear consent.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
94% confidence
Finding

This command reads and rewrites the user's crontab as part of installing a persistent recurring job. In context it is more dangerous because it is embedded in an automation example that creates scripts and logs, making it easy to deploy unattended repeated task submission with minimal visibility.

Content

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

md
chmod +x "$SCRIPT_DIR/health-check.sh"

# Install cron jobs
crontab -l 2>/dev/null | grep -v 'pilot-cron' > /tmp/crontab.tmp || true
cat >> /tmp/crontab.tmp <<EOF
# pilot-cron: Health check every 5 minutes
*/5 * * * * $SCRIPT_DIR/health-check.sh >> $HOME/.pilot/logs/health-check.log 2>&1