T09 · Insecure Skill Coding Practices
- Location
scripts/apply_policy.sh:4- Finding
Arbitrary Python Code Execution Through Unquoted Heredoc Expansion
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears aimed at managing two Discord bots, but it edits live bot configuration and backs up likely sensitive config files with weak scoping and unsafe script practices.
Review before installing. Use only with a dedicated least-privileged bot account, do not run the scripts with untrusted environment variables, store backups outside repositories or shared/synced folders with private permissions, and verify the generated OpenClaw configs before restarting gateways.
scripts/apply_policy.sh:4Arbitrary Python Code Execution Through Unquoted Heredoc Expansion
scripts/backup_state.sh:4Potential Exposure of Sensitive Configuration Through Insecure Backup Permissions
The skill claims security-relevant behaviors such as channel allowlists, mention-gating, one-way bridging, and backup/rollback, but the provided content only references external scripts without implementing or proving those protections. This mismatch is dangerous because operators may rely on controls that do not actually exist, leading to misconfigured bots, unintended message exposure, or unsafe recovery assumptions.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
EOF
echo "Initialized: $BASE_DIR/{bot-a,bot-b}"
echo "Next: copy .env.template -> .env and replace placeholders."
The skill instructs the agent to run local scripts and write .env files, which implies file read/write capabilities, but it declares no tool scope or permission boundaries. In an agent environment, missing explicit tool restrictions can cause overbroad access assumptions, making accidental modification of arbitrary files or unsafe handling of sensitive configuration more likely.
The script performs file-copy operations on user state files from the home directory into a backup directory, which affects user data and may duplicate potentially sensitive contents. There is no confirmation prompt, explanatory comment, or user-facing warning describing that these files will be copied.
No suspicious patterns detected.