T08 · Insecure Dependencies
- Location
SKILL.md:7- Finding
Unpinned Global Installation of a Third-Party npm Package
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 7
Vulnerability Type: Supply-chain exposure through an unpinned third-party dependency
Risk Level: MediumComplete Code Snippet:
bash npm install -g aip-openclawTechnical Analysis
The setup command installs the registry-selected latest version of
aip-openclawglobally. It does not specify an exact version, verify an integrity hash, use a lockfile, or otherwise bind the installation to the artifact that was reviewed.npm packages and their transitive dependencies may run lifecycle scripts during installation. Consequently, the effective code executed by this instruction can change whenever a package release or dependency changes. The package's implementation is not included in the audited project, so its advertised signature verification, access controls, trust-list operations, and audit logging cannot be validated from this artifact.
Global installation increases exposure by making the package available system-wide for the current environment and may grant installation-time access based on the invoking user's privileges.
Attack Path
- An attacker compromises the package maintainer account, package release process, or a transitive dependency.
- The attacker publishes a malicious version containing harmful package code or an npm lifecycle script.
- A user follows the documented setup command without an exact version constraint.
- npm resolves the compromised release or dependency from the registry.
- Malicious lifecycle code executes during installation under the invoking user's privileges.
- The globally installed package may subsequently execute additional malicious behavior whenever users or agents invoke it.
Impact Assessment
Successful exploitation may permit arbitrary code execution with the privileges of the user running npm. Depending on those privileges and the host configuration, the compromised package cou ...[truncated 356 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, security-reviewed version rather than allowing npm to select the latest release.
- Publish and verify an integrity digest or signed provenance for the approved package artifact.
- Prefer a project-local installation with a committed lockfile instead of a global installation.
- Audit the package and its complete transitive dependency tree before recommending installation.
- Disable npm lifecycle scripts with
--ignore-scriptswhen they are not required. If scripts are necessary, document and review each script before installation. - Document the expected registry and source repository, and verify that the package identity and publisher are authentic.
- Run the package with least privilege in an isolated environment. Do not install it as root or an administrative user.
- Add reproducible installation instructions that bind the package name, exact version, integrity value, and trusted registry.
