T09 · Insecure Skill Coding Practices
Error
- Location
- references/commands.md:6
- Finding
- Security-Critical Operations Delegate to Unbundled and Unverified External Scripts## Vulnerability Details **File Location**: `references/commands.md:6-63`; related workflow declarations in `SKILL.md:26-28,37-42` **Vulnerability Type**: Execution of ambient, unverified operational scripts **Risk Level**: High ### Vulnerable Code ```bash scripts/backup/quarkpan-login.sh scripts/backup/quark-account-guard.sh bind --confirm YES_I_UNDERSTAND scripts/backup/quark-account-guard.sh status ``` ```bash scripts/backup/backup-cron.sh daily scripts/backup/backup-cron.sh weekly ``` ```bash scripts/backup/upload-cloud.sh /path/archive.tar.gz /path/archive.tar.gz.sha256 smoke-openlist ``` ```bash scripts/backup/restore-quarkpan.sh --from-index /root/.openclaw/backup/indexes/cloud-daily-YYYY-MM-DD.txt --dry-run ``` ```bash scripts/backup/lighthouse-snapshot-create.sh --wait ``` ```bash scripts/backup/lighthouse-snapshot-prune.sh --keep 2 scripts/backup/lighthouse-snapshot-prune.sh --keep 2 --apply ``` ```bash scripts/backup/lighthouse-snapshot-apply.sh --snapshot-id lhsnap-xxxx --confirm YES_I_UNDERSTAND ``` ```bash scripts/backup/system-state-backup.sh ``` ### Technical Analysis The Skill directs users or an Agent to execute numerous programs under `scripts/backup/`, but none of those programs are included in the audited project. The only packaged executable is `scripts/check_env.sh`. Because these commands use relative paths, their targets depend on the process working directory rather than a canonical path anchored to the installed Skill. The package also provides no integrity hash, signature, ownership check, or trusted installation procedure for the missing scripts. Consequently, the security controls described by the documentation—including account UID binding, token rotation, dry-run restoration, cloud-upload safeguards, and explicit snapshot confirmation—cannot be verified. Their enforcement is delegated entirely to external code that may differ from the documented behavior. ### Attack Path 1. An attacker gains write access to the wor ...[truncated 1572 chars]
- Remediation
- ## Remediation Suggestions 1. Bundle every required operational script in the Skill so its implementation can be reviewed and distributed atomically. 2. Resolve executable paths relative to the verified Skill directory instead of the caller's working directory. 3. Refuse to proceed when any required component is absent. 4. Verify each helper's cryptographic digest or signed manifest before execution. 5. Validate that each executable is a regular file, is not a symbolic link, has trusted ownership, and is not writable by untrusted users. 6. Implement account binding, credential redaction, dry-run enforcement, and destructive-operation confirmation in the bundled and audited code. 7. Use absolute, canonical paths after validating them against an allowed installation root. 8. Apply least privilege: cloud-upload helpers should not receive snapshot or restore permissions, and destructive system operations should be isolated from ordinary backup operations. 9. Add automated integration tests proving that UID mismatch blocks uploads and that restore or snapshot operations cannot run without the required confirmation.
