T09 · Insecure Skill Coding Practices
- Location
scripts/add-job.sh:36- Finding
Python Code Injection Through Job Fields and Database Path
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This construction project-management skill is coherent in purpose, but its shell scripts can turn job fields, email text, or workspace paths into executable Python code.
Review this skill before installing. Its local job database behavior is disclosed and useful, but do not run the current scripts on untrusted emails, externally supplied job fields, or unusual DATA_DIR/OPENCLAW_WORKSPACE paths until the Python invocation is rewritten to pass values as data rather than source code.
scripts/add-job.sh:36Python Code Injection Through Job Fields and Database Path
scripts/parse-email.sh:19Arbitrary Python Execution Through Untrusted Email Content
scripts/pipeline.sh:25Python Code Injection Through Pipeline Filters and Workspace Path
scripts/briefing.sh:15Python Code Injection Through Briefing Threshold or Database Path
scripts/permit-check.sh:15Python Code Injection Through Permit Threshold or Database Path
scripts/init.sh:19Python Code Injection Through Initialization Data Path
The skill advertises shell-based workflows that initialize a database and write job/briefing data to the filesystem, but the manifest does not declare any tool scope such as permissions or allowed-tools. That mismatch weakens policy enforcement and increases the chance an agent can perform file writes without an explicit, reviewable declaration of that capability.
This code performs a direct write to the persistent jobs.json database, which can modify or overwrite user data. Although the script prints a success message afterward, there is no prior warning, confirmation, or inline disclosure that running the command will rewrite the database file.
The skill description defines multiple broad, loosely bounded use cases such as tracking jobs, generating briefings, parsing emails, and monitoring pipeline status, which increases the chance an agent will invoke the skill in contexts where it has not been narrowly justified. In practice, overly broad activation criteria can expose project, financial, and email-derived data to unintended processing paths and make risky script execution more likely without clear user intent.