Back to skill

Security audit

微信公众号 Markdown 发布助手

Security checks for vulnerabilities and agentic risk

Overview

This skill is coherent for WeChat publishing, but it needs Review because it stores WeChat credentials/tokens in plaintext workspace files and supports direct public-account publishing without a clear separate confirmation step.

Install only if you are comfortable giving the agent WeChat Official Account API authority. Store the AppSecret outside shared workspace/memory when possible, restrict file permissions, rotate the secret if exposed, and require an explicit manual confirmation before any final publish action.

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

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:377
Finding
Plaintext WeChat Credentials and Access Tokens Stored in the Agent Workspace## Vulnerability Details **File Location**: `SKILL.md`, lines 83 and 377–447 **Vulnerability Type**: Plaintext sensitive-data storage and insufficient file-permission guidance **Risk Level**: Medium ### Vulnerable Configuration Snippets Lines 377–384 instruct users to store the long-lived AppSecret directly in a JSON file: ```json { "appid": "wx_your_appid_here", "appsecret": "your_appsecret_here" } ``` Lines 387–392 direct the Skill to reference this file from the Agent's tool configuration and incorrectly describe the JSON value as encrypted: ```text ### WeChat Official Account - appid: wx_xxxxx - appsecret: (encrypted and stored in wechat_config.json) - token cache: ~/.openclaw/workspace/memory/wechat_token.json ``` Lines 401–408 provide another plaintext AppSecret configuration example: ```json { "appid": "wx_xxx", "appsecret": "xxx", "default_thumb": "/path/to/default_cover.jpg" } ``` The documented storage locations are: ```text ~/.openclaw/workspace/memory/wechat_config.json ~/.openclaw/workspace/memory/wechat_token.json ``` The security guidance at lines 446–447 only prescribes mode `600` for the token cache. It recommends adding the credential file to `.gitignore`, but does not require restrictive permissions for the file containing the longer-lived AppSecret. ### Technical Analysis The configuration format stores the WeChat AppSecret as an ordinary plaintext JSON value. Nothing in the documented procedure encrypts that value, despite the statement that it is encrypted. Adding the file to `.gitignore` only reduces accidental source-control commits; it does not protect the secret from local users, processes, backups, workspace-reading tools, or other Skills. The access token is also persisted in plaintext under the general Agent workspace. Although the document recommends mode `600` for that token file, it does not require secure file creation, verify ownership, protect the parent directory, or apply equivalent permissions to `wec ...[truncated 1775 chars]
Remediation
## Remediation Suggestions 1. Store the AppSecret in an operating-system keychain, managed secret store, or dedicated credential service instead of a general Agent workspace. 2. If file-based storage is unavoidable: - Place credentials outside general memory and workspace directories. - Restrict the parent directory to mode `700`. - Create both credential and token files atomically with mode `600`. - Verify file ownership and permissions before every read. - Reject symbolic links and unexpected file types. 3. Apply the same protection to `wechat_config.json` as to `wechat_token.json`; `.gitignore` is not a security control for local secret storage. 4. Remove the inaccurate claim that the AppSecret is encrypted unless actual authenticated encryption and secure key management are implemented. 5. Avoid printing AppSecrets or complete access tokens in logs, status messages, examples, errors, or Agent conversation output. 6. Redact credentials from backups, diagnostics, and tool traces. 7. Minimize token lifetime and scope where supported, reuse cached tokens only as necessary, and securely delete expired token data. 8. Document credential rotation procedures and advise immediate AppSecret rotation if either file may have been exposed. 9. Prefer HTTP authorization mechanisms that do not place secrets in URLs or logs when supported by the upstream API.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (13)

Vague Triggers

Medium
Confidence
94% confidence
Finding
The trigger phrases include very broad everyday requests such as '帮我发微信' and '写公众号文章', which can cause the skill to activate in contexts the user did not intend. Because this skill can perform external API actions and potentially publish content, accidental activation increases the chance of unintended data transmission or account actions.

External Transmission

Medium
Category
Data Exfiltration
Content
**调用方式**:
```
GET https://api.weixin.qq.com/cgi-bin/token
?grant_type=client_credential
&appid=你的AppID
&secret=你的AppSecret
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**调用方式**:
```
GET https://api.weixin.qq.com/cgi-bin/token
?grant_type=client_credential
&appid=你的AppID
&secret=你的AppSecret
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**调用方式**:
```
GET https://api.weixin.qq.com/cgi-bin/token
?grant_type=client_credential
&appid=你的AppID
&secret=你的AppSecret
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**调用方式**:
```
GET https://api.weixin.qq.com/cgi-bin/token
?grant_type=client_credential
&appid=你的AppID
&secret=你的AppSecret
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**调用方式**:
```
GET https://api.weixin.qq.com/cgi-bin/token
?grant_type=client_credential
&appid=你的AppID
&secret=你的AppSecret
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**调用方式**:
```
GET https://api.weixin.qq.com/cgi-bin/token
?grant_type=client_credential
&appid=你的AppID
&secret=你的AppSecret
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**调用方式**:
```
GET https://api.weixin.qq.com/cgi-bin/token
?grant_type=client_credential
&appid=你的AppID
&secret=你的AppSecret
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**调用方式**:
```
GET https://api.weixin.qq.com/cgi-bin/token
?grant_type=client_credential
&appid=你的AppID
&secret=你的AppSecret
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**调用方式**:
```
GET https://api.weixin.qq.com/cgi-bin/token
?grant_type=client_credential
&appid=你的AppID
&secret=你的AppSecret
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
**调用方式**:
```
GET https://api.weixin.qq.com/cgi-bin/token
?grant_type=client_credential
&appid=你的AppID
&secret=你的AppSecret
Confidence
50% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill supports direct publication to a public account but does not require an explicit pre-action confirmation or strong warning immediately before the irreversible publish step. In context, publication can remove drafts, submit content for review, and expose content publicly, so accidental or manipulated invocation could cause reputational or operational harm.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
L008 将语言固定为“zh-CN”,文件中未说明这是可选设置,也未给出用户语言偏好选择。按规则,强制特定语言/locale 且无用户 opt-in 属于自然语言政策风险。

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
SKILL.md:465