T06 · System Persistence
- Location
scripts/install_cron.sh:17- Finding
Persistent Autonomous Agent Jobs With Repository Write Capabilities
- Content
View full analysis
Vulnerability Details
File Location:
scripts/install_cron.sh:17-56
Vulnerability Type: Persistent scheduled agent execution
Risk Level: HighVulnerable Code
bash cat > "$CRON_FILE" << CRONEOF [ { "name": "BountyHunter-Push", "enabled": true, "schedule": { "kind": "every", "intervalMs": 600000 }, "sessionTarget": "isolated", "wakeMode": "now", "payload": { "kind": "agentTurn", "message": "Run bounty hunter scanner.\npython3 /home/node/clawd/bounty-hunter/bounty_hunter.py\nExtract QQ_MSG: lines and push to user.\nIf NO_NEW, reply NO_REPLY." }, "delivery": { "mode": "announce", "channel": "qqbot", "to": "${QQ_TARGET}" } }, { "name": "GitHub-Bounty-Auto", "enabled": true, "schedule": { "kind": "every", "intervalMs": 7200000 }, "sessionTarget": "isolated", "wakeMode": "now", "payload": { "kind": "agentTurn", "message": "GitHub bounty auto pipeline.\n\nStep 1: python3 /home/node/clawd/bounty-github/bounty_scanner.py\nIf NO_BOUNTY, reply NO_REPLY.\nStep 2: Read target/current.json for selected task info.\nStep 3: Get issue body, implement.\nStep 4: git add commit push, create PR via API.\nPR title starts: [ baobao ].\nAdd payment comment.\nOne task per run. Notify user with PR link." }, "delivery": { "mode": "announce", "channel": "qqbot", "to": "${QQ_TARGET}" } } ] CRONEOFTechnical Analysis
The installer creates two enabled recurring OpenClaw agent jobs. One runs every ten minutes and the other every two hours. These jobs survive the original installation session and direct an agent to execute local scripts and, in the GitHub workflow, inspect task data, modify code, commit changes, push branches, and create pull requests.
The persistence is not limited to read- ...[truncated 1269 chars]
- Remediation
View remediation
Remediation Suggestions
- Do not install recurring jobs without explicit, informed user consent.
- Create jobs in a disabled state and require the user to enable each one separately.
- Separate read-only scanning from repository modification and PR publication.
- Require human approval before every claim, commit, push, or pull-request operation.
- Restrict execution to verified scripts shipped with the package or validated by cryptographic hashes.
- Document and provide a removal command that deletes only the jobs installed by this Skill.
- Use short-lived, narrowly scoped credentials and isolate scheduled tasks from unrelated secrets.
