Back to skill

Security audit

OpenCV

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent OpenCV image-processing wrapper, but it asks users to download and run a mutable, unverified WebAssembly binary from an external GitHub branch.

Install only if you trust the publisher and the remote WASM source. Prefer a pinned release or verified SHA-256 for the WASM file, map only the specific image directory needed for each run, keep network access disabled unless strictly necessary, and use separate output folders to avoid overwriting originals.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Findings (1)

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:28
Finding
Unverified Remote WebAssembly Payload Download and Execution<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 28-42 **Vulnerability Type**: Remote payload retrieval and execution through an unpinned external artifact **Risk Level**: High ### Vulnerable Code ```markdown ```bash openclaw wasm-sandbox download \ "https://raw.githubusercontent.com/guyoung/wasm-sandbox-openclaw-skills/main/opencv/files/opencv-component.wasm" \ "~/.openclaw/skills/opencv/files/opencv-component.wasm" ``` ## Tool Use `wasm-sandbox-run` tool with the WASM file: ```javascript wasm-sandbox-run({ wasmFile: "~/.openclaw/skills/opencv/files/opencv-component.wasm", args: ["<operation>", ...args] }) ``` ``` ### Technical Analysis The Skill instructs users to download an executable WebAssembly component from the mutable `main` branch of an external personal GitHub repository and then execute that component with `wasm-sandbox-run`. The remote binary is not included in the audited project. The documentation does not pin the download to an immutable Git commit or release, specify an expected cryptographic digest, or require signature verification. Consequently, the payload executed by users can change after the Skill has been reviewed without requiring any modification to the audited files. Although the component is intended to run in a WebAssembly sandbox, the documentation directs users to expose local directories through `workDir` or `mapDir`. A compromised component could therefore operate on files available through those mappings. The operations reference also documents that outbound network access can be explicitly enabled, which could increase the impact if such permission is granted. ### Attack Path 1. An attacker compromises the external repository, its maintainer account, the publication workflow, or another mechanism capable of replacing the artifact on the mutable `main` branch. 2. The attacker replaces `opencv-component.wasm` with a malicious or backdoored WebAssembly component. 3. A user follows the S ...[truncated 1444 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. **Vendor the reviewed artifact** - Include the audited WebAssembly component in the Skill package rather than downloading it at runtime. - Review and rebuild the component from documented source code using a reproducible build process. 2. **Use an immutable source** - If remote retrieval is unavoidable, reference an immutable commit hash or versioned release artifact instead of the mutable `main` branch. - Prevent automatic updates to a newly published binary without a separate security review. 3. **Verify integrity before execution** - Publish an expected SHA-256 or stronger cryptographic digest in the Skill package. - Verify the downloaded file against that digest before placing it in the executable location. - Prefer signed release artifacts and validate the signature against a trusted, pinned signing key. 4. **Apply least-privilege directory mappings** - Create a dedicated temporary working directory containing only the files required for the current operation. - Do not map home directories, project roots, credential directories, or other sensitive paths. - Use read-only mappings for inputs where supported and separate writable output directories. 5. **Restrict network capabilities** - Keep outbound network access disabled for image-processing operations. - If network access is essential, allow only narrowly scoped hosts and document why each host is required. - Do not combine sensitive directory mappings with unnecessary outbound access. 6. **Constrain resource consumption** - Configure strict execution time, memory, file-size, and output-size limits. - Validate image dimensions and model sizes before exposing files to the component. 7. **Document provenance** - Record the source repository, immutable revision, build procedure, compiler/toolchain versions, artifact digest, and review status for every approved WASM release. ]]>
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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
Findings (2)

Vague Triggers

Medium
Confidence
90% confidence
Finding
The skill advertises a very broad set of trigger scenarios and generic keywords without clear boundaries, required user intent checks, or disambiguation rules. In an agent environment, this can cause the skill to be invoked for loosely related requests, unnecessarily exposing local files to the WASM sandbox or initiating risky image-processing workflows when a safer/native capability would suffice.

Missing User Warnings

Low
Confidence
81% confidence
Finding
This markdown file documents many commands that take `--output` or output-directory arguments, which implies writing generated files to disk, but it does not include a user-facing warning about possible overwrites or filesystem changes. Under the markdown criteria for SQP-2, behaviours that affect user data or system integrity should be disclosed.

Static analysis

No suspicious patterns detected.