Back to skill

Security audit

Skill Fix Workflow

Security checks for vulnerabilities and agentic risk

Overview

The skill is not overtly malicious, but it unsafely turns chat content into runnable Python files, so malicious or malformed text could become code when a saved workflow is run.

Review this skill carefully before installing. Only use it with trusted conversation content, inspect generated Python before running it, avoid using file/API/web output for sensitive data unless destinations are explicit and trusted, and do not open generated HTML reports from untrusted data in an authenticated browser context.

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 (2)

T09 · Insecure Skill Coding Practices

Error
Location
joiner.py:82
Finding

Conversation-Controlled Values Can Inject Python Code into Generated Workflows

Content
View full analysis
str: """生成 Python 字面量表示""" if isinstance(obj, dict): items = [f'"{k}": {self._python_repr(v)}' for k, v in obj.items()] return "{\n " + ",\n ".join(items) + "\n }" elif isinstance(obj, str): return f'"{obj}"' elif isinstance(obj, bool): return "True" if obj else "False" elif isinstance(obj, (int, float)): return str(obj) elif isinstance(obj, list): items = [self._python_repr(item) for item in obj] return "[" + ", ".join(items) + "]" else: return f'"{str(obj)}"' def _format_call_params(self, params: Dict) -> str: """格式化函数调用参数""" if not params: return "" ``` `output_handler.py:177-184`: ```python if output_type == "file" and output_path: return f'output_file(result, path="{output_path}")' elif output_type == "api" and api_url: return f'output_api(result, url="{api_url}")' elif output_type == "web": return 'output_web(result)' else: return 'output_screen(result)' ``` ### Technical Analysis The workflow generator constructs executable Python source using direct string interpolation. Values derived ...[truncated 2574 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
output_handler.py:134
Finding

Unescaped Workflow Data Can Cause Stored HTML Injection and Cross-Site Scripting

Content
View full analysis
str: """转换为 HTML 格式""" html = f""" OpenClaw 输出 - {datetime.now().strftime('%Y-%m-%d %H:%M')} body {{ font-family: Arial, sans-serif; margin: 40px; }} pre {{ background: #f4f4f4; padding: 20px; border-radius: 5px; }}

OpenClaw 固化程序输出

生成时间:{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}

text
{json.dumps(data, ensure_ascii=False, indent=2)}
""" return html ``` ### Technical Analysis `json.dumps()` serializes data as JSON but does not make that data safe for insertion into an HTML document. In particular, HTML-significant characters such as `<`, `>`, and `&` remain available to the browser's HTML parser. Because serialized workflow data is inserted directly into a `pre` element, an attacker-controlled value containing `` can terminate the intended element. The attacker can then introduce arbitrary HTML, including script-capable elements or event handlers. This is a stored issue because the generated content is written to an HTML file by `_output_web()` and remains dangerous when opened or served later. ### Attack Path 1. A workflow processes data controlled by an attacker, such as content from a monitored page, API response, user message, or imported file. 2. The malicious value includes an HTML-breaking sequence, for example: ```html
text
```

3. `_to_html()` serializes the value with `json.dumps()` but does not HTML-escape it.
4. `_output_web()` writes the resulting document to an `.html` file.
5. A user opens the file in a browser, or the file is published by a web server.
6. T
...[truncated 836 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (12)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill explicitly supports writing output to files and sending data to APIs, but it provides no safeguards, consent requirements, destination validation, or privacy warnings. In a workflow-solidification skill that converts prior actions into reusable automation, this omission increases the chance of unintentionally persisting sensitive data locally or exfiltrating it to external endpoints.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The example normalizes saving collected data directly to a file without any warning, review step, or path restrictions. Because this skill is designed to turn conversational steps into executable workflows, examples strongly shape implementation behavior and may lead to unsafe default persistence of user or retrieved data.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This file contains natural-language descriptions and comments exclusively in Chinese, including the module docstring and function/class descriptions. Under the policy, forcing a specific language without user opt-in is a locale/language policy violation unless the restriction is explicitly justified, which is not present here.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code’s primary natural-language documentation and user-facing status/alert text are written only in Chinese, including the top-level module description and later printed reports. The file does not indicate that the skill is China-specific or provide any user opt-in or language selection, which can violate language/locale policy requirements.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file-level natural-language metadata and user-facing strings are entirely in Chinese, including the task name and completion message, with no indication that language is configurable or limited to a justified region-specific use case. This creates a locale policy concern because the skill appears to impose a specific language without explicit user opt-in.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The module docstring and other user-facing text are exclusively in Chinese, which can constitute a language-policy violation when no opt-in or alternative locale is offered. The file does not indicate that the skill is intended only for a Chinese-speaking or region-specific environment.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The comments at L101-L104 describe the generated section as only extracted Skill/Tool calls that need implementation, implying placeholder behavior. However, the generated code also includes active output operations later in the run path via output_screen/output_file/output_api/output_web, which can write or send data externally rather than remaining just placeholders.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

This code includes user-facing and developer-facing natural-language content such as the module description, method docstrings, log messages, and runtime messages exclusively in Chinese. Under the stated policy, forcing a specific language without offering choice or documenting a justified locale restriction is a policy violation.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · output_handler.py (reported line 98)May include surrounding context.

python
# TODO: 实际实现 API POST
        # import requests
        # response = requests.post(self.api_url, json=data)
        
        return {
            "status": "simulated",

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The module name and user-facing description state the skill behavior entirely in Chinese, and the main entry comment says the user actively triggers workflow solidification using Chinese phrasing. There is no indication that other languages are supported or that Chinese-only behavior is a documented, justified regional requirement, which can violate language/locale policy.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The function's interface and docstring state that caller-supplied output_path and api_url will be honored, but the implementation drops both values and rebuilds the command using only the topic and output type. This can cause data to be written to an unintended default location or prevent an intended API destination from being enforced, which is dangerous in workflow-generation code because users may believe they are constraining output when they are not.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
95% confidence
Finding

The method is documented as '输出到网页' and logs '网页发布', which implies publishing to a web destination. In reality, the code only generates a local .html file via open(..., "w") and the comments explicitly note actual web publishing is not implemented yet.

Content

No source excerpt is available for this finding.