T08 · Insecure Dependencies
- Location
SKILL.md:70- Finding
Execution of Unpinned Third-Party Packages Through npx
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:70-160;_meta.json:37-40
Vulnerability Type: Unpinned runtime dependencies and unsafe package execution
Risk Level: HighEvidence
SKILL.md:88-94:bash # Add stocks to the watchlist npx stock-watcher add 600519 000001 # Display the watchlist npx stock-watcher list # Obtain a performance summary npx stock-watcher summary_meta.json:37-40:json "akshare": "npx akshare-stock get_price/financials/sector_info", "china": "npx china-stock-analysis query/analyze/full_report", "watcher": "npx stock-watcher add/list/summary", "analysis": "npx stock-analysis portfolio/sentiment"Additional unpinned invocations of the same packages appear in
SKILL.md:70-82,SKILL.md:100-101,SKILL.md:122-146, andSKILL.md:155-160.Technical Analysis
The skill instructs users or agents to execute
akshare-stock,china-stock-analysis,stock-watcher, andstock-analysisdirectly throughnpx. None of these commands specifies an exact package version. The submitted project also contains no package lockfile, integrity hashes, vendored implementation, or source code for the referenced packages.When a requested package is not already available locally,
npxcan retrieve it from the configured package registry and execute its lifecycle or command-line code. Because the selected package version and package contents can change after this skill has been audited, the code ultimately executed is outside the reviewed artifact. Package-owner compromise, malicious version publication, registry compromise, or dependency confusion could therefore turn the documented workflow into an arbitrary-code execution channel.The statement that the packages are already installed does not mitigate this issue within the submitted artifact. The listed external installation directory and package implementations are absent from the project and could not be ...[truncated 1597 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every package to a specifically reviewed immutable version, for example:
bash npx --yes stock-watcher@1.2.3 summary - Verify the package names, publishers, source repositories, release provenance, and ownership before documenting or executing them.
- Manage the packages through a committed manifest and lockfile containing registry-resolved versions and integrity hashes rather than resolving current releases at each invocation.
- Prefer vendoring reviewed implementations or including auditable source code in the skill package.
- Use a trusted private registry or an allowlisted proxy that only serves approved package versions.
- Disable dependency lifecycle scripts where operationally possible, such as by installing reviewed dependencies with
--ignore-scripts. - Execute financial-analysis packages in a sandbox or container with restricted filesystem access, no unnecessary credentials, and limited outbound networking.
- Validate package integrity and provenance in CI before publishing the skill, and repeat the audit whenever a pinned dependency is upgraded.
- Remove or clearly qualify claims that dependencies are installed unless their exact installed versions and verified locations are included in the auditable artifact.
- Pin every package to a specifically reviewed immutable version, for example:
