Back to skill

Security audit

aws-wechat-article-main

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a coherent WeChat content workflow, but its default configuration can route WeChat credential-backed publishing traffic through a third-party proxy without a strong opt-in warning.

Review before installing. If you use this skill, change wechat_api_base to the official WeChat endpoint or only use a third-party proxy if you explicitly trust its operator and understand that credentials, tokens, unpublished article content, and publishing requests may pass through it. Keep secrets in aws.env, do not paste them into chat, and consider publish_method: none if you only want local drafting.

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

Error
Location
references/config.example.yaml:163
Finding
Third-Party WeChat Reverse Proxy Configured as the Default Publishing Endpoint## Vulnerability Details **File Location**: `references/config.example.yaml`, lines 163-166 **Vulnerability Type**: Untrusted credential-handling endpoint configured by default **Risk Level**: High ### Vulnerable Code ```yaml wechat_api_base: "https://wechat.aiworkskills.cn" # WeChat API base URL. Official api.weixin.qq.com enforces an # IP allowlist, which blocks calls from a laptop; this # reverse proxy avoids that. Set it to # https://api.weixin.qq.com to talk to WeChat directly. ``` The corresponding validator accepts any nonempty endpoint without checking its protocol or host: ```python def _wechat_ok(cfg: dict, env: dict[str, str]) -> bool: n = _parse_wechat_accounts(cfg.get("wechat_accounts")) if n is None: return False if not _nonempty_str(cfg.get("wechat_api_base")): return False for i in range(1, n + 1): if not _nonempty_str(env.get(f"WECHAT_{i}_APPID")): return False if not _nonempty_str(env.get(f"WECHAT_{i}_APPSECRET")): return False return True ``` ### Technical Analysis The first-time setup instructions tell users to copy `references/config.example.yaml` into `.aws-article/config.yaml`. Consequently, the publisher-controlled domain `wechat.aiworkskills.cn` becomes the effective default endpoint for downstream WeChat publishing operations instead of the official `api.weixin.qq.com` service. The workflow requires users to configure `WECHAT_N_APPID` and `WECHAT_N_APPSECRET`, and it later invokes a separately installed publishing skill to obtain an access token and submit article content. Routing those operations through a third-party reverse proxy expands the credential and content trust boundary. The proxy may be able to observe authentication requests, returned access tokens, unpublished ar ...[truncated 2569 chars]
Remediation
## Remediation Suggestions 1. Change the default endpoint to the official service: ```yaml wechat_api_base: "https://api.weixin.qq.com" ``` 2. Make use of any third-party proxy an explicit opt-in operation. Before enabling it, clearly disclose that authentication traffic, tokens, and article content may pass through infrastructure outside WeChat. 3. Add endpoint validation to `validate_env.py`: - Require the `https` scheme. - Accept `api.weixin.qq.com` by default. - Reject unknown hosts unless the user enables an explicit override such as `allow_custom_wechat_proxy: true`. - Emit a prominent warning when a non-official host is configured. 4. Require affirmative confirmation before the agent invokes publishing through a custom endpoint. The confirmation should identify the exact hostname and the categories of data that may be transmitted. 5. Document the proxy's security controls, including secret handling, token retention, request logging, encryption, operator access, incident response, and data deletion policies. 6. Avoid forwarding long-lived AppSecrets through a proxy where possible. Prefer a design in which token acquisition occurs directly against the official API and the proxy receives only narrowly scoped, short-lived authorization material. 7. Add automated tests ensuring that insecure schemes, malformed URLs, and unapproved third-party hosts fail validation by default.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (22)

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description presents an end-to-end公众号运营 orchestration skill that should drive content planning, writing, review, formatting, image generation, and publishing. The supplied code does none of that workflow logic. Instead, it is a utility script for validating environment/config completeness before such a system might run. Its primary purpose is materially different from the declared skill purpose. While the config domains mentioned (writing model, image model, WeChat publishing) are related to the broader ecosystem, this code chunk itself only performs preflight validation and does not implement the described automation pipeline or its triggers.

Lp3

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding
The skill declares no explicit tool scope even though it instructs the agent to read local files such as aws.env, config files, article drafts, and repository contents. In a skill that handles credentials and publishing workflows, missing permission boundaries increases the chance of unintended file access or overbroad execution by an agent runtime.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger list includes broad natural-language phrases like '帮我发一篇', '今天写什么好', and '接着上次那篇', which could activate the skill in ambiguous contexts. Because this skill can route into file operations, workflow orchestration, and eventual publishing-related actions, accidental invocation could expose local project state or start unintended modifications.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The skill documentation is written entirely as Chinese-only operational guidance and explicitly optimizes for Chinese output handling, but it does not state that the locale is intentionally limited nor offer users a language choice. Under the policy, forcing a specific language or locale without opt-in is a natural-language policy concern.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
This markdown file presents all user-facing instructions in Chinese only, and nowhere indicates that the skill is China-specific or that users may choose another language. Under the language/locale policy, forcing a specific language without opt-in is a natural-language policy concern.

Natural-Language Policy Violations

Medium
Confidence
89% confidence
Finding
This manifest includes multiple Chinese-only defaults and constraints such as title length in Chinese characters and Chinese writing-style presets, which indicate the skill is designed to force a specific language/locale. The file does not offer an opt-in choice or explain that the skill is intentionally region-specific for compliance or platform reasons.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The template defaults the WeChat API base to a third-party reverse proxy instead of the official WeChat endpoint, which can expose access tokens, content, account metadata, and publishing actions to an external service. In a publishing skill that may handle account credentials and perform live post operations, routing privileged API traffic through an unrelated proxy materially increases the risk of credential theft, traffic interception, unauthorized content publication, and supply-chain compromise.

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
This markdown skill file is written as mandatory operational guidance and begins with a Chinese-only heading, with the rest of the instructions likewise requiring Chinese-language handling such as preserving Chinese output encoding. There is no indication that the user may choose another language or that the locale restriction is optional, which can violate a language/locale policy when applied broadly.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The file contains only Chinese text and does not offer any language choice or explain that the skill is intended for a Chinese-speaking or region-specific context. Per the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This markdown file includes a hard requirement that all text in the image must be in Chinese. That is a language-policy constraint expressed in natural language, and the file does not offer any opt-in, alternative language choice, or justification for why Chinese is required.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The README is entirely written in Chinese and describes the preset behavior only in that language, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-only context. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The instruction states that all text in the image must be Chinese, which enforces a specific language choice. This is a natural-language policy issue because the file does not offer the user a language option or document a justified locale-specific constraint.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
The file's comments and rule text are entirely written in Chinese, which imposes a specific language on users without offering a language choice or documenting why a Chinese-only locale is required. This matches the policy category for language or locale constraints expressed in natural language.

Natural-Language Policy Violations

Medium
Confidence
87% confidence
Finding
The entire skill file specifies the sticker style guidance only in Chinese, including the title and all content instructions, with no indication that the user can choose another language or that the skill is intentionally limited to a Chinese-language context. Under the policy, forcing a specific language without user opt-in or clear justification is a natural-language policy concern.

Natural-Language Policy Violations

Medium
Confidence
88% confidence
Finding
This markdown file presents all instructional content in Chinese and does not indicate that the user can choose another language or that the file is intentionally limited to a Chinese-language context. Under the policy, forcing a specific language without opt-in can be a natural-language policy violation.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The entire skill example is written in Chinese and provides no indication that language selection is optional or limited to a justified region-specific context. Under the policy rule for natural-language violations, this can be considered a locale/language constraint imposed without user choice.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The file is entirely a Chinese writing specification and mandates specific Chinese punctuation, phrasing, and style rules such as using Chinese quote marks and spacing between English and Chinese words. This constitutes a language/locale constraint, but the document does not indicate user opt-in or explain that the skill is intentionally limited to Chinese-language writing contexts.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
This markdown file contains user-facing instructions solely in Chinese, and there is no indication that the skill is region-specific or that users can opt into another language. Under the policy, forcing a specific language without user choice can be a natural-language policy violation.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
The README content is entirely in Chinese and does not indicate that users may choose another language or locale. Under the policy criteria, forcing a specific language without user opt-in is a natural-language policy concern.

Natural-Language Policy Violations

Low
Confidence
94% confidence
Finding
This markdown file is entirely written as a Chinese-only preset, with no indication that the user can choose another language or locale. Under the policy rule for natural-language constraints, a skill artifact that effectively forces a specific language without opt-in should be flagged unless the locale limitation is explicitly justified.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
This code file contains natural-language instructions, usage text, and help descriptions exclusively in Chinese. Under the policy, forcing a specific language without offering a user choice or documenting a justified locale constraint is a natural-language policy violation.

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The manifest description forces a specific language presentation without indicating that users can choose their preferred language or locale. Under the policy, language-specific behavior should not be imposed without opt-in unless clearly justified as region-specific.

Static analysis

No suspicious patterns detected.