T08 · Insecure Dependencies
- Location
SKILL.md:15- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 15-21
Vulnerability Type: Insecure third-party dependency installation
Risk Level: MediumVulnerable Code
markdown ## Installation ```bash npm install -g @clawdactual/engramThis installs the
engramCLI globally. Verify with:bash engram --helptext ### Technical Analysis The installation instructions retrieve and globally install the current version of `@clawdactual/engram` without pinning an audited version or verifying package integrity or provenance. npm packages may execute lifecycle scripts during installation, and the subsequently invoked CLI executes package-controlled code with the permissions of the user running it. The `-g` option also places the package in the user's or system's global npm environment rather than isolating it to this project. The documentation does not require inspection of lifecycle scripts, signature or checksum verification, use of a lockfile, or installation with scripts disabled. This finding does not establish that the referenced package is currently malicious. The vulnerability is the unsafe and mutable supply-chain trust model: the effective code installed in the future can differ from the code reviewed today. ### Attack Path 1. An attacker compromises the package publisher account, npm release process, or another component of the package's dependency chain. 2. The attacker publishes a malicious release under the existing package name. 3. A user follows the documented `npm install -g @clawdactual/engram` instruction. 4. npm resolves the mutable current release because no exact version or integrity value is specified. 5. Malicious lifecycle scripts may execute during installation, or malicious code executes when the user runs `engram --help` or another command. 6. The payload operates with the installing user's privileges and can access resources available to that account. ### ...[truncated 647 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the package to an exact, reviewed version rather than installing the mutable latest release:
bash npm install --save-exact @clawdactual/engram@<audited-version> - Prefer a project-local dependency over a global installation and invoke it through a locked project environment.
- Commit and enforce a lockfile containing npm integrity hashes.
- Verify package provenance, publisher identity, release signatures where available, and the integrity of the package tarball.
- Audit direct and transitive dependencies as well as npm lifecycle scripts before approving a release.
- In controlled deployments, install with lifecycle scripts disabled unless they have been explicitly reviewed:
bash npm install --ignore-scripts - Execute the CLI in a least-privileged account or sandbox with access restricted to the repositories and files required for the task.
- Document an approved version-upgrade and security-review process instead of allowing automatic adoption of new releases.
- Pin the package to an exact, reviewed version rather than installing the mutable latest release:
