Back to skill

Security audit

Review Error Handling

Security checks for vulnerabilities and agentic risk

Overview

This is a local code-review skill with optional, disclosed setup for an external Ritual CLI, so the main risk is only if the user chooses to install that CLI.

Install and use the skill locally without Ritual Cloud if you only need an error-handling review. If you choose the optional Ritual CLI path, review the npm package, avoid running it with administrator privileges, and prefer a pinned or sandboxed install where possible.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
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: Medium

Vulnerable Code Snippet:

markdown
To enable Ritual Cloud: `npm install -g @ritualai/cli` → `ritual init` → `ritual status`.

Technical Analysis

The skill recommends globally installing @ritualai/cli without 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

  1. An attacker compromises the @ritualai/cli package, its publisher account, a transitive dependency, or the npm registry used by the environment.
  2. The attacker publishes a malicious version or causes dependency resolution to return malicious content.
  3. A user or agent follows line 94 and runs npm install -g @ritualai/cli.
  4. npm retrieves the mutable, unpinned package version.
  5. Malicious lifecycle scripts can execute during installation, or malicious behavior can execute when ritual init or ritual status is invoked.
  6. The payload runs with the invoking user's permissions and can access resources available to that account.

Impact Assessment

Successful e ...[truncated 574 chars]

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-scripts where 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.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep