T08 · Insecure Dependencies
- Location
SKILL.md:94- Finding
Unpinned Global Installation of a Third-Party CLI
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, line 94
Vulnerability Type: Supply-chain risk from an unpinned third-party dependency
Risk Level: MediumVulnerable Code Snippet:
markdown To enable Ritual Cloud: `npm install -g @ritualai/cli` → `ritual init` → `ritual status`.Technical Analysis
The skill recommends globally installing
@ritualai/cliwithout specifying an exact version, lockfile, integrity hash, or package provenance verification. Consequently, the command resolves to whichever package version the configured npm registry serves at execution time. The installed implementation can therefore change after this skill has been reviewed.npm installation may execute package lifecycle scripts. If the package, its publishing account, one of its transitive dependencies, or the configured registry is compromised, installation could execute attacker-controlled code with the privileges of the invoking user. Global installation also exposes the CLI beyond the audited project and may modify user- or system-level npm directories and executable paths.
This instruction is optional and does not automatically execute the command. Exploitation requires a user or agent to follow the installation guidance.
Attack Path
- An attacker compromises the
@ritualai/clipackage, its publisher account, a transitive dependency, or the npm registry used by the environment. - The attacker publishes a malicious version or causes dependency resolution to return malicious content.
- A user or agent follows line 94 and runs
npm install -g @ritualai/cli. - npm retrieves the mutable, unpinned package version.
- Malicious lifecycle scripts can execute during installation, or malicious behavior can execute when
ritual initorritual statusis invoked. - The payload runs with the invoking user's permissions and can access resources available to that account.
Impact Assessment
Successful e ...[truncated 574 chars]
- An attacker compromises the
- Remediation
View remediation
Remediation Suggestions
- Pin the dependency to an exact, reviewed version rather than resolving the latest release, for example
@ritualai/cli@<reviewed-version>. - Prefer a project-local, lockfile-controlled installation over a global installation.
- Verify package provenance, registry origin, signatures or attestations, and published integrity metadata before installation.
- Review the package and its transitive dependencies, including all npm lifecycle scripts.
- Use installation controls such as
--ignore-scriptswhere compatible, and run the tool in a least-privileged or sandboxed environment. - Require explicit user confirmation before installing or executing the optional external CLI.
- Warn users not to invoke the installation with administrator or root privileges.
- Pin the dependency to an exact, reviewed version rather than resolving the latest release, for example
