T06 · System Persistence
- Location
SKILL.md:137- Finding
Persistent Daily Execution Through a User Crontab Entry
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 137-140
Vulnerability Type: Persistent scheduled execution
Risk Level: HighVulnerable Code:
bash ### Set up daily automatic delivery ```bash (crontab -l 2>/dev/null; echo "0 9 * * * python3 ~/.openclaw/workspace/skills/industry-news-agent/scripts/fetch_news.py") | crontab -text ### Technical Analysis The documentation instructs the user to modify the user-level crontab so that the Skill's Python script runs every day at 09:00. This creates execution that survives both the current Skill invocation and the current login session. Scheduled operation is related to the declared daily-news functionality, but the command is not necessary for manual RSS retrieval and exceeds the privileges required for a one-time run. It also has the following weaknesses: - It establishes persistent execution without an accompanying removal procedure. - It uses a script under a user-writable workspace. Any later modification of that script will be executed automatically. - It uses `python3` through the cron environment's `PATH` rather than a verified absolute interpreter path. - Repeating the installation command appends duplicate scheduled entries. - It hardcodes the schedule instead of reading the `schedule` value from `config.yaml`. - The current implementation prints results locally and does not implement a delivery destination, despite describing the feature as automatic delivery. This command is presented as an optional manual setup step; the reviewed Python script does not install the cron entry automatically. ### Attack Path 1. A user follows the documented automatic-delivery instructions. 2. The command appends a persistent cron entry to the user's crontab. 3. An attacker or another process that can modify the Skill workspace later replaces or alters `scripts/fetch_news.py`. 4. At 09:00, cron resolves `python3` and runs the modified scri ...[truncated 904 chars]- Remediation
View remediation
Remediation Suggestions
- Keep scheduled operation explicitly opt-in and clearly explain that it creates a persistent user-level task.
- Provide a dedicated, idempotent installer that checks for an existing uniquely marked entry before making changes.
- Provide a documented uninstall command that removes only the Skill's own entry.
- Use verified absolute paths for both the Python interpreter and the script.
- Verify script ownership and permissions before scheduled execution.
- Use the schedule declared in
config.yamlinstead of maintaining a separate hardcoded value. - Prefer a restricted user service or scheduler configuration with resource, filesystem, and network controls where supported.
- If the Skill is intended only for on-demand retrieval, remove the cron instructions entirely.
