T08 · Insecure Dependencies
- Location
scripts/clawdefender.sh:598- Finding
Unpinned Third-Party Installer Executes Before Security Scanning
- Content
View full analysis
&1; then echo -e "${RED}✗${NC} Installation failed" return 1 fi echo -e "${GREEN}✓${NC} Installed" # Scan echo "" echo -e "${BLUE}[2/2] Security scan...${NC}" local installed_path="$SKILLS_DIR/$skill_name" if [ -d "$installed_path" ]; then scan_skill_files "$installed_path" local findings=$? if [ $findings -gt 0 ]; then echo "" echo -e "${YELLOW}⚠️ Security issues detected!${NC}" read -p "Keep this skill? (y/N) " -n 1 -r echo if [[ ! $REPLY =~ ^[Yy]$ ]]; then rm -rf "$installed_path" ``` ### Technical Analysis The purportedly safe installation process invokes `npx clawhub install` before inspecting the downloaded skill. The `clawhub` package is not pinned to a specific version or verified using an integrity digest. Depending on package-manager state and registry behavior, `npx` may retrieve and execute package code. The installed skill or its installation mechanism may also perform lifecycle actions before `scan_skill_files` is reached. Consequently, the scan is retrospective and cannot prevent execution-time side effects. Deleting the installed directory after detecting a finding does not reverse commands already executed, files written elsewhere, credentials accessed, network requests made, or persistence created by an installer. The scanner also only performs regex-based inspection of selected file extensions. This is not a reliable sandbox and cannot establish that an installed package is safe to execute. ### Attack Path 1. An attacker publishes or compromises the package resolved as `clawhub`, or provides a malicious skill through the associat ...[truncated 1166 chars]- Remediation
View remediation
