Back to skill

Security audit

Coding Lead

Security checks for vulnerabilities and agentic risk

Overview

This coding skill is mostly coherent, but it needs review because one documented fallback path can run generated prompt text through a shell command.

Review before installing in sensitive workspaces. The skill is designed to let agents edit files, run tests and commands, spawn coding agents, and store project context. The main issue is the acpx fallback command pattern: it should be changed to use structured arguments and an explicit working directory instead of interpolating prompts or paths into a shell string.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:205
Finding

Shell Command Injection Through Unescaped ACP Fallback Parameters

Content
View full analysis
" --mode now ``` ```text exec: cd && acpx claude exec "" ``` ### Technical Analysis The Skill instructs an agent to insert a project path, generated prompt, and completion summary directly into shell command strings. These values can include task-controlled or repository-controlled text, but the documented commands do not require validation, argument-safe process invocation, or platform-appropriate escaping. Double quotes do not provide adequate protection when untrusted input may contain quote characters, command substitutions, shell metacharacters, or newlines. For example, a malicious value containing a closing quote followed by a shell command could terminate the intended argument and introduce another command. Command substitution syntax may also be evaluated inside double-quoted strings on common POSIX shells. The `cd && ...` construction additionally embeds the working directory into shell syntax instead of supplying it through the execution API's dedicated working-directory option. Consequently, both the path and prompt can alter the command's structure. ### Attack Path 1. An attacker supplies crafted task content, causes attacker-controlled repository content to be included in the ACP prompt, or influences the project path or generated completion summary. 2. The agent substitutes that value into ``, ``, or ``. 3. The fallback is executed through a command shell as documented. 4. Shell syntax in the substituted value terminates or modifies the intended argument. 5. The shell executes the injected command with the same operating-system privileges and environment access as the agent process. A representative mali ...[truncated 1058 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (8)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The README explicitly instructs the agent to perform file reads/writes, local execution, and agent spawning/fallback behavior, but it does not provide a clear user-facing warning that these actions can change the filesystem or execute commands. In a coding-execution skill, this increases the chance of unintended system modifications or command execution without sufficiently explicit operator awareness or consent boundaries.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill’s trigger scope is extremely broad, applying to essentially any implementation-focused agent without clear exclusions or activation boundaries. In a system that grants file-editing and command-execution authority, this can cause the skill to activate in unintended contexts and steer agents into high-risk coding workflows when a narrower or safer skill should apply.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
76% confidence
Finding

Natural-language policy violations include forcing a specific language or locale without opt-in; by extension, hard-coded provider/agent constraints can reflect an organizational policy restriction when presented as mandatory without user choice or justification. The description declares a single-agent production path as a blanket rule rather than offering an opt-in or context-limited rationale.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
80% confidence
Finding

This section imposes a mandatory single-agent policy in natural language and suppresses alternatives even when other agents may exist. Because no user opt-in path or narrow compliance rationale is given here, it may violate organizational policy expectations around user choice or documented scope limitations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill directs the agent to create, reuse, move, archive, and delete files under project directories, but the top-level description does not clearly disclose these filesystem side effects. That weakens user awareness and informed consent, making unintended data retention, deletion, or project-state mutation more likely during ordinary use.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · references/prompt-templates.md (reported line 5)May include surrounding context.

Context File Template

Write to <project>/.openclaw/context-<task-id>.md before spawning:

markdown
# Task Context: <task-id>

Session Persistence

Medium
Category
Rogue Agent
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.

Content

Scanner excerpt · references/prompt-templates.md (reported line 125)May include surrounding context.

  1. Complete FavoriteButton.tsx with TanStack Query optimistic mutation
  2. Add toggle animation
  3. Add to detail page
  4. Write 2 unit tests for the Action

When finished: openclaw system event --text "Done: favorites frontend" --mode now

text

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
92% confidence
Finding

The natural-language instructions throughout the README are presented in Chinese, and the document does not indicate that users may choose another language. This can violate a language/locale policy when a skill effectively forces one language without explicit user opt-in or a documented regional justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.