T08 · Insecure Dependencies
Error
- Location
- references/skill-search.md:76
- Finding
- Third-Party Skills Are Installed Before Security Review<![CDATA[ ## Vulnerability Details **File Location**: `references/skill-search.md:76-87`, `references/skill-search.md:110-116` **Vulnerability Type**: Unsafe third-party dependency installation **Risk Level**: High ### Vulnerable Code ```bash ## Step 5: Skill Install (Conditional) Only if selected skill is from registry (not local): **Skills.sh:** ```bash npx skills add <slug> -g -y ``` **ClawHub:** ```bash clawhub install <slug> ``` ``` The security audit occurs only after installation: ```bash ## Step 7: Security Audit Run automated security audit on installed skill: ```bash python scripts/audit_skill.py --skill ./skills/<skill-name> --output ${OUTPUT_DIR}/02-audit.md ``` ``` ### Technical Analysis The workflow installs skills obtained from external registries before inspecting their contents. The Skills.sh command is global and non-interactive because it uses `-g -y`. The ClawHub command similarly installs a registry-selected skill before the local audit is performed. A post-installation static scan cannot protect against code executed during package resolution, installation hooks, CLI behavior, or other installer-controlled operations. If a registry package or one of its dependencies is malicious or compromised, code may execute before `audit_skill.py` has an opportunity to reject it. The automated audit is also only a pattern-based scanner. It does not establish package provenance, verify immutable digests, inspect dependency graphs, or prevent installation-time execution. ### Attack Path 1. An attacker publishes a malicious skill or compromises an existing registry skill. 2. The malicious skill is returned by `npx skills find` or `clawhub search`. 3. The user selects the skill through the documented checkpoint. 4. The workflow runs `npx skills add <slug> -g -y` or `clawhub install <slug>`. 5. The registry client, package installer, or installation hooks execute attacker-controlled code with the invoking user's privileges. 6. The security aud ...[truncated 793 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Download candidate skills into a dedicated, isolated temporary directory before installation. 2. Disable package lifecycle scripts and other automatic execution while retrieving candidates. 3. Audit the complete candidate package and its dependency tree before any executable installation step. 4. Pin dependencies to immutable versions and verify publisher identity, checksums, signatures, or content digests. 5. Avoid global and non-interactive installation for untrusted candidates. Install into a project-scoped sandbox only after explicit approval. 6. Run registry clients and validation in a container or restricted process with: - No SSH agent or credential-store access - No cloud credentials - Read-only project access where possible - Restricted outbound network access - A disposable home directory 7. Expand auditing beyond regex matching to include dependency manifests, install hooks, executable files, symbolic links, and provenance metadata. 8. Require a second confirmation after displaying the exact source, version, digest, requested permissions, and audit results. ]]>
