Back to skill

Security audit

Autopilot 自动循环编排引擎

Security checks for vulnerabilities and agentic risk

Overview

This is a coherent autopilot coding skill, but it needs Review because it can automatically run file-changing agents with approval and sandbox protections disabled.

Use this only in a disposable or tightly sandboxed workspace, with a scoped API key and no sensitive home-directory access. Review generated plans before Build, inspect diffs and logs after each run, and delete ~/.openclaw task artifacts when no longer needed. The dangerous bypass flags should be removed or gated by explicit user approval before routine use.

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

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:107
Finding

Unrestricted Build-Agent Execution Bypasses Approval and Sandbox Controls

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:107-114
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: High

Vulnerable Code

bash
cat {task_dir}/spec_build.md | \
omx exec --dangerously-bypass-approvals-and-sandbox \
  -o {task_dir}/result-{round:03d}.txt \
  -C {cwd} \
  {sandbox_args} - \
  2> {task_dir}/build-{round:03d}.log ; \
echo $? > {task_dir}/build-{round:03d}.exit_code

Technical Analysis

The Build phase explicitly invokes OMX with --dangerously-bypass-approvals-and-sandbox. This disables both interactive approval controls and execution isolation while the agent is expected to run commands and modify source files.

The build specification incorporates project content, generated plans, and prior failure information. Those inputs may include untrusted repository text or unsafe model-generated instructions. Without a sandbox or approval gate, a malicious repository instruction or erroneous generated command can execute with the ambient privileges of the user running the Skill.

Although this behavior does not elevate privileges beyond the operating-system account itself, it breaks the intended least-privilege boundary between the target project and the rest of that account's accessible environment.

Attack Path

  1. An attacker places adversarial instructions in a repository file that the Planner or Builder analyzes.
  2. The generated plan or build specification carries an unsafe operation into the Build phase.
  3. The Skill starts OMX with approval checks and sandbox enforcement disabled.
  4. OMX follows the unsafe operation without requiring user confirmation.
  5. The operation accesses or changes resources outside the intended repository using the invoking user's permissions.

Impact Assessment

A successful exploitation could permit:

  • Arbitrary command execution as the user invoking the Skill.
  • Reading files and credentials accessible to that user.
  • Modifying or deleting f ...[truncated 348 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove --dangerously-bypass-approvals-and-sandbox.
  2. Run the Builder in a project-scoped sandbox with only the target repository mounted writable.
  3. Make the task directory writable only where artifact generation requires it.
  4. Deny access to home-directory secrets, SSH material, credential stores, environment files, and unrelated repositories.
  5. Restrict network access by default and allow only explicitly required endpoints.
  6. Require user approval for shell execution, dependency installation, deletion, permission changes, and access outside the project.
  7. Validate the generated plan and enforce an allowlist of files that may be modified before starting the Builder.
  8. Compare actual changes against the allowlist and fail closed if out-of-scope files are touched.
  9. Execute under a dedicated low-privilege account or disposable container where feasible.

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:204
Finding

Fallback Build Path Disables Claude Permission Enforcement

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:204-209
Vulnerability Type: T05: Unauthorized Access and Privilege Escalation
Risk Level: High

Vulnerable Code

bash
cat "$TASK_DIR/spec_build.md" | \
claude -p --output-format text --verbose \
  --model claude-sonnet-4-20250514 \
  --dangerously-skip-permissions - \
  > "$TASK_DIR/result-001.txt" 2> "$TASK_DIR/build-001.log"

Technical Analysis

When OMX is unavailable, the documented fallback launches Claude with --dangerously-skip-permissions. This removes permission prompts and permits autonomous tool use during a phase explicitly intended to modify files and execute implementation steps.

The input is a generated spec_build.md containing repository and planning context. If that context contains prompt injection, unsafe instructions, or an erroneous operation, the fallback provides no user-mediated permission boundary. The fallback therefore preserves the same unrestricted-execution risk as the primary Build path rather than failing safely.

Attack Path

  1. Attacker-controlled repository content influences the plan or spec_build.md.
  2. OMX fails or is considered unavailable, activating the fallback procedure.
  3. The Skill invokes Claude with permission enforcement disabled.
  4. Claude interprets the injected or unsafe instruction as part of the build task.
  5. Tools or shell commands execute using the invoking user's ambient access, potentially beyond the project directory.

Impact Assessment

Exploitation could result in arbitrary commands and file operations under the invoking user's account. Accessible secrets, source repositories, configuration, and other user-owned files may be read, changed, or deleted. If outbound connectivity is available, information accessible to the process could also be disclosed externally.

No evidence indicates acquisition of root or administrator privileges; the affected scope is the invoking account's existing authority.

Remediation
View remediation

Remediation Suggestions

  1. Remove --dangerously-skip-permissions.
  2. Require normal permission checks and explicit approval for command execution and sensitive file operations.
  3. Apply the same sandbox and file allowlist to every fallback path as to the primary Builder.
  4. Fail closed when the secure execution environment is unavailable rather than silently degrading security.
  5. Run fallback builds in a disposable container or restricted low-privilege account.
  6. Sanitize and delimit repository-derived content before placing it in spec_build.md, and instruct the agent to treat such content as data rather than authority.
  7. Block reads and writes outside the target repository and designated task-artifact directory.
  8. Record executed commands and accessed paths, then reject delivery if verification detects out-of-scope activity.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (11)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger conditions are extremely broad, including generic phrases like '自动执行' and any task judged 'complex' enough to benefit from looping. In a skill that can launch repeated external model calls and eventually modify files, overbroad invocation materially increases the chance of unintended activation and unsafe autonomous execution.

Content

No source excerpt is available for this finding.

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · SKILL.md (reported line 86)May include surrounding context.

bash
cat {task_dir}/spec_plan.md | \
claude -p --output-format text --verbose --model claude-opus-4-6 - \
  > {task_dir}/plan-{round:03d}.md \
  2> {task_dir}/plan-{round:03d}.log ; \
echo $? > {task_dir}/plan-{round:03d}.exit_code

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The Build command explicitly uses '--dangerously-bypass-approvals-and-sandbox', granting direct file-modifying execution without normal approval or sandbox protections. In a multi-round autonomous loop, this substantially raises the blast radius of prompt mistakes, adversarial instructions in project files, or model misbehavior because repeated unsafe actions can occur without a human checkpoint.

Content

No source excerpt is available for this finding.

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

This fallback switches the Build phase to 'claude' with '--dangerously-skip-permissions', again invoking an external provider while explicitly disabling permission checks during code-writing execution. In context, this is more dangerous than ordinary model selection because it combines third-party processing with direct unsafe modification authority in a failure path.

Content

Scanner excerpt · SKILL.md (reported line 206)May include surrounding context.

恢复:改用 OMC 替代 OMX 执行 Build 阶段:

bash
cat "$TASK_DIR/spec_build.md" | \
claude -p --output-format text --verbose \
  --model claude-sonnet-4-20250514 \
  --dangerously-skip-permissions - \
  > "$TASK_DIR/result-001.txt" 2> "$TASK_DIR/build-001.log"

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · SKILL.md (reported line 254)May include surrounding context.

md
p = pathlib.Path('{task_dir}/spec_plan.md'); \
  print(json.dumps({'type':'user','message':{'role':'user','content': \
    p.read_text() + '\n\n要求:只读分析,输出符合 autopilot plan 格式的结构化计划,不要修改文件。'}}))" | \
claude -p --input-format stream-json --output-format stream-json \
  --verbose --max-turns 40 --model claude-opus-4-6 --tools default - \
  > {task_dir}/plan-{round:03d}.md \
  2> {task_dir}/plan-{round:03d}.log ; \

External Model or Provider Selection

High
Category
Excessive Agency
Confidence
90% confidence
Finding

Skill selects an external model or provider that may use a different account or billing plan than the operator expects. Undisclosed model switches can cause unexpected cost or quota consumption.

Content

Scanner excerpt · SKILL.md (reported line 255)May include surrounding context.

md
print(json.dumps({'type':'user','message':{'role':'user','content': \
    p.read_text() + '\n\n要求:只读分析,输出符合 autopilot plan 格式的结构化计划,不要修改文件。'}}))" | \
claude -p --input-format stream-json --output-format stream-json \
  --verbose --max-turns 40 --model claude-opus-4-6 --tools default - \
  > {task_dir}/plan-{round:03d}.md \
  2> {task_dir}/plan-{round:03d}.log ; \
echo $? > {task_dir}/plan-{round:03d}.exit_code

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
78% confidence
Finding

该文件整体以中文定义技能行为与触发方式,且未说明是否支持其他语言或允许按用户偏好切换。根据规则,若技能对语言/locale 有隐含强制但未提供选择或合理限定,属于自然语言策略问题。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill persists task state, plans, results, and user requirements under a fixed workspace path, but does not clearly warn users that their prompts, project context, and possibly sensitive paths or error output will be stored on disk. This creates a privacy and data-retention risk, especially on shared systems or when task artifacts contain proprietary code context.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill advertises a bounded Plan→Build→Verify workflow, but later permits the orchestrator to directly take over planning and file modification when external agents fail. That breaks the declared trust boundary and removes the separation-of-duties control that was supposed to constrain autonomous code changes, making unreviewed direct execution more likely during failure paths.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file is entirely in Chinese and specifies report content and summaries in that language, but it does not indicate that language selection is optional or limited to a justified region-specific workflow. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The skill's purpose is described as automatic multi-round coding orchestration, but the documentation requires a specific API key environment variable for operation. While invoking Claude is expected, explicitly depending on external credentials is a capability consideration not surfaced in the manifest description and broadens the operational sensitivity of the skill.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.