T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:30
- Finding
- Unpinned npm Package Is Downloaded and Executed Without Confirmation<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 30–46; related installation metadata at line 7 and automatic restoration guidance at line 96 **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium ### Vulnerable Code ```bash npx -y socialdatax-skills@latest douyin user-posts \ --sec-user-id "<sec_user_id>" --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill socialdatax-douyin-creator-videos npx -y socialdatax-skills@latest douyin user-posts \ --profile-url "<profile_url_or_share_text>" --pretty \ --source-client socialdatax-skills --source-platform clawhub \ --source-skill socialdatax-douyin-creator-videos npx -y socialdatax-skills@latest douyin user-series \ --sec-user-id "<sec_user_id>" --pretty --source-client socialdatax-skills \ --source-platform clawhub --source-skill socialdatax-douyin-creator-videos npx -y socialdatax-skills@latest douyin user-series \ --profile-url "<profile_url_or_share_text>" --pretty \ --source-client socialdatax-skills --source-platform clawhub \ --source-skill socialdatax-douyin-creator-videos ``` Related unconstrained installation metadata at line 7: ```text "install":[{"kind":"node","package":"socialdatax-skills","bins":[]}] ``` Related automatic dependency-restoration instruction at line 96: ```text If the current environment has permission, install or restore automatically. ``` ### Technical Analysis The documented commands use `npx -y`, which can download and execute an npm package without interactive confirmation. The `@latest` version selector does not identify a fixed, previously audited release. Consequently, the code executed by the Skill can change after the Skill itself has been reviewed. The installation metadata also specifies `socialdatax-skills` without a version constraint, while the troubleshooting guidance encourages automatic installation or restoration. Together, these behaviors create a supply-chain t ...[truncated 2625 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed package version, for example: ```bash npx -y socialdatax-skills@<audited-exact-version> ... ``` 2. Pin the package version in the Skill installation metadata instead of declaring only the package name. 3. Verify package integrity using a trusted lockfile, registry integrity hash, signed release, or an equivalent reproducible verification mechanism. 4. Remove or narrow the instruction to install or restore dependencies automatically. Require explicit user approval before first installation, reinstallation, or version upgrades. 5. Do not silently upgrade the dependency. Review each new version before updating the pinned version and integrity value. 6. Launch the CLI with a minimal environment containing only variables required for the operation. Avoid passing unrelated secrets to the child process. 7. Restrict the process with filesystem sandboxing, outbound-network controls, and a non-privileged operating-system identity. 8. Prefer a preinstalled and administrator-approved executable or an already configured MCP tool when available, rather than downloading executable code during each invocation. ]]>
