T06 · System Persistence
Error
- Location
- README.md:19
- Finding
- Persistent daily execution through scheduled-task registration<![CDATA[ ## Vulnerability Details **File Location**: `README.md:19-39` **Additional Locations**: `SKILL.md:248-263`, `examples/usage_examples.md:103-107` **Vulnerability Type**: Scheduled-task persistence **Risk Level**: High ### Vulnerable Code ```powershell # Create a daily task that executes at 9:00 AM $action = New-ScheduledTaskAction -Execute "python" -Argument "$PWD\skills\feynman-coach\scripts\daily_review.py" $trigger = New-ScheduledTaskTrigger -Daily -At 9am Register-ScheduledTask -Action $action -Trigger $trigger -TaskName "FeynmanDailyReview" -Description "Daily Feynman learning review" # Verify that the task was created Get-ScheduledTask -TaskName "FeynmanDailyReview" ``` ```bash # Edit the user crontab crontab -e # Execute every day at 9:00 AM 0 9 * * * cd /path/to/your/note/project && python skills/feynman-coach/scripts/daily_review.py ``` The same persistence mechanism is repeated in `SKILL.md` and the usage examples. ### Technical Analysis The documentation instructs users to register a Windows scheduled task or cron entry that survives the current Skill invocation and executes the review program every day. This is an explicit persistence mechanism. Scheduling is relevant to the declared optional automatic-review feature and is not installed silently by the Python script. Nevertheless, it is not required for manual or interactive review functionality. Once configured, the script repeatedly executes with the permissions of the account owning the scheduled task and can read Markdown files from the configured vault and write review files without additional confirmation. The task invokes a generic interpreter or command by name and relies on a working-directory-dependent script path. This increases exposure to executable search-path manipulation, script replacement, or project-directory compromise. ### Attack Path 1. The user follows the documentation and registers the scheduled task or cron entry. 2. The task persists across sessio ...[truncated 1120 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Make scheduled execution explicitly opt-in and present manual execution as the default. 2. Do not describe persistent scheduling as required for the core Skill. 3. Show the exact resolved interpreter and script paths before registration. 4. Use absolute, validated paths rather than `python`, `opencode`, `$PWD`, or a relative script path. 5. Register the task only for the current unprivileged user. 6. Restrict write permissions on the script, project directory, and interpreter. 7. Provide removal instructions, such as: - Windows: `Unregister-ScheduledTask -TaskName "FeynmanDailyReview"` - macOS/Linux: remove the corresponding entry with `crontab -e` 8. Document which directories are read and modified during every scheduled run. 9. Consider a reminder generated by the note application itself instead of a system-level persistent task. ]]>
