T08 · Insecure Dependencies
- Location
SKILL.md:23- Finding
Unpinned Global npm Package Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 23
Vulnerability Type: Supply-chain risk from an unpinned third-party dependency
Risk Level: MediumVulnerable Code:
text npm: `npm install -g swarmclaw`Technical Analysis
The documented command installs the latest available version of the
swarmclawpackage from the configured npm registry without pinning an exact, reviewed version or verifying the package's integrity or signature. Because npm packages may define lifecycle scripts that execute during installation, following this command can run package-controlled code with the permissions of the installing user.The use of the global installation option (
-g) increases the potential scope because the package can modify globally shared npm locations and expose commands on the user's executable path. The repository provides no lockfile, checksum, signature, registry restriction, or publisher verification mechanism for the artifact obtained by this command.Attack Path
- An attacker compromises the npm package, its publisher account, or the associated release pipeline, or otherwise causes a malicious version to be served under the expected package name.
- A user follows the documented
npm install -g swarmclawinstruction. - npm resolves the mutable latest release rather than a previously reviewed exact version.
- npm downloads and installs the attacker-controlled package.
- Malicious npm lifecycle scripts can execute during installation with the installing user's privileges.
- The compromised package can modify user-accessible files, install globally available commands, access data available to the installation process, or alter subsequent command execution.
Impact Assessment
Successful exploitation can provide arbitrary code execution with the privileges of the user running npm. The attacker could read or modify files accessible to that user, access environment varia ...[truncated 482 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the installation instruction to an exact, reviewed version rather than resolving the latest release, for example:
bash npm install -g swarmclaw@2.4.1 - Document the expected npm registry and verified publisher identity to reduce dependency-confusion and registry-substitution risks.
- Publish and document a cryptographic checksum, provenance attestation, or package-signature verification procedure for each supported release.
- Prefer a project-local, lockfile-controlled installation over a global installation where operationally possible.
- Use
--ignore-scriptswhen lifecycle scripts are not required:bash npm install --ignore-scripts --save-exact swarmclaw@2.4.1 - If lifecycle scripts are required, review them and the package contents before installation, and perform installation under a dedicated least-privileged account.
- Establish a controlled upgrade process so that newer versions are reviewed and explicitly approved before the documented pin is updated.
- Pin the installation instruction to an exact, reviewed version rather than resolving the latest release, for example:
