T08 · Insecure Dependencies
- Location
SKILL.md:32- Finding
Unpinned Global npm Package Installation Creates Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:32
Vulnerability Type: Unpinned third-party dependency installed globally
Risk Level: MediumComplete Code Snippet:
bash npm install -g okrapdfTechnical Analysis
The setup instructions install the mutable latest release of the third-party
okrapdfnpm package without a pinned version, lockfile, integrity hash, or provenance verification. Because the package is installed globally, npm may execute package lifecycle scripts with the privileges of the invoking user and place executable commands in a globally accessible location.The audited project contains only documentation and does not include the package source or dependency metadata needed to verify the code ultimately fetched from the npm registry. Consequently, the effective installed payload can change after this Skill has been reviewed.
This is an insecure dependency installation pattern rather than evidence that the current
okrapdfpackage is malicious.Attack Path
- An attacker compromises the npm package publisher account, registry distribution path, or a transitive dependency.
- The attacker publishes a malicious release that becomes the version resolved by the unpinned installation command.
- A user follows the documented setup instructions and runs
npm install -g okrapdf. - npm downloads the compromised release and may execute its installation lifecycle scripts.
- The malicious code executes under the installing user's account and can establish any access available to that account.
Impact Assessment
Successful exploitation could permit arbitrary code execution with the privileges of the user running npm. Depending on that user's permissions and environment, this could expose user-accessible files, environment variables, API credentials, agent configuration, and network resources. A malicious package could also replace or modify the globally installed
okrae ...[truncated 271 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the CLI to a specific reviewed version, for example:
bash npm install -g okrapdf@X.Y.Z - Document the expected package integrity digest and require verification against trusted release metadata.
- Enable npm provenance and signature verification where available, and publish links to the package's auditable source and release commit.
- Prefer a project-local installation with a committed lockfile over a global installation:
bash npm install --save-exact okrapdf@X.Y.Z npx okra --help - Review package lifecycle scripts and transitive dependencies before approving version updates.
- Avoid running npm installation commands with
sudo, administrator rights, or other elevated privileges. - Consider recommending
--ignore-scriptswhen lifecycle scripts are not required, after verifying that this does not break legitimate installation behavior.
- Pin the CLI to a specific reviewed version, for example:
