T08 · Insecure Dependencies
- Location
SKILL.md:8- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 8-10
Vulnerability Type: Supply-chain exposure through an unpinned third-party dependency
Risk Level: MediumVulnerable Code Snippet:
markdown ## Installation ```bash npm install -g @joargp/acclitext ### Technical Analysis The installation instructions retrieve and globally install the latest version of `@joargp/accli` without specifying an exact version, integrity hash, lockfile, or verified artifact source. Consequently, the code installed at execution time may differ from the code that was available when this skill was reviewed. npm packages can define lifecycle scripts that execute during installation. If the package publisher account, package release process, registry entry, or a transitive dependency is compromised, following this instruction could execute attacker-controlled code with the privileges of the user running npm. Global installation also increases exposure by making the installed command available across the user's environment. The audited project does not contain the package implementation, so this finding does not establish that `@joargp/accli` is malicious. It identifies an unsafe and mutable dependency-installation mechanism. ### Attack Path 1. An attacker compromises the npm publisher account, release pipeline, package registry entry, or a transitive dependency associated with `@joargp/accli`. 2. The attacker publishes a malicious release under the same package name or introduces malicious installation/runtime code into a dependency. 3. A user or agent follows `SKILL.md` and runs `npm install -g @joargp/accli`. 4. npm resolves the current package version rather than a previously reviewed, immutable version. 5. Attacker-controlled lifecycle or runtime code executes with the installing user's privileges. 6. The malicious code can access resources available to that user, including local files and calendar data, a ...[truncated 720 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version instead of installing the mutable latest release:
bash npm install -g @joargp/accli@<reviewed-exact-version> - Verify the downloaded package against a documented integrity hash or other authenticated release signature.
- Document and verify the package's canonical npm registry page and source repository before installation.
- Audit the selected release, its lifecycle scripts, and all transitive dependencies.
- Prefer a project-local installation with a committed lockfile over a global installation, then invoke the pinned local binary.
- Disable npm lifecycle scripts with
--ignore-scriptsif the reviewed package does not require them. - Run the tool as a non-administrative user and grant only the minimum macOS Calendar permissions required.
- Establish a controlled dependency-update process in which new versions are reviewed and tested before changing the pinned version.
- Pin the dependency to an exact, reviewed version instead of installing the mutable latest release:
