Back to skill

Security audit

Opencli Exec

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small compatibility alias, but it sends the agent and shell execution to unreviewed files at a fixed local path outside the package.

Install only if you intentionally maintain the referenced opencli skill at that exact path and trust its contents. Before use, verify that external skill and script yourself; this package does not pin or validate what will actually be followed or executed.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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)

T07 · Tool Hijacking and Spoofing

Error
Location
scripts/opencli.sh:4
Finding
Execution and Instruction Delegation to Unverified External Files## Vulnerability Details **File Location**: `scripts/opencli.sh:4` **Additional Locations**: `SKILL.md:3,12-18,34-39`; `references/commands.md:3-7` **Vulnerability Type**: Unverified out-of-package tool and instruction delegation **Risk Level**: High ### Vulnerable Code `scripts/opencli.sh:4`: ```bash exec /Users/ShiXin/.openclaw/skills/opencli/scripts/opencli.sh "$@" ``` `SKILL.md:3,12-18`: ```markdown description: Deprecated compatibility alias for the canonical `opencli` skill. Use only when an older note, memory, or prompt still refers to `opencli-exec`; then immediately follow the canonical `opencli` skill at `/Users/ShiXin/.openclaw/skills/opencli/SKILL.md`. ``` ```markdown The canonical skill is now: ```bash /Users/ShiXin/.openclaw/skills/opencli/SKILL.md ``` Use the canonical wrapper: ```bash /Users/ShiXin/.openclaw/skills/opencli/scripts/opencli.sh <args...> ``` ``` `SKILL.md:34-39`: ```markdown ## References See: - `/Users/ShiXin/.openclaw/skills/opencli/SKILL.md` - `/Users/ShiXin/.openclaw/skills/opencli/references/commands.md` ``` `references/commands.md:3-7`: ```markdown Use the canonical cookbook instead: ```bash /Users/ShiXin/.openclaw/skills/opencli/references/commands.md ``` ``` ### Technical Analysis The package does not contain its effective implementation. Instead, it transfers instruction authority and process execution to files at a fixed absolute path outside the audited project. The target files were not included in the supplied artifact, so their contents, integrity, ownership, and permissions could not be verified during this audit. If another local process or user can create or modify files under the referenced path, that party can replace the expected skill instructions or wrapper with attacker-controlled content. Subsequent use of this compatibility alias would then load unreviewed instructions or execute attacker-controlled code under the invoking agent's privileges. The shell wrapper correctly preserves argum ...[truncated 1712 chars]
Remediation
## Remediation Suggestions 1. Bundle the canonical implementation and its instructions inside the reviewed package rather than delegating to mutable files outside the project. 2. If external delegation is unavoidable, resolve the component through a trusted installation mechanism and pin an approved version and cryptographic digest. 3. Before execution, verify the target's canonical path, regular-file status, ownership, permissions, and expected digest. Refuse execution when any check fails. 4. Ensure the external directory and all parent directories are not writable by untrusted users or processes. 5. Avoid hard-coded, user-specific absolute paths. Use a securely configured installation root while preventing environment-variable or search-path substitution by untrusted input. 6. Apply the same validation to externally referenced `SKILL.md` and documentation files because they can influence agent behavior even when they are not executable. 7. Keep `"$@"` when forwarding arguments, as it correctly preserves argument boundaries. 8. Add automated tests that verify missing, replaced, symlinked, incorrectly owned, overly writable, or digest-mismatched external targets are rejected safely.
Vulnerability Patterns
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • 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 (3)

Skill Enumeration

Medium
Category
Agent Snooping
Content
---
name: opencli-exec
description: Deprecated compatibility alias for the canonical `opencli` skill. Use only when an older note, memory, or prompt still refers to `opencli-exec`; then immediately follow the canonical `opencli` skill at `/Users/ShiXin/.openclaw/skills/opencli/SKILL.md`.
---

# opencli-exec
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
---
name: opencli-exec
description: Deprecated compatibility alias for the canonical `opencli` skill. Use only when an older note, memory, or prompt still refers to `opencli-exec`; then immediately follow the canonical `opencli` skill at `/Users/ShiXin/.openclaw/skills/opencli/SKILL.md`.
---

# opencli-exec
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Skill Enumeration

Medium
Category
Agent Snooping
Content
---
name: opencli-exec
description: Deprecated compatibility alias for the canonical `opencli` skill. Use only when an older note, memory, or prompt still refers to `opencli-exec`; then immediately follow the canonical `opencli` skill at `/Users/ShiXin/.openclaw/skills/opencli/SKILL.md`.
---

# opencli-exec
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Static analysis

No suspicious patterns detected.