T08 · Insecure Dependencies
- Location
SKILL.md:103- Finding
Automatic Download and Execution of an Unverified npm Dependency
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 103-108
Vulnerability Type:T08: Insecure Dependencies
Risk Level: MediumVulnerable Code
markdown ## Optional: MCP instead of REST If the agent uses MCP, the same three actions are available keyless via the Shieldz MCP server: remote at `https://shieldz.cash/mcp`, or local with a **pinned** version `npx -y @shieldz/mcp@0.3.0`. Tools: `create_payment_link`, `create_tip_jar`, `get_account_status`.Technical Analysis
The local MCP option instructs the agent to execute
npx -y @shieldz/mcp@0.3.0. The-yoption suppresses interactive confirmation, whilenpxmay retrieve the package from the configured npm registry and immediately execute package code.Pinning the version reduces exposure to unreviewed future releases but does not establish package integrity or prove that version
0.3.0is safe. The instruction does not require a verified lockfile, package integrity hash, vendored and reviewed source, disabled lifecycle scripts, or sandboxing. Package installation or execution can therefore run code with the privileges and environmental access of the agent process.This behavior also conflicts with the safety statement later in the file claiming that the skill performs no dynamic code execution. The REST and remote MCP alternatives do not require this local npm execution path, so the vulnerable behavior is limited to users or agents selecting the optional local MCP mode.
Attack Path
- A user or agent selects the documented local MCP option.
- The agent runs
npx -y @shieldz/mcp@0.3.0. npxobtains the package and its dependency graph from the configured npm registry or cache without requesting interactive approval.- npm lifecycle scripts, package entry points, or transitive dependency code execute locally.
- If the package, one of its dependencies, the registry response, or the local npm configuration has been c ...[truncated 1036 chars]
- Remediation
View remediation
Remediation Suggestions
- Prefer the documented REST API, which avoids downloading and executing an npm package locally.
- If local MCP support is required, vendor and manually audit the exact package source and its complete transitive dependency graph.
- Install dependencies through a committed lockfile containing registry integrity hashes rather than invoking
npxdirectly at runtime. - Use a trusted private registry or other controlled artifact source, and verify package provenance or signatures where supported.
- Disable npm lifecycle scripts during installation where compatible, then explicitly run only reviewed entry points.
- Execute the MCP process in a restricted sandbox or container with minimal filesystem access, no unnecessary environment variables, a read-only working directory, and tightly controlled network egress.
- Remove the automatic-confirmation option (
-y) so package retrieval and execution cannot occur silently. - Update the safety summary to disclose that the optional local MCP path downloads and executes third-party code, rather than claiming that no dynamic code execution occurs.
