Back to skill

Security audit

ACP Code Agent

Security checks for vulnerabilities and agentic risk

Overview

This skill has a coherent coding-delegation purpose, but its installer makes broad persistent OpenClaw permission and session-access changes that users should review before installing.

Review setup.sh before installing. Install only if you are comfortable with global ACP delegation settings, automatic permission approval, all-session visibility, agent-to-agent access, heartbeat config edits, daemon restart, and an unpinned global npm install from a mirror. Prefer changing those settings to least-privilege values before use.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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
Findings (2)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
setup.sh:92
Finding
ACP Agents Are Granted Global Session Access and Automatic Permission Approval<![CDATA[ ## Vulnerability Details **File Location**: `setup.sh:92-93` and `setup.sh:112-113` **Vulnerability Type**: Excessive permissions and insufficient access isolation **Risk Level**: High ### Vulnerable Code ```bash openclaw config set plugins.entries.acpx.enabled true openclaw config set plugins.entries.acpx.config.permissionMode approve-all ``` ```bash openclaw config set tools.sessions.visibility all openclaw config set tools.agentToAgent.enabled true ``` ### Technical Analysis The installation script configures the ACP runtime to approve all permission requests automatically. It also makes all sessions visible and globally enables agent-to-agent communication. These settings weaken multiple security boundaries simultaneously: - `permissionMode approve-all` removes interactive authorization for sensitive ACP operations. - `tools.sessions.visibility all` exposes sessions unrelated to the delegated coding task. - `tools.agentToAgent.enabled true` permits cross-agent interaction globally rather than limiting communication to the parent and its explicitly created child sessions. The skill is intended to delegate coding tasks, but that purpose does not inherently require access to every OpenClaw session. Coding agents commonly inspect untrusted repositories, documentation, issue text, test fixtures, and source-code comments. Content in those resources can contain prompt-injection instructions. With automatic approval and global session visibility, a successfully injected or compromised child agent could attempt operations outside the scope of the requested coding task. ### Attack Path 1. A user asks the skill to review or modify an untrusted repository. 2. A repository file contains instructions designed to manipulate the delegated coding agent. 3. The child agent processes that content as part of its analysis. 4. The injected instructions direct the agent to inspect unrelated OpenClaw sessions or communicate with another agent. 5. Global session ...[truncated 1097 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `approve-all` with an interactive, policy-based, or least-privilege permission mode. 2. Restrict session visibility to the current session or the explicitly established parent-child session relationship. 3. Keep agent-to-agent communication disabled by default and enable it only when a specific workflow requires it. 4. Require explicit user consent before applying security-sensitive global configuration changes. 5. Create a dedicated low-privilege operating-system account or sandbox for coding agents. 6. Restrict agent filesystem access to the requested project directory. 7. Deny access to credential stores, SSH keys, cloud configuration, unrelated workspaces, and OpenClaw session data unless explicitly needed. 8. Apply allowlists to tools and operations available to child agents. 9. Preserve existing restrictive user settings rather than unconditionally replacing them. 10. Clearly document each permission change and provide a rollback command for every global setting. ]]>

T08 · Insecure Dependencies

Warning
Location
setup.sh:52
Finding
Unpinned Global Package Installation Uses a Third-Party npm Registry Mirror<![CDATA[ ## Vulnerability Details **File Location**: `setup.sh:52-58` **Vulnerability Type**: Unsafe dependency acquisition and supply-chain exposure **Risk Level**: Medium ### Vulnerable Code ```bash PLATFORM="$(uname -s | tr '[:upper:]' '[:lower:]')-$(uname -m | sed 's/x86_64/x64/;s/aarch64/arm64/')" PKG="@zed-industries/codex-acp-${PLATFORM}" if ! npm list -g "$PKG" --depth=0 2>/dev/null | grep -q "$PKG"; then info "安装 codex-acp 平台二进制 ($PKG)..." npm install -g "$PKG" --registry=https://registry.npmmirror.com \ && ok "已安装 $PKG" \ || warn "安装失败,codex 可能无法通过 ACP 启动,请手动执行: npm install -g $PKG" ``` ### Technical Analysis The setup script installs a platform-specific npm package globally without specifying an audited version. It also overrides the registry with `https://registry.npmmirror.com`, rather than retrieving the package directly from the canonical npm registry. Because no version is pinned, the installed package can change whenever the script is executed. The effective code therefore depends on the package version and registry response available at installation time, rather than solely on the audited project contents. npm packages can define lifecycle scripts that execute during installation. A malicious package release, compromised registry mirror, compromised publisher account, or mirror inconsistency could consequently introduce arbitrary code execution under the privileges of the user running `setup.sh`. Global installation also increases the affected scope because package files and executable entry points are placed in the global npm environment. The script does not verify a cryptographic checksum, package provenance, signature, lockfile, or expected package version before installation. ### Attack Path 1. An attacker compromises the package publisher, publishes a malicious future version, or compromises the configured registry mirror. 2. The user runs `setup.sh` on a system where the `codex` command is detected and the platform p ...[truncated 1387 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Pin the dependency to a specific audited version, for example: ```bash PKG_VERSION="x.y.z" npm install -g "${PKG}@${PKG_VERSION}" --registry=https://registry.npmjs.org ``` 2. Use the canonical npm registry unless an organizationally controlled and verified mirror is required. 3. Verify the downloaded package against an expected integrity hash or signed provenance before installation. 4. Review the pinned package contents and lifecycle scripts before approving a version. 5. Use `--ignore-scripts` when the package does not require lifecycle scripts for installation. 6. Avoid global installation where possible; install into an isolated, version-locked directory or dedicated environment. 7. Do not run the setup script with root or administrative privileges. 8. Fail safely if integrity or provenance verification fails instead of continuing with a warning. 9. Document the exact dependency version and update it only through a controlled security-review process. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (14)

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
# 删除 skill
rm -rf ~/.openclaw/workspace-assistant/skills/acp-coder

openclaw daemon restart
```
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tool Parameter Abuse

High
Category
Tool Misuse
Content
```bash
# 删除 skill
rm -rf ~/.openclaw/workspace-assistant/skills/acp-coder

openclaw daemon restart
```
Confidence
90% confidence
Finding
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding
The skill is presented as a delegation/orchestration tool, but its instructions also include persistent environment changes such as modifying OpenClaw configuration, enabling plugins, adjusting permission modes, installing global packages, and restarting the daemon. That mismatch is dangerous because users may invoke what appears to be a coding helper without understanding that it can alter local agent infrastructure and reduce security controls.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The installation section states that setup.sh will modify OpenClaw configuration, enable cross-session access, install binaries, configure callbacks, and restart the daemon, but it does not present prominent warnings or require informed consent for these system changes. In a skill that orchestrates external agents, silently broadening access or altering daemon behavior materially increases the attack surface and the chance of unsafe deployment.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The README describes very broad automatic triggers for coding-related phrases, which can cause this skill to activate on ordinary conversation and delegate user content to external coding agents unexpectedly. In this skill’s context, auto-delegation to external agents increases the risk of unintended code access, data disclosure, or execution of higher-impact workflows without sufficiently explicit user intent.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list contains broad phrases like review, fix, debug, develop, and 看下项目, which are common in normal conversation and could invoke the skill accidentally. Because this skill can delegate to external agents that analyze code, run tests, and potentially modify files, accidental activation raises the risk of unintended actions.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The description does not clearly warn users that delegated agents may modify project files, run tests, inspect codebases, and execute commands in the target workspace. Missing this disclosure undermines informed consent and can cause users to trigger actions with side effects they did not anticipate.

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill claims ACP-only delegation, but the instructions explicitly allow direct local shell execution for some requests. This broadens the execution surface beyond what the user is told to expect and can lead to unintended local command execution under the guise of delegation.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script silently changes multiple OpenClaw security-relevant settings in the user's environment without an upfront warning or confirmation. Because it modifies persistent behavior affecting agent permissions and visibility, users may unknowingly end up with a significantly less secure configuration than they intended.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The installer enables `permissionMode approve-all`, turns on `tools.sessions.visibility all`, and enables agent-to-agent access globally. These settings materially expand what delegated coding agents can do and what data they can access beyond the narrow purpose of code-task delegation, reducing user oversight and increasing the blast radius if an agent is compromised or misused.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The script directly rewrites `~/.openclaw/openclaw.json` to add heartbeat settings for all agents, again without explicit user consent or backup handling. Direct file mutation of a user's persistent config can introduce unexpected behavior, break custom configurations, or enable background callback behavior the user did not knowingly authorize.

Missing User Warnings

Low
Confidence
95% confidence
Finding
The uninstall instructions use recursive deletion of the skill directory without warning about the destructive nature of the command or advising users to verify the expanded path. While the target path is specific, destructive shell commands in documentation can still lead to accidental data loss if copied, modified, or run in an unexpected environment.

Natural-Language Policy Violations

Low
Confidence
89% confidence
Finding
The instruction text states in Chinese how the orchestrator must behave, and the document consistently prescribes Chinese reply templates such as "收到,让 claude 去分析这个项目。" without indicating that the assistant should match the user's preferred language. This creates a locale/language policy concern because it implicitly forces one language rather than offering opt-in or adapting to user preference.

Natural-Language Policy Violations

Low
Confidence
84% confidence
Finding
The natural-language comments and user-facing messages in the script are presented in Chinese, including the installation description and runtime output. This can amount to a language/locale policy issue if the skill effectively forces a specific language without documenting user opt-in or providing an alternative.

Static analysis

Detected: suspicious.dangerous_exec, suspicious.destructive_delete_command

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
setup.sh:105

Documentation contains a destructive delete command without an explicit confirmation gate.

Warn
Code
suspicious.destructive_delete_command
Location
README.md:78