T09 · Insecure Skill Coding Practices
- Location
audit.sh:51- Finding
Incomplete and Non-Atomic Pre-Installation Security Audit
- Content
View full analysis
/dev/null) || { echo "❌ Could not fetch skill '$VALUE' from ClawHub" exit 1 } # Collect code from SKILL.md and any .sh/.js/.py/.ts files code="" for fname in SKILL.md $(echo "$files" | jq -r '.files[]?.path // empty' 2>/dev/null | grep -E '\.(sh|js|ts|py|md)$'); do content=$(clawhub inspect "$VALUE" --file "$fname" 2>/dev/null) || continue ``` The file collection loop concludes at `audit.sh:62`: ```bash code+="--- FILE: $fname ---"$'\n'"$content"$'\n\n' done ``` After a safe verdict, `safe-install.sh:124-128` performs a new name-based installation: ```bash SAFE|LOW_RISK) echo -e "✅ Skill looks safe. Installing..." echo "" exec clawhub install "$SKILL" ;; ``` ### Technical Analysis The security decision does not cover the complete artifact that is subsequently installed: 1. The extension filter only includes `.sh`, `.js`, `.ts`, `.py`, and `.md` files. 2. Extensionless executables, binaries, configuration files, package lifecycle definitions, and files using other script extensions are omitted. 3. Failure to retrieve an individual selected file is silently ignored through `|| continue`, so the audit can proceed with incomplete input. 4. The audit and installation are separate ClawHub operations identified only by the skill name. 5. No immutable version, artifact digest, or signature binds the audited contents to the installed contents. Consequently, a ...[truncated 1825 chars]- Remediation
View remediation
