T06 · System Persistence
- Location
SKILL.md:91- Finding
Persistent Cross-Session Agent Execution Through a Scheduled Cron Job
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 91–105 and 197
Vulnerability Type:T06: System Persistence
Risk Level: HighVulnerable code segment:
json { "name": "保质期过期提醒", "schedule": { "kind": "cron", "expr": "0 9 * * *", "tz": "Asia/Shanghai" }, "payload": { "kind": "agentTurn", "message": "执行保质期过期提醒检查:读取 config.json 获取多维表格信息,查询所有「状态」为「即将过期」或「已过期」且「已用完」为 false 的商品记录。如果有,整理成简洁列表通过飞书发送给当前用户(从消息上下文获取 SenderId);如果没有,静默结束不发消息。config.json 路径:~/.openclaw/workspace/skills/shelflife/config.json" }, "sessionTarget": "isolated", "delivery": { "mode": "none" } }The Skill also explicitly states at line 197:
text - 每日 9:00 定时检查由 cron 任务自动执行,agent 在 isolated session 中运行Technical Analysis
During automatic initialization, the Skill directs the Agent to register a daily cron task whose payload launches a new
agentTurnin an isolated session. This task survives the initiating Skill invocation and repeatedly executes at 09:00 in theAsia/Shanghaitime zone.The recurring task reads persistent configuration, accesses the configured Feishu Bitable database, evaluates product records, and may send messages to the user. The Skill does not require explicit confirmation immediately before registering this persistent task. It also provides no documented workflow to inspect, disable, or delete the scheduled job.
This is system persistence because the scheduled Agent execution remains active across sessions and continues operating after the original interaction has ended.
Attack Path
- A user invokes the Skill with a shelf-life-related phrase.
- The Skill reads
config.jsonand finds that initialization is incomplete or thatapp_tokenis empty. - Automatic initialization creates the Feishu Bitable resources.
- The Skill invokes
cron addwithout a separate, explicit scheduling confirmation. - A persistent daily task is registered wit ...[truncated 1070 chars]
- Remediation
View remediation
Remediation Suggestions
- Require explicit, informed user consent immediately before calling
cron add. - Clearly disclose the schedule, time zone, accessed data, outbound messaging behavior, and cross-session nature of the task.
- Make reminders optional rather than an automatic part of first-use initialization.
- Provide commands to inspect, pause, resume, and permanently delete the scheduled job.
- Remove the cron job during Skill reset, disconnection, or uninstallation, and clear
cron.reminder_job_idafter successful deletion. - Verify that an existing job ID remains valid before creating another task to prevent duplicate persistent jobs.
- Apply least privilege to the scheduled operation, limiting it to read access for the required table and narrowly scoped message delivery.
- Prefer a dedicated reminder mechanism over a general recurring
agentTurnwhen the platform supports one. - Add expiration or renewal controls so the schedule does not continue indefinitely without periodic user confirmation.
- Require explicit, informed user consent immediately before calling
