T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:18
- Finding
- Unpinned Global Installation of an Unaudited npm Executable## Vulnerability Details **File Locations**: - `SKILL.md:18-20` - `SKILL.md:34-38` - `SKILL.md:132` - `README.md:7` - `scripts/convert-to-md.sh:45-47` **Vulnerability Type**: Unpinned third-party executable dependency **Risk Level**: Medium ### Vulnerable Code `SKILL.md:18-20`: ```yaml install: - kind: node package: formatferry bins: [formatferry] ``` `SKILL.md:34-38`: ```markdown - **Node.js 18+** and **npm** must be installed - Install the CLI globally: ```bash npm install -g formatferry ``` ``` `SKILL.md:132`: ```markdown | `formatferry: command not found` | Install via `npm install -g formatferry` | ``` `README.md:7`: ```bash npm install -g formatferry ``` `scripts/convert-to-md.sh:45-47`: ```bash if ! command -v formatferry &> /dev/null; then echo "Error: formatferry not found. Install with: npm install -g formatferry" &>&2 exit 1 fi ``` ### Technical Analysis The Skill directs users or the hosting framework to install `formatferry` from npm without specifying an exact version or integrity value. The package is installed globally and subsequently executed against potentially sensitive local documents. The implementation of the npm dependency is not included in the audited project. Consequently, this audit cannot verify its lifecycle scripts, local file access, environment-variable handling, credential storage, or network behavior. An unpinned installation resolves whichever package release the registry currently serves, allowing the executable code to change after this Skill has been reviewed. Global npm installation can also execute package lifecycle scripts with the installing user's privileges. At runtime, the installed program may inherit access to local files and environment variables, including the documented `FORMATFERRY_API_KEY` and `FORMATFERRY_LICENSE_KEY`. There is also ...[truncated 2301 chars]
- Remediation
- ## Remediation Suggestions 1. Pin the dependency to an exact reviewed version, such as: ```bash npm install --save-exact formatferry@1.0.27 ``` The selected version must match the version actually reviewed and documented. 2. Avoid global installation. Declare the package as a project-local dependency and invoke the locked executable from `node_modules/.bin`. 3. Commit a lockfile containing npm integrity hashes and require deterministic frozen-lockfile installation, for example with `npm ci`. 4. Record and verify the expected package tarball integrity digest before installation. 5. Audit the exact dependency source revision, including: - npm lifecycle scripts; - outbound network destinations; - API and license-key storage; - local file access; - update mechanisms; - transitive dependencies. 6. Disable npm lifecycle scripts with `--ignore-scripts` if the reviewed package does not require them. If scripts are necessary, document and audit each script explicitly. 7. Run conversion in a restricted environment with access only to the required input and output paths. Remove unrelated secrets from the child process environment. 8. Keep local conversion offline by default. Require explicit user confirmation before enabling URL extraction or entitlement-related network access. 9. Align `SKILL.md`, `README.md`, and `references/cli-reference.md` on one verified CLI version and update them together when that version changes.
