Back to skill

Security audit

Cron Scheduler

Security checks for vulnerabilities and agentic risk

Overview

The skill is a cron helper whose purpose is clear, but it gives agents direct commands to install and rewrite persistent scheduled jobs without strong scoping or confirmation guidance.

Use this only if you want an agent to manage persistent cron jobs on your machine. Before any install, edit, or removal action, require the agent to show the exact crontab change, back up the current crontab, and confirm the job will run only commands you recognize until you remove it.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (7)

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 17)May include surrounding context.

List all cron jobs

bash
echo "=== User crontab ==="
crontab -l 2>/dev/null || echo "(empty)"
echo ""
echo "=== System cron ==="
ls /etc/cron.d/ 2>/dev/null

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill provides direct commands to add and remove cron entries, which create persistent scheduled execution on the host, but it does not include an explicit warning that these actions modify system behavior beyond the current session. In an agent setting, this can lead to unintended persistence, repeated execution of harmful commands, or stealthy re-execution of user-supplied payloads if the agent applies these commands without strong confirmation.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
96% confidence
Finding

This command appends a new cron entry via (crontab -l; echo ... ) | crontab -, creating durable scheduled execution on the machine. In an agent workflow, that is a persistence primitive: malicious or mistaken user input could be installed to run repeatedly, potentially evading immediate notice and causing ongoing compromise or disruption.

Content

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

Add a cron job

bash
# Add to user crontab
(crontab -l 2>/dev/null; echo "SCHEDULE COMMAND") | crontab -

# Common schedules:

Session Persistence

Medium
Category
Rogue Agent
Confidence
85% confidence
Finding

crontab -e opens the live scheduler configuration for editing, enabling persistence changes that can schedule arbitrary recurring commands. Even though it is interactive, the skill is still instructing the agent/operator to modify durable execution state without emphasizing the security implications.

Content

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

Remove a cron job

bash
# Edit crontab interactively
crontab -e

# Or remove a specific line
crontab -l | grep -v "PATTERN_TO_REMOVE" | crontab -

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

crontab -l | grep -v "PATTERN_TO_REMOVE" | crontab - rewrites the user's crontab and therefore modifies persistent execution state. It can also accidentally remove unintended entries if the pattern is broad, causing denial of service for legitimate scheduled tasks or enabling stealthy tampering with security jobs.

Content

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

crontab -e

Or remove a specific line

crontab -l | grep -v "PATTERN_TO_REMOVE" | crontab -

text

### Check cron logs

Session Persistence

Medium
Category
Rogue Agent
Confidence
95% confidence
Finding

This example injects environment variables and a scheduled command into the user's crontab, again creating persistent recurring execution. Setting PATH and SHELL can also alter how later cron jobs resolve commands, increasing the blast radius of a mistaken or malicious modification.

Content

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

Environment variables in cron

bash
# Cron runs with minimal environment. Set what you need:
(crontab -l 2>/dev/null; echo "PATH=/usr/local/bin:/usr/bin:/bin
SHELL=/bin/bash
0 2 * * * /home/user/backup.sh >> /var/log/backup.log 2>&1") | crontab -

Session Persistence

Medium
Category
Rogue Agent
Confidence
93% confidence
Finding

The example explicitly shows how to install a nightly cron job, which is a persistence mechanism by design. In a skill intended for general agent use, publishing copy-paste persistence commands without warnings or approval gates makes abuse or accidental long-lived execution more likely.

Content

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

md
## Examples

**User:** "Run my backup script every night at 2am"
→ `(crontab -l 2>/dev/null; echo "0 2 * * * /home/user/backup.sh >> /var/log/backup.log 2>&1") | crontab -`

**User:** "Check disk space every hour and alert me if it's over 80%"
→ Create a check script + cron job

Static analysis

No suspicious patterns detected.