T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:105
- Finding
- Unpinned Third-Party Package Installation## Vulnerability Details **File Location**: `SKILL.md:105`, `SKILL.md:129`, and `references/superdoc-reference.md:6` **Vulnerability Type**: Unpinned npm dependencies and global package installation **Risk Level**: Medium ### Vulnerable Code `SKILL.md:105`: ```bash npm install --global superdoc jsdom ``` `SKILL.md:129`: ```bash npm install @superdoc-dev/react ``` `references/superdoc-reference.md:6`: ```markdown **Installation:** `npm install superdoc` (for projects) or `npm install @superdoc-dev/react` (for React) ``` ### Technical Analysis The installation instructions do not pin the packages to exact, reviewed versions and do not require lockfile or integrity verification. Consequently, npm resolves whichever package releases and transitive dependencies are current when the commands are executed. This makes the installed code mutable after the skill has been audited. The global installation command presents additional risk because it modifies the user's global Node.js environment. npm packages can define installation lifecycle scripts, which may execute with the permissions of the user running npm. If a named package, its publisher account, or one of its transitive dependencies is compromised in the future, following these instructions could execute attacker-controlled code. The package names correspond to the documented SuperDoc packages, and the project does not contain evidence of dependency confusion, typosquatting, a malicious source, or an existing malicious payload. The finding concerns unsafe dependency acquisition practices and the resulting supply-chain exposure. ### Attack Path 1. A user follows the documented installation command. 2. npm resolves the latest available versions of the named packages and their transitive dependencies. 3. A package publisher account, package release, or transitive dependency has been compromised or contains a malicious lifecycle script. 4. npm downloads th ...[truncated 930 chars]
- Remediation
- ## Remediation Suggestions 1. Pin every direct dependency to an exact reviewed version, such as `superdoc@1.17.0`, rather than allowing npm to select a mutable latest release. 2. Specify and review an exact compatible version of `jsdom` and `@superdoc-dev/react`. 3. Prefer project-local dependencies over global installation: ```bash npm install --save-exact superdoc@1.17.0 jsdom@REVIEWED_VERSION npm install --save-exact @superdoc-dev/react@REVIEWED_VERSION ``` 4. Commit a reviewed `package-lock.json` and direct users or automation to run `npm ci`, ensuring reproducible dependency resolution. 5. Verify npm package provenance, publisher identity, registry source, and integrity metadata before installation. 6. Audit direct and transitive dependencies with appropriate software-composition-analysis tooling. 7. Where compatible with the packages' documented installation process, disable lifecycle scripts using `npm ci --ignore-scripts` and explicitly run only reviewed setup steps. 8. Execute dependency installation in a minimally privileged, isolated development environment rather than under an administrative account.
