T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:22
- Finding
- Unpinned Third-Party npm Dependency Installation## Vulnerability Details **File Location**: `SKILL.md`, lines 22-28 **Vulnerability Type**: Supply-chain risk from an unpinned third-party dependency **Risk Level**: Medium The installation documentation directs users to install a third-party npm package without specifying an exact version or providing a lockfile or integrity verification: ```markdown ## Installation To use this skill, ensure the core package is installed in your agent's runtime: ```bash npm install @criticalinsight/aarondb-edge ``` ``` ### Technical Analysis Running `npm install @criticalinsight/aarondb-edge` without an exact version resolves a package version according to the npm registry's current metadata. Consequently, the code installed in the future may differ from the code that existed when this Skill was reviewed. npm packages can also define lifecycle scripts that execute during installation. If the publisher account, package, registry path, or a transitive dependency is compromised, a malicious release may execute code with the privileges of the user or service performing the installation. The project provides no lockfile, package integrity hash, vendored implementation, or provenance-verification procedure to constrain or authenticate the installed artifact. The audit did not establish that the referenced package is currently malicious. The confirmed issue is that the documented installation process does not ensure that users receive a specific reviewed artifact. ### Attack Path 1. An attacker compromises the package publisher, publication credentials, registry entry, or a dependency used by the package. 2. The attacker publishes a malicious or otherwise compromised package release. 3. A user follows the documented unpinned `npm install` command. 4. npm resolves and downloads the attacker-controlled release or affected dependency. 5. Malicious package code may execute through an installation lifecycle script or when the agent import ...[truncated 834 chars]
- Remediation
- ## Remediation Suggestions 1. Replace the floating installation command with an exact, audited version, for example: ```bash npm install --save-exact @criticalinsight/aarondb-edge@1.1.0 ``` 2. Verify that the pinned package version corresponds to the version declared in the Skill metadata and review the published artifact before recommending it. 3. Provide and commit a lockfile containing npm integrity metadata, and instruct automated deployments to use `npm ci` rather than unconstrained `npm install`. 4. Enable npm package provenance verification where available and document the expected publisher, registry, version, and artifact identity. 5. Audit direct and transitive dependencies using appropriate supply-chain and vulnerability-scanning tools. 6. Review package lifecycle scripts. Where compatible with the package, install with lifecycle scripts disabled: ```bash npm ci --ignore-scripts ``` 7. Perform dependency installation and execution in a least-privileged, isolated environment without unnecessary credentials, filesystem access, or network permissions. 8. Establish a controlled dependency-update process so that new releases are reviewed and tested before the pinned version and lockfile are updated.
