T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:47
- Finding
- Automatic Retrieval and Execution of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md:47, 70-74`; `references/data-playbook.md:7, 18, 23-28, 44-67` **Vulnerability Type**: Unsafe third-party dependency retrieval and execution **Risk Level**: Medium ### Vulnerable Code ```text Main access channels are the connected westock-mcp and: npx -y westock-data-skillhub@1.0.5 ``` ```powershell npx -y westock-data-skillhub@1.0.5 quote sh600519,sz000725 npx -y westock-data-skillhub@1.0.5 kline sh600519,sz000725 --period day --limit 250 npx -y westock-data-skillhub@1.0.5 finance sh600519,sz000725 --num 8 npx -y westock-data-skillhub@1.0.5 risk sh600519,sz000725 npx -y westock-data-skillhub@1.0.5 consensus sh600519,sz000725 ``` The data playbook also establishes this command as the primary bulk-data channel: ```bash WD="npx -y westock-data-skillhub@1.0.5" $WD market-overview $WD quote $CODES $WD finance $CODES --num 8 $WD risk $CODES ``` ### Technical Analysis The Skill directs the Agent to invoke `npx` with the `-y` option. If the package is not already available locally, `npx` can retrieve it from the configured npm registry and execute its entry point without an interactive installation confirmation. Pinning the package to version `1.0.5` limits ordinary version drift, but the project does not provide or verify an npm integrity digest, lockfile, vendored artifact, trusted registry policy, or independently reviewed copy. Consequently, the effective executable payload is determined by an external package registry at execution time rather than solely by the audited repository. This creates a supply-chain execution boundary. A compromise of the named npm package, its publisher account, the configured registry, or the dependency graph used during package resolution could result in arbitrary code being run with the same operating-system privileges as the Agent. ### Attack Path 1. An attacker compromises the npm publisher account, registry distribution path, or a package dependency associated with `w ...[truncated 1102 chars]
- Remediation
- ## Remediation Suggestions 1. Vendor a reviewed release of the data client into a controlled distribution channel rather than downloading it during each workflow. 2. Verify the package tarball against a pinned SHA-256 or npm integrity value before execution. 3. Use a committed lockfile and an installation mode that enforces exact dependency integrity. 4. Prefer a trusted internal registry or allowlisted artifact repository. 5. Remove automatic `-y` execution from the default workflow and require explicit user approval before the first external package installation. 6. Run the data client in a sandbox with no access to unrelated files, credentials, or sensitive environment variables. 7. Restrict outbound network access to the specific market-data endpoints required by the client. 8. Document the package publisher, provenance, expected integrity value, and dependency-review process.
