T06 · System Persistence
- Location
SKILL.md:43- Finding
Recurring Token-Refresh Task Creates Cross-Session Persistence
- Content
View full analysis
/scripts/auth.py refresh ,报告结果" → sessionTarget: isolated ``` ```bash openclaw cron add --name "百度网盘token刷新" --every 25d --session isolated \ --message "执行百度网盘token刷新:运行 python3 /scripts/auth.py refresh ,报告结果" ``` ### Technical Analysis The Skill recommends registering an indefinitely recurring OpenClaw cron task. The task survives the initiating session and periodically executes `scripts/auth.py` with access to a user-selected `.env` file containing an application secret, access token, and long-lived refresh token. Scheduled refresh is related to the declared OAuth functionality, and the user must explicitly run the documented command. However, persistent execution is not required for the minimum on-demand token exchange or refresh functionality. It increases the security boundary from a one-time command to recurring, cross-session execution of code with credential access. The cron payload references a script path rather than an immutable, integrity-verified artifact. If the script, its containing directory, the cron configuration, or the referenced environment file is later modified by another actor, the scheduled task can repeatedly execute altered behavior. ### Attack Path 1. The user follows the recommendation and registers the 25-day cron task. 2. The task persists after the original Skill interaction ends. 3. Each scheduled invocation executes `scripts/auth.py refresh` and reads credentials from the configured `.env` file. 4. An attacker who subsequently obtains write access to the referenced script path, parent directory, or cron payload modifies the execut ...[truncated 932 chars]- Remediation
View remediation
