Back to skill

Security audit

1-Click WOA

Security checks for vulnerabilities and agentic risk

Overview

The skill performs the intended WeChat draft workflow, but it handles sensitive WeChat credentials and uploads content automatically with weak safeguards.

Review this before installing if the WeChat account matters. Store credentials with owner-only permissions, rotate secrets if they were exposed, confirm exactly which article and images will be uploaded before running it, and avoid opening fallback HTML generated from untrusted content. Expect it to create WeChat drafts, not fully publish articles, and do not rely on it for real Markdown conversion.

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

T09 · Insecure Skill Coding Practices

Warning
Location
references/SETUP.md:24
Finding

Credential File Is Created Without Enforcing Restrictive Permissions

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
scripts/test_config.py:48
Finding

Configuration Diagnostics Disclose the AppSecret Suffix

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/publish.py:91
Finding

Untrusted Article Content Is Written to an Executable HTML Fallback Without Sanitization

Content
View full analysis
{title} body {{ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; max-width: 800px; margin: 0 auto; padding: 20px; }} h1 {{ font-size: 24px; margin-bottom: 10px; }} .digest {{ color: #666; margin-bottom: 20px; font-size: 14px; }} .content img {{ max-width: 100%; height: auto; margin: 10px 0; }}

{title}

{digest}


{content}
""" with open(html_path, "w", encoding="utf-8") as f: f.write(html) ``` The fallback is generated after selected publication failures: ```python fallback_path = generate_html_fallback(title, digest, content_html, image_dir) ``` ### Technical Analysis The title, digest, and article content originate from command-line content or a user-selected article file. They are interpolated directly into an HTML document without contextual escaping or sanitization. An attacker-controlled title can terminate the `` or `<h1>` context, while the digest can terminate its paragraph. The article body is intentionally treated as HTML and can contain active elements, scripts, event handlers, iframes, or URLs that initiate network requests. The generated document is presented as a fallback for the user to download or open in a browser. Opening a malicious fallback can therefore execute attacker-controlled JavaScript in the local document's browser context. Browser sandboxing limits direct operating-system access, but active content can still perform phishing, modify displayed content, and initiate outbound requests. ### Attack Path 1. An attacker supplies or convinces the user to publish article content con ...[truncated 1080 chars]
Remediation
View remediation
`, ``, `<object>`, `<embed>`, and `<base>` - Inline event handlers such as `onclick` and `onerror` - `javascript:`, `data:`, and other unsafe URL schemes - CSS capable of loading remote resources or obscuring deceptive elements - Unexpected forms, navigation elements, and automatic redirects Further hardening should include: 1. Add a restrictive Content Security Policy to the generated document, for example disallowing scripts, frames, forms, and remote connections. 2. Generate the fallback as inert text or sanitized markup rather than preserving arbitrary input HTML. 3. Warn the user that fallback files derived from untrusted content must not be opened before review. 4. Write the fallback with owner-only permissions. 5. Add tests covering closing-tag injection, event-handler injection, unsafe URL schemes, iframes, and script elements. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (30)

Tp4

High
Category
MCP Tool Poisoning
Confidence
89% confidence
Finding

整体主用途与声明大体一致,确实是在执行微信公众号草稿箱创建流程,并包含 token 获取、图片上传、草稿构建以及 fallback 生成。但描述有若干重要不准确之处。首先,描述说用户提供文章内容(Markdown),而代码没有 Markdown 转 HTML 的处理,仅支持把输入按 ||| 分割为标题/摘要/正文,并将正文按换行简单包成段落。其次,所谓“自动处理中文编码问题”并未真正实现编码转换或修复,只是在提交失败且错误码/错误信息看起来像编码问题时生成一个本地 HTML fallback 文件。再次,代码对资源输入有未声明的强假设:它依赖固定路径下的 credentials.json,并要求封面图必须存在于预设目录,正文配图也来自固定命名文件,而不是纯粹从用户提供的 Markdown 自动处理。因此描述与实际行为存在功能层面的偏差,足以判定为不匹配。

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

声明描述的是一个完整的微信公众号发布自动化技能,而实际代码仅用于测试本地配置是否正确,属于辅助/诊断脚本。它访问的资源主要是本地配置文件和图片目录,没有体现声明中的核心能力(内容接收、编码处理、调用微信 API、上传素材、创建草稿、发布文章、失败回退)。因此该代码片段与声明的主要用途存在明显且实质性的不一致。

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
95% confidence
Finding

The workflow explicitly checks for a local credentials.json and uses it to obtain an access token, meaning the skill accesses sensitive secrets from disk. Credential handling is inherently high risk because compromise, overbroad file access, or accidental invocation could expose app_id/app_secret and enable unauthorized API actions.

Content

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

text
用户提供文章内容
    ↓
检查配置文件(credentials.json)
    ↓ 缺失 → 中断,提示用户配置
获取 access_token
    ↓ 失败 → 报错退出

Credential Access

High
Category
Privilege Escalation
Confidence
97% confidence
Finding

The documentation specifies a fixed credential file path under the user's home directory containing AppID and AppSecret. Storing and reading secrets from a predictable plaintext location increases the risk of accidental disclosure, unauthorized reuse, and unsafe handling by other tools or users on the same system.

Content

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

配置文件

路径: ~/.openclaw/agents/gzh-assistant/wechat/credentials.json

模板:

json

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/SETUP.md (reported line 28)May include surrounding context.

md
# -*- coding: utf-8 -*-
"""
1-Click WOA - 微信公众号草稿箱一键发布脚本
读取 ~/.openclaw/agents/gzh-assistant/wechat/credentials.json 获取配置
"""

import requests

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/SETUP.md (reported line 78)May include surrounding context.

md
# -*- coding: utf-8 -*-
"""
1-Click WOA - 微信公众号草稿箱一键发布脚本
读取 ~/.openclaw/agents/gzh-assistant/wechat/credentials.json 获取配置
"""

import requests

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/SETUP.md (reported line 92)May include surrounding context.

md
# -*- coding: utf-8 -*-
"""
1-Click WOA - 微信公众号草稿箱一键发布脚本
读取 ~/.openclaw/agents/gzh-assistant/wechat/credentials.json 获取配置
"""

import requests

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/SETUP.md (reported line 110)May include surrounding context.

md
# -*- coding: utf-8 -*-
"""
1-Click WOA - 微信公众号草稿箱一键发布脚本
读取 ~/.openclaw/agents/gzh-assistant/wechat/credentials.json 获取配置
"""

import requests

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/SETUP.md (reported line 111)May include surrounding context.

md
# -*- coding: utf-8 -*-
"""
1-Click WOA - 微信公众号草稿箱一键发布脚本
读取 ~/.openclaw/agents/gzh-assistant/wechat/credentials.json 获取配置
"""

import requests

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/publish.py (reported line 5)May include surrounding context.

python
# -*- coding: utf-8 -*-
"""
1-Click WOA - 微信公众号草稿箱一键发布脚本
读取 ~/.openclaw/agents/gzh-assistant/wechat/credentials.json 获取配置
"""

import requests

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/publish.py (reported line 17)May include surrounding context.

python
# -*- coding: utf-8 -*-
"""
1-Click WOA - 微信公众号草稿箱一键发布脚本
读取 ~/.openclaw/agents/gzh-assistant/wechat/credentials.json 获取配置
"""

import requests

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/publish.py (reported line 25)May include surrounding context.

python
# -*- coding: utf-8 -*-
"""
1-Click WOA - 微信公众号草稿箱一键发布脚本
读取 ~/.openclaw/agents/gzh-assistant/wechat/credentials.json 获取配置
"""

import requests

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/test_config.py (reported line 10)May include surrounding context.

python
# -*- coding: utf-8 -*-
"""
1-Click WOA - 微信公众号草稿箱一键发布脚本
读取 ~/.openclaw/agents/gzh-assistant/wechat/credentials.json 获取配置
"""

import requests

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill describes reading local credentials, creating local files, and making outbound requests to WeChat, but it does not declare any explicit tool scope or permission boundaries. This weakens user awareness and platform enforcement, increasing the chance that sensitive files are read or data is transmitted without sufficiently explicit consent.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The trigger phrase '发草稿' is broad enough to match ordinary conversation, which can cause accidental invocation of a skill that reads credentials and may transmit content externally. In this context, ambiguous activation is riskier because the skill performs sensitive actions involving local secrets and outbound publishing.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The description does not clearly warn users that article content and images will be transmitted to the WeChat platform. This undermines informed consent for external data transfer, especially when user content may be sensitive or unpublished.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · references/SETUP.md (reported line 25)May include surrounding context.

Step 2:创建配置文件

bash
mkdir -p ~/.openclaw/agents/gzh-assistant/wechat

创建文件 ~/.openclaw/agents/gzh-assistant/wechat/credentials.json:

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

SQP-3 applies to all file types and includes language or locale policy violations. This troubleshooting guide forces Chinese-language interaction for all readers without any opt-in, alternative language option, or justification that the skill is region-specific.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module documentation describes the script as a one-click publishing tool for WeChat draft-box articles. However, the code only calls the draft creation endpoint (/cgi-bin/draft/add) and then instructs the user to view the draft in the backend, which contradicts the stated 'publish' behavior.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · scripts/publish.py (reported line 39)May include surrounding context.

python
def get_access_token(app_id, app_secret):
    """获取 access_token"""
    url = f"https://api.weixin.qq.com/cgi-bin/token"
    params = {
        "grant_type": "client_credential",
        "appid": app_id,

External Transmission

Medium
Category
Data Exfiltration
Confidence
88% confidence
Finding

This call uploads local image files to WeChat's material API. In a skill that reads file paths from local configuration, automatic file transmission can expose local assets without a user re-check, making this a genuine exfiltration risk if the configured directory contains unintended files or the skill is invoked unexpectedly.

Content

Scanner excerpt · scripts/publish.py (reported line 62)May include surrounding context.

python
with open(file_path, "rb") as f:
        files = {"media": (filename, f, mime)}
        url = f"https://api.weixin.qq.com/cgi-bin/material/add_material?access_token={access_token}&type={material_type}"
        r = requests.post(url, files=files, timeout=30)
    result = r.json()
    if "media_id" in result:

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

This request transmits the assembled article body to WeChat's draft endpoint. Because the body is built from user input and local resources and then sent automatically, it creates a meaningful risk of unintended disclosure in an agent environment even though the endpoint itself is expected.

Content

Scanner excerpt · scripts/publish.py (reported line 74)May include surrounding context.

python
"""创建草稿"""
    payload = {"articles": [article]}
    headers = {"Content-Type": "application/json; charset=utf-8"}
    url = f"https://api.weixin.qq.com/cgi-bin/draft/add?access_token={access_token}"
    resp = requests.post(url, json=payload, headers=headers, timeout=15)
    return resp.json()

External Transmission

Medium
Category
Data Exfiltration
Confidence
87% confidence
Finding

This API call sends article content, metadata, and a media identifier to an external service. External transmission is expected for this skill, but in the agent context it is still security-relevant because the script performs the transfer automatically and may disclose sensitive user-provided content to WeChat without an explicit final approval step.

Content

Scanner excerpt · scripts/publish.py (reported line 75)May include surrounding context.

python
payload = {"articles": [article]}
    headers = {"Content-Type": "application/json; charset=utf-8"}
    url = f"https://api.weixin.qq.com/cgi-bin/draft/add?access_token={access_token}"
    resp = requests.post(url, json=payload, headers=headers, timeout=15)
    return resp.json()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The script automatically uploads local images and article content to remote WeChat APIs once invoked, without an interactive confirmation step or clear warning at the point of transmission. In an agent-skill context, this increases the risk of unintended exfiltration of sensitive text or files if the skill is triggered on the wrong content or with an unexpected image directory.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The manifest says users provide article content in Markdown and the skill will publish it, implying Markdown-aware handling. In code, the input is split on ||| and the body is only newline-wrapped into <p> tags, with no Markdown parsing for headings, links, lists, or images, so the implemented behavior does not match the advertised input format.

Content

No source excerpt is available for this finding.