T08 · Insecure Dependencies
- Location
INSTALL_AND_BOOTSTRAP.md:13- Finding
Unpinned npm Package Installation with Root Privileges
- Content
View full analysis
Vulnerability Details
File Location:
INSTALL_AND_BOOTSTRAP.md:13-16
Related Locations:SKILL.md:9,INSTALL_AND_BOOTSTRAP.md:36
Vulnerability Type: Unpinned third-party dependency installation and privileged npm execution
Risk Level: MediumVulnerable Code
bash npm i -g cloudcc-cli sudo npm i -g cloudcc-cliThe generated project dependencies are also installed without a documented lockfile-integrity requirement:
bash npm iIn addition,
SKILL.md:9instructs the agent to install the globalcloudcc-clipackage whenever it is unavailable.Technical Analysis
The documentation installs the current registry release of
cloudcc-cliwithout specifying an audited version, integrity hash, trusted registry, package provenance, or verified publisher. The audited project does not include the package implementation, apackage.json, a lockfile, a checksum, or signature information that would allow the downloaded artifact to be validated against the reviewed content.npm packages and their transitive dependencies may execute lifecycle scripts during installation. If the package publisher, registry account, release process, or a transitive dependency is compromised, an attacker could introduce arbitrary executable code into a release after this Skill has been reviewed.
The suggested
sudo npm i -gcommand substantially increases the consequence of such a supply-chain compromise because installation scripts may execute with root privileges. The unqualifiednpm icommand used in a generated project can similarly resolve dependency versions not represented in this repository unless the generated project contains and enforces a trusted lockfile.Attack Path
- An attacker compromises the
cloudcc-clipackage, its publisher account, or one of its transitive dependencies. - The attacker publishes a malicious version containing an npm lifecycle script or malicious runtim ...[truncated 1695 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
-
Pin
cloudcc-clito a specific, reviewed version rather than installing the latest registry release:bash npm install --global cloudcc-cli@<audited-version> -
Verify the package name, npm publisher, source repository, release provenance, and registry before installation.
-
Record and verify the expected package integrity digest or use npm provenance and signature verification where supported.
-
Remove the recommendation to execute npm through
sudo. Configure a user-owned global npm prefix, use an isolated development container, or invoke a locally pinned dependency instead. -
Prefer a project-local development dependency with an exact version and execute it through a controlled package script.
-
Require a reviewed lockfile for generated projects and replace unrestricted
npm iusage with:bash npm ci -
Disable package lifecycle scripts during initial inspection where practical, then explicitly permit only scripts that have been reviewed.
-
Require explicit user confirmation before installing dependencies or publishing assets to a CloudCC environment.
-
Run the CLI under a least-privileged operating-system account and use CloudCC credentials limited to the minimum required development environment and permissions.
-
