T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:8
- Finding
- Unpinned and Unauditable Third-Party npm Dependency<![CDATA[ ## Vulnerability Details **File Locations**: - `SKILL.md:8` - `SKILL.md:52-56` - `references/quick-start.md:7` - `references/quick-start.md:13` **Vulnerability Type**: Supply-chain exposure through an unpinned external dependency **Risk Level**: Medium ### Vulnerable Code Snippets `SKILL.md:8`: ```yaml requires: - npm: "@siping/html-to-markdown-node@^1.0.1" ``` `SKILL.md:52-56`: ```bash # Install the npm package globally npm install -g @siping/html-to-markdown-node # Or install it in a project npm install @siping/html-to-markdown-node ``` `references/quick-start.md:7`: ```bash npm install -g @siping/html-to-markdown-node ``` `references/quick-start.md:13`: ```bash npm install ``` ### Technical Analysis The Skill does not contain the executable HTML-to-Markdown implementation. Instead, all runtime behavior is delegated to the external `@siping/html-to-markdown-node` npm package. The dependency declaration uses the mutable semantic-version range `^1.0.1`, while the installation commands omit a version entirely. Consequently, installation can resolve to package code that was not present during this audit. The project also provides no package lockfile or integrity hash with which to verify the exact downloaded artifact. npm installation may execute package lifecycle scripts, such as `preinstall`, `install`, or `postinstall`, with the permissions of the user running npm. The globally scoped installation command increases exposure because it installs files into the user's or system's global npm environment. No evidence was found that the currently referenced package is malicious. The vulnerability is the inability to ensure that future installations retrieve the same reviewed implementation. The quick-start documentation also instructs users to run `npm install` after cloning the repository, although the audited artifact contains no `package.json`. This creates an additional provenance and reproducibility inconsistency. ### Attack Path 1 ...[truncated 1679 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the dependency to an exact reviewed version rather than a caret range: ```yaml requires: - npm: "@siping/html-to-markdown-node@1.0.1" ``` 2. Update all installation examples to use the same exact version: ```bash npm install --save-exact @siping/html-to-markdown-node@1.0.1 ``` 3. Avoid global installation. Install the package locally in a dedicated, least-privileged project environment and invoke it through a controlled local entry point. 4. Add and commit a valid `package.json` and lockfile, such as `package-lock.json`, so npm can verify resolved versions and integrity hashes. Use `npm ci` for reproducible installation. 5. Audit the external package implementation and its transitive dependencies before release. Record the reviewed package version and artifact integrity hash. 6. Consider vendoring the minimal implementation into the Skill so the code executed by the Agent is included in the reviewed artifact. 7. Where compatible with the package, suppress dependency lifecycle scripts during installation: ```bash npm ci --ignore-scripts ``` If lifecycle scripts are required, inspect and explicitly document them before permitting execution. 8. Remove or correct the unsupported `npm install` instruction in `references/quick-start.md` unless the repository is updated to include the required npm manifest and lockfile. 9. Add automated dependency monitoring and require a fresh security review before changing the pinned dependency version. ]]>
