Back to skill

Security audit

OCC for OpenClaw

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent audit plugin, but it asks users to install and run unpinned npm tools with broad OpenClaw and Cloudflare-related authority.

Install only if you trust the publisher and are comfortable with an OpenClaw extension recording metadata for every tool action. Prefer pinned package versions, avoid running npm or OpenClaw as root, use stub or self-hosted mode for sensitive environments, and use narrowly scoped Cloudflare credentials if deploying the notary worker.

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:47
Finding
Unpinned Third-Party npm Packages Executed with Broad Integration Privileges<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 47–48; related execution instructions at lines 94–100, 121–127, and 161 **Vulnerability Type**: Unpinned and dynamically resolved third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```bash npm install -g openclaw-occ openclaw-occ install ``` Additional affected instructions: ```bash npx occ-verify # recent proofs (last 7 days) npx occ-verify --verbose # full detail per proof npx occ-verify --check # re-verify all proofs against notary npx occ-verify --tool bash # filter by tool name npx occ-verify --date 2026-02-27 # filter to a specific date npx occ-verify --session <id> # filter by session npx occ-verify --json # raw JSON output (for piping / scripting) ``` ```bash cd ~/.openclaw/extensions/openclaw-occ/notary-worker npx wrangler kv:namespace create OCC_PROOFS # Copy the output ID into wrangler.toml under [[kv_namespaces]] npx wrangler deploy ``` The document also identifies Wrangler authentication as a prerequisite: ```bash npx wrangler login ``` ### Technical Analysis The installation command globally installs `openclaw-occ` without pinning an exact package version or verifying package integrity. Consequently, the installed artifact is whichever release the npm registry resolves at execution time, rather than a version that can be tied reliably to the source reviewed during this audit. The `npx occ-verify` and `npx wrangler` instructions likewise do not specify exact versions. If an appropriate trusted local package is unavailable, `npx` may retrieve and execute a package from the npm registry. This creates a mutable remote execution boundary: registry contents, package ownership, and future releases can change independently of the audited `SKILL.md`. The risk is elevated because the installed OpenClaw plugin is documented as observing every agent tool action and integrating a ...[truncated 2291 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin every executable npm dependency to an exact reviewed version, for example: ```bash npm install -g openclaw-occ@1.1.1 npm exec --package=occ-verify@<reviewed-version> -- occ-verify npm exec --package=wrangler@<reviewed-version> -- wrangler deploy ``` 2. Verify package integrity before execution: - Publish expected npm integrity hashes or signed provenance. - Document how users can compare the package checksum and provenance with a trusted release. - Tie each recommended package release to a specific reviewed source commit. 3. Prefer a project-local installation with a committed lockfile over global installation. Use deterministic installation commands such as `npm ci` where practical. 4. Disable or carefully review dependency installation scripts when they are unnecessary. Perform installation in a restricted environment before enabling the package as an OpenClaw extension. 5. Run OpenClaw, npm, and Wrangler under least-privileged accounts. Do not perform these commands as root or with unnecessary filesystem, secret, or network access. 6. Separate Wrangler authentication and deployment from unrelated package execution. Use narrowly scoped Cloudflare credentials and rotate them if an executed package is suspected of compromise. 7. Document a package update and review process so that version changes require renewed source inspection, integrity verification, and testing before deployment. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (12)

Session Persistence

Medium
Category
Rogue Agent
Content
## Configuring

Create `~/.openclaw/workspace/occ.json`. There are three modes:

| Mode | What it does |
|------|-------------|
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill instructs users to run `npx occ-verify` without pinning an explicit package version. `npx` may fetch and execute the latest package at runtime, which creates a supply-chain execution risk if the package is updated maliciously, compromised, or replaced.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
This line again recommends `npx occ-verify` without a pinned version, causing users to execute whatever version resolves at that time. In a security-focused skill, unpinned runtime package execution is especially problematic because it undermines the trust guarantees the tool claims to provide.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The `--check` variant still relies on unpinned `npx` execution, so the same supply-chain risk applies here. An attacker controlling the package distribution path could gain code execution when a user attempts to verify proofs.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
Using `npx occ-verify --tool bash` without version pinning permits execution of an untrusted latest package version. Because this command is positioned as a verification workflow, compromise here could mislead auditing or execute arbitrary code on the host.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
This date-filtered `npx occ-verify` example remains vulnerable to package substitution or malicious updates due to lack of version pinning. The context increases risk because users may assume audit tooling is inherently trustworthy and skip independent validation.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The session-filtered example invokes `npx` without constraining the resolved package version. This exposes users to arbitrary code execution from the package registry or dependency compromise path.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The raw JSON output example still executes an unpinned package via `npx`, preserving the same supply-chain risk. Any compromise of the package could affect systems using this output in scripts or pipelines.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
`npx wrangler login` is an unpinned runtime package execution that may download and run the latest `wrangler` package. Since this command handles Cloudflare authentication, compromise could expose credentials or grant attacker-controlled deployment access.

Session Persistence

Medium
Category
Rogue Agent
Content
```bash
cd ~/.openclaw/extensions/openclaw-occ/notary-worker
npx wrangler kv:namespace create OCC_PROOFS
# Copy the output ID into wrangler.toml under [[kv_namespaces]]
npx wrangler deploy
```
Confidence
60% confidence
Finding
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
`npx wrangler kv:namespace create OCC_PROOFS` executes an unpinned CLI package, which is a supply-chain risk with access to Cloudflare account resources. A malicious version could create, alter, or exfiltrate infrastructure configuration and secrets.

Rp1

Medium
Category
MCP Rug Pull
Confidence
91% confidence
Finding
`npx wrangler deploy` without version pinning can execute arbitrary code from a compromised package version during deployment. Because deployment commands affect internet-facing infrastructure, the blast radius includes credential theft, malicious code deployment, and service takeover.

Static analysis

No suspicious patterns detected.