T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:293
- Finding
- Unpinned Third-Party Package Installation and Execution## Vulnerability Details **File Location**: `SKILL.md:5`, `SKILL.md:172`, `SKILL.md:293`; `references/mcp-setup.md:5-7` **Vulnerability Type**: Unpinned and mutable third-party dependencies **Risk Level**: Medium ### Vulnerable Code `SKILL.md:5`: ```yaml compatibility: Requires qmd CLI or MCP server. Install via `npm install -g @tobilu/qmd`. ``` `SKILL.md:172`: ```bash npm install -g @tobilu/qmd ``` `SKILL.md:293`: ```bash RESPONSE=$(npx @anthropic/claude-code --prompt "$PROMPT" --max-tokens 1000) ``` `references/mcp-setup.md:5-7`: ```bash npm install -g @tobilu/qmd qmd collection add ~/path/to/markdown --name myknowledge qmd embed ``` ### Technical Analysis The installation and integration instructions retrieve npm packages without pinning them to reviewed versions or verifying package integrity. The `npx` example can download and immediately execute the package version selected by the npm registry at invocation time. Likewise, the global QMD installation uses a mutable package reference and may execute npm lifecycle scripts during installation. Consequently, the code ultimately executed by these instructions can change after the skill has been audited. This is a supply-chain weakness rather than evidence that the currently referenced packages are malicious. Risk arises if a package maintainer account, registry entry, transitive dependency, or future release becomes compromised. Global installation increases the affected scope because package executables are placed in the user's global npm environment and may subsequently be invoked by other applications or sessions. ### Attack Path 1. An attacker compromises a referenced npm package, a maintainer account, or one of its transitive dependencies. 2. The attacker publishes a malicious version under the existing package name. 3. A user or agent follows the documented `npm install -g @tobilu/qmd` command or invokes the unpinned package throug ...[truncated 840 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every executable dependency to a reviewed exact version, for example `@tobilu/qmd@X.Y.Z` and `@anthropic/claude-code@X.Y.Z`. 2. Prefer project-local dependencies installed from a committed lockfile rather than global npm installations. 3. Use reproducible installation such as `npm ci` with a committed lockfile and verified registry integrity metadata. 4. Avoid invoking packages directly through unpinned `npx`. Install a reviewed version first and invoke its local executable. 5. Where compatible, install with lifecycle scripts disabled and explicitly review any required installation scripts before enabling them. 6. Document the expected package publisher, version, checksum, and trusted registry. 7. Periodically review pinned versions and their transitive dependencies before performing controlled upgrades.
