T06 · System Persistence
Error
- Location
- SKILL.md:251
- Finding
- Unbounded Recurring Background Task Creates Cross-Session Persistence## Vulnerability Details **File Location**: `SKILL.md`, lines 251-289 **Vulnerability Type**: Persistent scheduled task **Risk Level**: High ### Vulnerable Code Snippet ```text When the host says “start automatic calculation” or “monitor scoring,” use the `cron` tool to create a scheduled task: Task name: meeting-score-{app_token}-calculation Schedule: execute every 0.5 minutes (everyMs: 30000) Target: isolated session ``` The scheduled task is instructed to perform the following operations: ```text 1. Use feishu_bitable_list_records to read all records in the scoring-record table 2. For each record whose three dimensions are filled and whose subtotal or scoring time is empty: - Calculate the subtotal - Use feishu_bitable_update_record to write the subtotal and scoring time 3. Group records by agenda name and calculate averages 4. Use feishu_bitable_update_record to write averages to the agenda table 5. Mark an agenda as completed when all reviewers have scored it 6. If all agendas are completed, send a Feishu message to the host ``` Cleanup relies on later manual action: ```text When the host says “stop automatic calculation,” use the `cron` tool to disable the corresponding task. - After starting automatic calculation, record the task jobId for later stopping - It is recommended to manually stop automatic calculation after the meeting to avoid wasting resources ``` ### Technical Analysis The Skill directs the agent to create a recurring cron task that executes every 30 seconds in an isolated session. This task survives the initiating interaction and repeatedly reads and modifies Feishu Bitable data. It may also send messages through Feishu. The task has no defined expiration time, maximum execution count, or mandatory automatic deletion condition. Even when all agenda items are complete, the instructions only require sending a notification; they do not require disabling or deleting the cron task. Cleanup therefore depends on the host issuing ...[truncated 1831 chars]
- Remediation
- ## Remediation Suggestions 1. Prefer explicit, foreground recalculation initiated by an authorized host instead of creating a persistent scheduled task. 2. If polling is required, obtain explicit confirmation that clearly states the interval, affected tables, duration, and background nature of the task. 3. Add a mandatory expiration time and maximum execution count when the task is created. 4. Automatically disable and delete the cron task immediately after all agenda items reach the completed state. 5. Add an inactivity timeout so the task terminates if no scoring changes are detected for a defined period. 6. Persist the job ID in a reliable, scoped state store and verify that it belongs to the expected meeting before stopping or modifying it. 7. Make every execution idempotent and use version or timestamp checks to avoid overwriting newer records. 8. Restrict the task credentials to only the required Feishu tables and operations. 9. Provide the host with visible task status, expiration time, and a reliable cancellation mechanism. 10. Log task creation, execution, data mutations, notification attempts, and cleanup for auditability.
