Back to skill

Security audit

OpenclawContinuousWork 1.0.0

Security checks for vulnerabilities and agentic risk

Overview

The skill is a coherent continuous-work helper, but its broad triggers and open-ended authority to keep working and change/delete files need review before use.

Install only if you intentionally want a Chinese-oriented, continuous execution workflow. Before using it on a real repository, require explicit scope and confirmation for file edits or deletions, avoid relying on the broad trigger terms, and treat the helper scripts as local maintenance tools that can read target trees and rewrite generated skill files.

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

T01 · Skill Instruction Hijacking

Error
Location
References/ContinuousExecutionDirective.md:3
Finding

Skill-controlled autonomous execution and termination hijacking

Content
View full analysis

Vulnerability Details

File Location: References/ContinuousExecutionDirective.md:3-13; reinforced by References/GeneralRules.md:4-7, 16-17, 21-29 and broadly activated by SKILL.md:3
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: High

Vulnerable Instruction Snippet

The following is a faithful English translation of the complete relevant instruction segment at References/ContinuousExecutionDirective.md:3-13:

markdown
The following prompts are mandatory constraints for continuous execution:
1. Do not divide the task; continue self-directed reasoning until the user's request is complete.
2. Do not stop before the user's request is complete.
3. Report progress to the user every 10 minutes.
4. Only the user may confirm termination of the task.

## Practical Execution
- Internal phased execution is permitted, but the task must not be interrupted and handed back to the user.
- When a hard blocker occurs, such as permissions, external dependencies, or missing necessary input, provide an alternative path and the minimum required input before waiting.
- Use both milestone-triggered and 10-minute time-triggered reporting.
- After the technical objective is complete, enter a state of awaiting user confirmation for closure and do not terminate proactively.

The behavior is reinforced by References/GeneralRules.md:26-29:

markdown
## Stop Conditions
- Stop only under the following conditions:
  - The user explicitly confirms termination.
  - A hard blocker cannot be bypassed and the missing requirements and alternatives have been fully explained.
- Even when the technical objective is complete, enter an awaiting-user-confirmation state and wait for the user to confirm termination.

Broad activation is declared in SKILL.md:3, whose English meaning includes:

yaml
description: Use when the user asks to optimize, work, handle a project, continue working, not
...[truncated 3411 chars]
Remediation
View remediation

Remediation Suggestions

  1. Replace mandatory continuation language with bounded workflow guidance. The agent should stop automatically after the requested objective and agreed verification steps are complete.

  2. Remove the user-only termination requirement. Permit termination when:

    • The requested deliverable is complete.
    • A safety or policy restriction applies.
    • The authorized scope, resource budget, or time limit is reached.
    • Further progress requires additional user authorization or information.
    • Continued execution would have destructive, costly, privileged, or externally visible effects.
  3. Add an explicit precedence rule stating that system instructions, developer instructions, safety policies, user-defined scope, permission boundaries, and resource limits override all Skill guidance.

  4. Require explicit opt-in before entering continuous mode. Remove generic activation terms such as “work” and “project,” and use precise phrases that clearly request bounded autonomous continuation.

  5. Define strict execution limits, including:

    • Maximum duration.
    • Maximum number of retries.
    • Maximum tool-call count.
    • Allowed directories and resources.
    • Clear completion criteria.
    • Automatic termination after successful verification.
  6. Require renewed user confirmation before destructive actions, privileged operations, external publication, financial activity, scope expansion, or modifications outside the originally authorized target.

  7. Change the post-completion behavior from “await confirmation without terminating” to a normal completion report that summarizes results, verification evidence, residual risks, and optional next steps.

  8. Add a safe replacement rule such as:

markdown
Continuous mode is optional and applies only when explicitly requested. Continue only within the user's authorized scope and applicable system, developer, safety, permission, time, and resource constrai
...[truncated 203 chars]
Vulnerability Patterns
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (25)

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file’s natural-language instructions are entirely in Chinese and implicitly prescribe behavior in that language without offering a language or locale choice. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrase “优化” is extremely broad and commonly appears in ordinary user requests, making accidental invocation likely. In this skill, activation can lead to deep analysis and broad file modifications, so an overbroad trigger materially increases the chance of unintended execution of powerful behavior.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

High
Category
Not specified by scanner
Confidence
93% confidence
Finding

The file is written as a mandatory Chinese-language policy without any opt-in or locale negotiation, despite being a general-purpose skill that may be invoked by diverse users. Forcing a specific language can cause user confusion, misinterpretation of instructions, and incorrect execution or acceptance handling, especially when the skill also mandates structured workflows and completion behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The described broad workflow-optimization purpose does not match the specific validator and filesystem behaviors actually referenced. When operational reality diverges from declared purpose, governance controls, user expectations, and automated routing can all fail, increasing the chance of unintended execution and privilege misuse.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The described broad workflow-optimization purpose does not match the specific validator and filesystem behaviors actually referenced. When operational reality diverges from declared purpose, governance controls, user expectations, and automated routing can all fail, increasing the chance of unintended execution and privilege misuse.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The described broad workflow-optimization purpose does not match the specific validator and filesystem behaviors actually referenced. When operational reality diverges from declared purpose, governance controls, user expectations, and automated routing can all fail, increasing the chance of unintended execution and privilege misuse.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The described broad workflow-optimization purpose does not match the specific validator and filesystem behaviors actually referenced. When operational reality diverges from declared purpose, governance controls, user expectations, and automated routing can all fail, increasing the chance of unintended execution and privilege misuse.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The described broad workflow-optimization purpose does not match the specific validator and filesystem behaviors actually referenced. When operational reality diverges from declared purpose, governance controls, user expectations, and automated routing can all fail, increasing the chance of unintended execution and privilege misuse.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The described broad workflow-optimization purpose does not match the specific validator and filesystem behaviors actually referenced. When operational reality diverges from declared purpose, governance controls, user expectations, and automated routing can all fail, increasing the chance of unintended execution and privilege misuse.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The described broad workflow-optimization purpose does not match the specific validator and filesystem behaviors actually referenced. When operational reality diverges from declared purpose, governance controls, user expectations, and automated routing can all fail, increasing the chance of unintended execution and privilege misuse.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The described broad workflow-optimization purpose does not match the specific validator and filesystem behaviors actually referenced. When operational reality diverges from declared purpose, governance controls, user expectations, and automated routing can all fail, increasing the chance of unintended execution and privilege misuse.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases are extremely broad, including common terms like '优化', '工作', '项目', and '继续做', which overlap with ordinary user speech. In combination with file and shell-capable scripts, this broad routing makes accidental activation much more dangerous because benign requests could invoke a powerful maintenance-oriented skill.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The document's operational instructions are presented only in Chinese ('以下提示词为持续执行强约束') with no indication that the user can choose another language or locale. This can violate language/locale policy when a skill imposes a language implicitly rather than offering opt-in or documenting a justified regional constraint.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrases for continuous mode are broad natural-language terms that commonly appear in ordinary conversation, which can cause the skill to activate persistent autonomous behavior without sufficiently explicit user consent. In a skill designed to keep working until completion, accidental activation increases the chance of unwanted tool use, excessive actions, or difficulty disengaging.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation conditions rely on subjective criteria like 'multi-stage work' and 'clear next step,' which lack enforceable boundaries and can be interpreted too broadly by an agent. This ambiguity is especially risky here because the skill instructs the agent to continue acting until blocked or explicitly stopped, amplifying overreach from a mistaken activation decision.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file contains core skill instructions in Chinese, which effectively forces a specific language for users or maintainers reading the skill documentation. The file does not indicate that Chinese is optional, nor does it document a region-specific reason for the language constraint.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The directive explicitly authorizes modification, deletion, and addition of content without requiring a warning, confirmation, or dry-run step. Because this skill is designed for continuous work and task closure, the surrounding context makes it more dangerous by encouraging persistent execution that could cause unintended data loss or large-scale repository changes.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The trigger conditions are extremely broad and include common phrases like '优化', '工作', '项目', '继续做', and '继续工作', which can cause the skill to activate for many ordinary user requests outside its intended scope. In an autonomous or long-running skill, over-triggering is dangerous because it can unexpectedly shift the assistant into persistent modification behavior and widen the chance of unintended actions on unrelated tasks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The reporting template hard-codes output fields in Chinese, which can steer the agent to respond in Chinese regardless of the user's language or locale. In a continuous-work skill, this is more dangerous because the template is likely to be reused across many progress, blocker, and completion updates, causing persistent misalignment with user expectations and potentially reducing usability, reviewability, and safe human oversight.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises and references shell/file read/write-capable scripts but does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization ambiguity where a broadly triggered skill could end up invoking powerful local capabilities without clear least-privilege boundaries or user/operator visibility.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The description combines Chinese and English directives and examples, which implies a language preference in the skill's invocation guidance without stating that the user can choose their preferred language. Under the policy, language behavior should be opt-in or clearly justified rather than implicitly fixed or mixed by default.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script recursively scans the repository and rewrites matching files in place when line endings or BOM differ. Although it prints the number of changed files afterward, there is no prior warning, confirmation, or inline notice near execution that running the script will modify many user files.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · Scripts/RunOptimizationPipeline.py (reported line 25)May include surrounding context.

python
def run(cmd: list[str], cwd: Path) -> tuple[int, str, str]:
    p = subprocess.run(cmd, cwd=str(cwd), capture_output=True, text=True)
    return p.returncode, p.stdout.strip(), p.stderr.strip()

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This markdown template uses Chinese-only field labels and guidance throughout the user-facing content. Under the language/locale policy, forcing a specific language without user opt-in can be a natural-language policy violation when no justification or alternative is provided.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

This markdown file contains core rubric instructions primarily in Chinese, which can impose a specific language on users without any opt-in or justification. The policy for natural-language violations applies to all file types, and no alternate language option or locale rationale is provided here.

Content

No source excerpt is available for this finding.