T08 · Insecure Dependencies
- Location
SKILL.md:26- Finding
Unpinned Global npm Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 26-30;README.md, lines 19-23
Vulnerability Type: Unpinned and unaudited third-party dependency installation
Risk Level: MediumVulnerable Code
SKILL.md, lines 26-30:markdown If `allowance` is not on PATH, install it globally first:npm install -g @allowance/cli
text README.md, lines 19-23:markdown Install the Allowance CLI: ```bash npm install -g @allowance/clitext ### Technical Analysis The documented command installs the latest available version of `@allowance/cli` globally without pinning an exact version or verifying package integrity. The dependency's source code is not included in the audited project, so its behavior and npm lifecycle scripts could not be reviewed. A global npm installation can execute package lifecycle scripts and create or replace executable files in a host-wide npm binary location. Consequently, the effective code executed by this skill can change after the skill itself has been audited. Compromise of the npm publisher account, package registry, release pipeline, or an unexpectedly malicious future release could expose the agent environment to arbitrary code execution with the permissions of the account running npm. ### Attack Path 1. An attacker compromises the npm publisher account, package release pipeline, or another component responsible for publishing `@allowance/cli`. 2. The attacker publishes a malicious new version containing a lifecycle script or modified CLI executable. 3. An agent follows the skill instructions and runs `npm install -g @allowance/cli`. 4. npm retrieves the latest compromised version because no version or integrity value is pinned. 5. Malicious installation logic executes with the privileges of the agent user. 6. The installed CLI may then access files available to that user, capture purchase-related data, alter commands, or communicate with at ...[truncated 646 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a reviewed exact version, such as
@allowance/cli@X.Y.Z, rather than installing the latest release. - Lock and verify the expected package integrity hash before installation.
- Publish and verify package provenance or cryptographic release signatures.
- Prefer a project-local, isolated, or sandboxed installation rather than a global installation.
- Disable npm lifecycle scripts where operationally possible, or explicitly audit all lifecycle scripts before allowing them to execute.
- Run the CLI under a dedicated least-privileged account with restricted filesystem, environment, and network access.
- Document a controlled upgrade process requiring review and integrity verification before changing the pinned version.
- Pin the CLI to a reviewed exact version, such as
