T09 · Insecure Skill Coding Practices
- Location
scripts/git-auto-push.sh:6- Finding
Unrestricted Workspace Content Is Automatically Committed and Uploaded
- Content
View full analysis
&1 | tee -a "$LOG_FILE" # Upload log "Pushing to Gitee..." git push origin main 2>&1 | tee -a "$LOG_FILE" ``` ### Technical Analysis The script operates on the entire `/home/admin/.openclaw/workspace` repository and invokes `git add -A`, which stages every tracked and untracked change not excluded by Git configuration. It does not restrict collection to the six synchronization directories documented by the Skill. There is no validation of `.gitignore`, no sensitive-file denylist, no secret scanning, no remote URL verification, and no confirmation before transmission. The use of `--no-verify` also bypasses local commit hooks that might otherwise enforce security checks. When combined with the documented five-minute cron schedule, any sensitive file introduced into the repository can be committed and transmitted automatically. ### Attack Path 1. A credential, API key, private note, configuration file, agent memory file, or generated secret is created anywhere in the workspace repository. 2. The file is not excluded by the repository's current Git ignore rules. 3. The scheduled script detects a repository change. 4. `git add -A` stages the sensitive file. 5. `git commit --no-verify` bypasses local commit verification hooks. 6. `git push origin main` uploads the content to the configured remote. 7. Anyone ...[truncated 724 chars]- Remediation
View remediation
