Back to skill

Security audit

Acp Harness Delegation

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent ACP delegation guide, but it asks users to grant broad automatic authority to external agents and exposes API-key handling risks.

Install only if you are comfortable reviewing and tightening the acpx configuration yourself. Prefer read-only or per-task approvals, avoid printing API keys, protect or avoid plaintext credential files, pin harness package versions, and run delegated agents in a restricted workspace when possible.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (3)

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:89
Finding
Delegated Agents Are Granted Unrestricted Automatic Permissions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:89-98`; duplicated in `references/harness-list.md:50-68` **Vulnerability Type**: Unrestricted delegated-agent permissions **Risk Level**: High ### Vulnerable Code ```json { "defaultPermissions": "approve-all", "nonInteractivePermissions": "deny", "authPolicy": "skip" } ``` The accompanying documentation states that this configuration automatically approves all operations without displaying a confirmation prompt. The reference file further clarifies that `"approve-all"` includes write operations. ### Technical Analysis The documented configuration removes per-operation authorization for externally executed ACP harnesses. An agent spawned through this configuration can receive approval for security-sensitive capabilities, including file modification, without requiring the user to review each request. This violates the principle of least privilege because read-only, analytical, and narrowly scoped delegation tasks do not inherently require unrestricted write authorization. The use of `authPolicy: "skip"` also removes an authentication-flow safeguard, although the documentation correctly notes that this setting does not replace the underlying API credential. The exposure is especially significant because the harnesses are external agent implementations. A compromised dependency, malicious task, prompt-injected input, or unsafe model-generated action could use automatically approved capabilities. ### Attack Path 1. The user follows the Skill and globally configures `defaultPermissions` as `"approve-all"`. 2. The coordinator spawns an external ACP harness. 3. The harness processes malicious input, generates an unsafe action, or loads compromised package code. 4. The harness requests a write or other privileged operation. 5. The ACP runtime automatically approves the request without user confirmation. 6. The harness modifies any file or resource available to the coordinator's operating-sys ...[truncated 623 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Replace `"approve-all"` with `"approve-reads"` as the default policy. - Require explicit user approval for file writes, command execution, network access, credential access, and operations involving sensitive directories. - Define per-agent and per-task permission allowlists instead of prescribing a permissive global policy. - Run delegated harnesses in an isolated container or sandbox with a read-only project mount when writes are unnecessary. - Restrict writable locations to a dedicated task-specific workspace. - Avoid requiring `authPolicy: "skip"` globally. Apply it only in narrowly controlled environments where authentication behavior and credentials are managed securely. - Document the residual risk whenever automatic approval is intentionally enabled. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:61
Finding
Authentication Troubleshooting Prints the Complete API Key<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:61-65` and `SKILL.md:136-141` **Vulnerability Type**: Sensitive credential disclosure through command output **Risk Level**: High ### Vulnerable Code The initial credential check uses: ```bash echo $ANTHROPIC_API_KEY ``` The same unsafe check is repeated in the troubleshooting workflow: ```text 4. If the result is not returned, check: - acpx sessions list → whether it reports needs reconnect - echo $ANTHROPIC_API_KEY → whether the API key is valid ``` ### Technical Analysis Executing `echo $ANTHROPIC_API_KEY` writes the complete API credential to standard output. This does not securely determine whether the key is valid; it only reveals its current value. Terminal output may be retained in shell transcripts, CI logs, agent tool-call results, support records, screen recordings, or persistent session context. Because the Skill recommends persistent sessions, disclosed output may remain available beyond the immediate troubleshooting operation. The vulnerability does not require command injection. It is triggered through normal use of the documented troubleshooting procedure. ### Attack Path 1. A user encounters an ACP authentication or session error. 2. The user or coordinator follows the documented troubleshooting instructions. 3. `echo $ANTHROPIC_API_KEY` prints the complete credential. 4. The output is captured by terminal logging, CI infrastructure, an agent transcript, screen sharing, or persistent session history. 5. An unauthorized party with access to that output extracts the key. 6. The party uses the credential to make requests against the associated API account. ### Impact Assessment Disclosure may permit unauthorized API use within the permissions, quotas, and billing scope of the compromised key. Potential consequences include financial charges, consumption of rate limits, access to API capabilities assigned to the account, and disruption of legitimate workloads. The ...[truncated 242 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Never print the value of an API key during configuration checks. - Replace the command with a presence-only test: ```bash if [ -n "${ANTHROPIC_API_KEY:-}" ]; then echo "ANTHROPIC_API_KEY is configured" else echo "ANTHROPIC_API_KEY is missing" fi ``` - Validate credentials by making a minimal authenticated request that reports only success or a sanitized error. - Redact secrets from agent transcripts, CI logs, support bundles, and command output. - Store production credentials in a secret manager rather than plaintext configuration where supported. - Rotate the API key immediately if it has already appeared in logs or retained session output. - Add documentation explicitly warning users not to paste or print credential values. ]]>

T08 · Insecure Dependencies

Error
Location
references/harness-list.md:5
Finding
Third-Party Agent Packages Are Downloaded and Executed Without Immutable Version Pinning<![CDATA[ ## Vulnerability Details **File Location**: `references/harness-list.md:5-11` **Vulnerability Type**: Unsafe runtime dependency retrieval and execution **Risk Level**: High ### Vulnerable Code ```text | agentId | Default command | Description | |---------|-----------------|-------------| | `claude` | `npx -y @zed-industries/claude-agent-acp@^0.21.0` | Claude Code ACP adapter | | `codex` | `npx @zed-industries/codex-acp@^0.9.5` | OpenAI Codex ACP adapter | | `pi` | `npx pi-acp@^0.0.22` | Pi agent | | `opencode` | `npx -y opencode-ai acp` | OpenCode | | `gemini` | `gemini --experimental-acp` | Google Gemini CLI | | `kimi` | `kimi acp` | Kimi CLI | ``` ### Technical Analysis The listed `npx` commands may download and execute third-party package code at runtime. The caret ranges permit installation of package versions other than the versions reviewed when the Skill was written. The `opencode-ai` command does not specify a version at all, allowing the package resolver to select the current registry version. The `-y` flag suppresses installation confirmation for two commands. The project does not include a lockfile, integrity hashes, vendored packages, or another mechanism that establishes an immutable reviewed dependency set. Consequently, the effective executable code can change after this Skill has been audited. A compromised package release, compromised maintainer account, or malicious transitive dependency could execute code locally. The risk is amplified by the separate recommendation to grant harnesses automatic approval for all operations. ### Attack Path 1. An attacker compromises a referenced package, its maintainer account, or one of its transitive dependencies. 2. The attacker publishes a version accepted by a caret range or as the latest unversioned release. 3. A user invokes the corresponding harness through the documented command. 4. `npx` resolves and downloads the compromised package from the registry. 5. Package installation or ex ...[truncated 730 chars]
Remediation
<![CDATA[ ## Remediation Suggestions - Pin every package to an exact reviewed version rather than a caret range or an unversioned package name. - Use a committed lockfile with integrity metadata. - Preinstall dependencies during a controlled build process instead of downloading them when a harness is invoked. - Verify package provenance, signatures, and integrity hashes where the package ecosystem supports them. - Use an approved internal registry or package proxy with release allowlisting. - Remove `-y` from security-sensitive installation paths so unexpected installation behavior is not silently accepted. - Continuously scan direct and transitive dependencies for compromised or vulnerable releases. - Run third-party harnesses in a restricted container or sandbox with minimal filesystem, environment-variable, and network access. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (9)

Missing User Warnings

High
Confidence
98% confidence
Finding
The skill explicitly instructs setting `defaultPermissions` to `approve-all`, which disables interactive safety checks for all acpx operations in automated use. In a delegation skill that can spawn external harnesses and execute tasks on behalf of a coordinator, this materially increases the chance of unauthorized file access, command execution, or dangerous tool actions without user review.

Missing User Warnings

High
Confidence
98% confidence
Finding
The recommended configuration combines `defaultPermissions: "approve-all"` with `authPolicy: "skip"`, effectively removing interactive approval and authentication safeguards for delegated agents. In this skill's context—delegating actions to external ACP-enabled harnesses—this materially increases the chance of unauthorized file modification, command execution, or other unintended actions if the harness, prompt chain, or upstream package is compromised.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
The skill tells users to place `ANTHROPIC_API_KEY` in environment variables or a persistent config file but does not warn about secret handling risks such as shell history exposure, file permission issues, accidental logging, or committing config files. Because this skill is specifically about delegating to external runtimes, mishandled credentials could enable unauthorized access to paid model APIs or downstream agent actions.

Skill Enumeration

Medium
Category
Agent Snooping
Content
## 相关文件

- Skill 配置:`~/.openclaw/skills/acp-harness-delegation/SKILL.md`
- Harness 列表:`~/.openclaw/skills/acp-harness-delegation/references/harness-list.md`
- acpx 全局配置:`~/.acpx/config.json`
- Claude API Key 配置:`~/.acpx/config.json` 的 `authCredentials` 字段
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.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding
npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Rp1

Medium
Category
MCP Rug Pull
Confidence
87% confidence
Finding
`npx -y opencode-ai acp` invokes a package without any version constraint, which allows the latest published package to be fetched and executed at runtime. In an automation/delegation skill, this increases supply-chain risk because a compromised or malicious upstream release could be executed with the user's local permissions.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The document explicitly recommends storing `ANTHROPIC_API_KEY` in `~/.acpx/config.json` in plaintext without warning about file permissions, secret-management alternatives, or exposure risks. Plaintext local credential storage can lead to token disclosure through backups, accidental commits, overly broad filesystem access, or local compromise.

Static analysis

No suspicious patterns detected.