T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:15
- Finding
- Unpinned Third-Party npm Dependency## Vulnerability Details **File Location**: `SKILL.md`, lines 15–18 **Vulnerability Type**: Unpinned third-party dependency installation **Risk Level**: Medium ```markdown ## Installation ```bash npm install @supernal/universal-command ``` ``` ### Technical Analysis The installation instructions retrieve `@supernal/universal-command` from the npm registry without specifying an exact, audited version. The project also contains no package lockfile or integrity metadata that would ensure reproducible dependency resolution. Consequently, the effective package contents may change after this skill has been reviewed. An npm package can also execute lifecycle scripts during installation. If the package, a transitive dependency, its publisher account, or the associated supply chain is compromised, following this instruction could execute attacker-controlled code with the permissions of the user running `npm install`. The referenced source is the standard npm registry rather than an obviously malicious or spoofed domain. No malicious package behavior is demonstrated in the supplied artifact; the finding concerns the unsafe and mutable dependency-installation pattern. ### Attack Path 1. A user or agent loads the skill and follows its installation instructions. 2. `npm install @supernal/universal-command` resolves the package version currently selected by npm rather than a version fixed during security review. 3. An attacker compromises the package, a transitive dependency, or a package-publisher account and publishes a malicious version. 4. npm downloads that version and may execute its lifecycle scripts during installation. 5. The malicious code runs under the invoking user's account and can access resources available to that account. ### Impact Assessment Successful exploitation could execute arbitrary code with the privileges of the user performing the installation. Depending on that user's environment, the scope may ...[truncated 473 chars]
- Remediation
- ## Remediation Suggestions - Pin the dependency to a specific version that has been reviewed, rather than relying on npm's current version resolution: ```bash npm install --save-exact @supernal/universal-command@<audited-version> ``` - Commit `package.json` and `package-lock.json` so the exact dependency graph and integrity hashes are recorded. - Use `npm ci` in automated and reproducible environments to enforce the lockfile. - Review the selected package version, its transitive dependencies, provenance, publisher history, and lifecycle scripts before adoption. - Use `npm install --ignore-scripts` or an equivalent policy where dependency lifecycle scripts are not required. - Apply dependency allowlisting, registry controls, lockfile verification, and automated supply-chain scanning in CI. - Perform upgrades through an explicit review process instead of automatically accepting newly published versions.
