T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:10
- Finding
- Unpinned Global Installation of a Third-Party npm Package## Vulnerability Details **File Location**: `SKILL.md`, lines 10–12 **Vulnerability Type**: Unpinned third-party dependency installed globally **Risk Level**: Medium **Vulnerable code snippet**: ```markdown If not installed: `npm install -g defuddle` ``` ### Technical Analysis The Skill instructs users or agents to install the latest available version of `defuddle` from the configured npm registry. The command does not pin a reviewed version or verify package integrity. Consequently, the package contents executed during installation can differ from those assessed when the Skill was reviewed. npm installation may execute package lifecycle scripts such as `preinstall`, `install`, or `postinstall`. If the package, one of its dependencies, the registry account, or registry resolution is compromised, those scripts can execute arbitrary commands with the privileges of the user running npm. The `-g` option also installs the package globally. This exceeds the minimum scope needed to process web pages because a project-local, version-pinned installation would be sufficient. Global installation can modify user-level global npm directories and expose executables across unrelated projects. The instruction does not explicitly request elevated privileges, so root-level impact depends on whether the operator independently runs it with administrative permissions. The separate instructions to run `defuddle parse <url>` necessarily cause network access to retrieve a user-selected webpage. That behavior is consistent with the declared webpage-extraction functionality, and the reviewed file does not instruct Defuddle to collect credentials or upload local sensitive files. Therefore, the pre-scan network alert is not confirmed as data exfiltration. ### Attack Path 1. An attacker compromises the `defuddle` npm publisher account, a transitive dependency, or the registry used by the environment. 2. The attacker publishes or serves a maliciou ...[truncated 1198 chars]
- Remediation
- ## Remediation Suggestions - Pin Defuddle to a specifically reviewed version instead of resolving the mutable latest release. - Prefer a project-local dependency recorded in `package.json` and a committed lockfile rather than using `-g`. - Use deterministic installation, such as `npm ci`, with lockfile integrity metadata. - Review the selected package version, its transitive dependencies, and any lifecycle scripts before permitting installation. - Where lifecycle scripts are unnecessary, consider installing with `--ignore-scripts`, subject to compatibility testing. - Configure npm to use an approved registry and validate package provenance or signatures where supported. - Run the parser under a non-privileged account or sandbox with access limited to the required destination URL and output location. - Document that operators must not use `sudo` or another privilege-elevation mechanism for installation.
