T06 · System Persistence
Error
- Location
- references/documentation-analysis.md:332
- Finding
- Recurring Documentation Update Task Creates Cross-Session Persistence<![CDATA[ ## Vulnerability Details **File Location**: `references/documentation-analysis.md`, lines 332-341 **Vulnerability Type**: Scheduled-task persistence **Risk Level**: High ### Vulnerable Code ```powershell function Update-VolcengineDocs { # 1. Check documentation updates # 2. Incrementally crawl new content # 3. Update the index # 4. Notify changes } # Add to cron cron add -Name "volcengine-docs-update" -Schedule "0 2 * * 0" ` -Command "Update-VolcengineDocs -Notify" ``` ### Technical Analysis The packaged implementation plan directs the user or agent to register a weekly scheduled task. A scheduled task survives the original Skill invocation and causes code to execute in later sessions without another explicit request. The referenced update function is currently only a stub, and no shipped Python script or package lifecycle hook automatically installs the task. Nevertheless, an agent following this packaged instruction could implement the function and register it as a persistent execution mechanism. Automated documentation updates do not require persistence to provide the Skill's declared model-configuration functionality. The update design includes remote documentation retrieval and local index modification. Consequently, the effective behavior of the persistent task may depend on future remote content or later changes to the update function. ### Attack Path 1. An agent loads or follows the documentation extraction plan. 2. The agent implements or obtains the proposed `Update-VolcengineDocs` function. 3. The agent executes the documented `cron add` command. 4. A recurring weekly task is registered outside the lifetime of the current Skill run. 5. The task subsequently performs network retrieval and local file updates without a new invocation. 6. If the update function or its remote input is later compromised, the recurring task provides a continuing execution channel. ### Impact Assessment The scheduled task can execute w ...[truncated 536 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the `cron add` instruction from the packaged documentation. 2. Make documentation refreshes explicit, user-initiated operations that terminate after completion. 3. If scheduling is an essential optional feature: - Obtain informed user confirmation before registration. - Provide a complete, reviewable update script rather than an undefined function. - Pin all tools and dependencies used by the updater. - Restrict network destinations to documented Volcengine hosts. - Restrict file writes to a dedicated application-owned directory. - Run with the least-privileged account available. - Record task creation and provide commands to inspect and remove the task. - Validate remote content as untrusted data and never execute retrieved content. 4. Do not create scheduled jobs automatically during installation, loading, testing, or ordinary Skill use. ]]>
