T06 · System Persistence
- Location
references/setup-guide.md:45- Finding
Persistent Unattended Vault Synchronization Through Scheduled Tasks
- Content
View full analysis
Vulnerability Details
File Locations:
SKILL.md:34-42SKILL.md:125-168references/setup-guide.md:45-66
Vulnerability Type: Scheduled task and user-service persistence
Risk Level: HighVulnerable Code
references/setup-guide.md:45-66:bash ### 使用 Cron (Linux/Mac) ```bash # 编辑 crontab crontab -e # 每天凌晨3点同步 0 3 * * * /path/to/obsidian-github-sync/scripts/obsidian-sync.sh # 每天早上9点检查冲突 0 9 * * * /path/to/obsidian-github-sync/scripts/check-conflict.sh使用 OpenClaw Cron
bash openclaw cron add --name "obsidian-sync" \ --cron "0 3 * * *" \ --command "/path/to/obsidian-github-sync/scripts/obsidian-sync.sh" openclaw cron add --name "obsidian-check" \ --cron "0 9 * * *" \ --command "/path/to/obsidian-github-sync/scripts/check-conflict.sh"text `SKILL.md:125-168`: ```bash ### With OpenClaw ```bash # Add sync cron job openclaw cron add --name "obsidian-sync" \ --cron "0 3 * * *" \ --command "/path/to/obsidian-sync.sh" # Add conflict check openclaw cron add --name "obsidian-check" \ --cron "0 9 * * *" \ --command "/path/to/check-conflict.sh"With Systemd (Linux)
Create
~/.config/systemd/user/obsidian-sync.service:ini [Unit] Description=Obsidian Vault Git Sync [Service] Type=oneshot Environment="OBSIDIAN_VAULT_DIR=/path/to/vault" Environment="GITHUB_REMOTE_URL=git@github.com:user/repo.git" ExecStart=/path/to/obsidian-sync.shCreate
~/.config/systemd/user/obsidian-sync.timer:ini [Unit] Description=Run Obsidian sync daily at 3 AM [Timer] OnCalendar=*-*-* 03:00:00 Persistent=true [Install] WantedBy=timers.targetEnable:
bash systemctl --user daemon-reload systemctl --user enable obsidian-sync.timer systemctl --user start obsidian-sync.timertext ### Technical Analysis The Skill instructs users to register recurring cron or ...[truncated 3112 chars]- Remediation
View remediation
Remediation Suggestions
- Keep manual synchronization as the default and make scheduled execution explicitly opt-in.
- Before installation, clearly disclose that the job survives the current session, runs without per-run approval, and may upload all unignored vault content.
- Require users to verify the repository URL, repository visibility, selected branch,
.gitignore, and staged files before enabling automatic pushes. - Provide removal commands alongside installation instructions:
- Remove the relevant entries with
crontab -e. - Remove OpenClaw jobs using the applicable OpenClaw deletion command.
- Disable and remove the systemd timer and service files.
- Remove the relevant entries with
- Place scheduled scripts in a user-owned directory that is not writable by other users, and use canonical absolute paths.
- Restrict permissions on the script, service, timer, log, and conflict-marker files.
- Add integrity validation or deploy a protected immutable copy of the script before scheduling it.
- Consider separating commit creation from network upload so unattended operation does not push sensitive content without review.
- Add a dry-run or staging review mode and exclude sensitive Obsidian files through a secure default
.gitignore. - Avoid
Persistent=trueunless catch-up execution is specifically requested and its behavior is clearly explained.
