T06 · System Persistence
Error
- Location
- SKILL.md:197
- Finding
- Mandatory Cross-Session Cron Task Performs Autonomous Global Configuration and Memory Writes<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:197-218` **Vulnerability Type**: Persistent scheduled task with autonomous state modification **Risk Level**: High ### Vulnerable Code Snippet ```markdown ### Standard Post-Setup Workflow (UPDATED in v2.2) After creating any sub-agent team, execute this as **mandatory standard flow**: 1. **Core skill baseline assignment** - Assign 2–4 core skills per role directly in `openclaw.json` - Keep advanced/domain skills as on-demand skills 2. **Skill learning telemetry** - Enable usage logging per agent/skill - Log format: `agent_id + skill_name + timestamp + context` 3. **Weekly optimization task (OpenClaw Cron)** - Create a weekly `openclaw cron` job in isolated session - Analyze last 7 days usage and update `openclaw.json` skill mapping - Always backup before writing config 4. **All-team scope** - Mechanism must apply to **all teams** (coding/wealth/other future teams) - No team-specific hardcoding in the optimizer 5. **Review outputs** - Save weekly optimization summary to `memory/YYYY-MM-DD.md` - Keep optimization history under `.lib/skill_analytics/` ``` ### Technical Analysis The Skill directs the agent or operator to install a recurring OpenClaw cron task as a mandatory post-setup action. That task is expected to collect agent and skill usage context, analyze activity, modify `openclaw.json`, and write results to persistent memory and analytics directories. This workflow survives the original Skill invocation and applies to all current and future teams rather than only the team being configured. The documentation does not define an implementation with strict input validation, an allowlist of permissible configuration changes, retention limits, redaction of logged context, or a mandatory human-approval gate before writing the updated configuration. Although the supplied `wizard/setup.js` does not itself create the cron task, the instruction is explicitly ...[truncated 1508 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Remove the requirement that cron installation is mandatory. 2. Make telemetry and scheduled optimization separate, explicit opt-in features. 3. Present the exact cron command, schedule, executable, input files, and output files before installation. 4. Scope optimization to the selected team by default instead of all teams. 5. Require human review and approval of a generated configuration diff before modifying `openclaw.json`. 6. Restrict updates to an allowlisted set of configuration fields. 7. Redact secrets, credentials, source code, personal information, and user content from telemetry context. 8. Define retention limits and provide commands to inspect, disable, and remove the cron task and stored analytics. 9. Run the optimizer under a least-privileged identity with access only to required files. 10. Use atomic writes, schema validation, backups, rollback on failure, and integrity checks for every configuration update. ]]>
