Back to skill

Security audit

WeCom post in group

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly aligned with scheduled WeChat Work webhook posting, but it exposes reusable webhook secrets and sends live messages without strong confirmation guardrails.

Install only if you are comfortable with the agent creating recurring active posts to a WeChat Work group. Treat the webhook URL/key like a password: avoid putting it in shell history, logs, or prompts, rotate it if exposed, and require a clear confirmation before any test or scheduled message is sent.

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:34
Finding

Webhook Bearer Credential Exposed Through Process Arguments, Output, and Automation Prompts

Content
View full analysis
``` ``` `SKILL.md:104-119` places the full webhook URL, including its bearer key, directly into persistent automation configuration and prompt text: ```markdown mode: "suggested create" name: prompt: + + rrule: cwds: status: ACTIVE ``` **Automation prompt template:** ``` {DATE_GUARD_IF_NEEDED} 执行以下步骤: 1. {CONTENT_GENERATION_STEPS} 2. 将整理好的内容通过企业微信群机器人 Webhook 推送,Webhook 地址为:{WEBHOOK_URL} ``` `scripts/validate_webhook.py:117-119` prints the complete webhook URL after validation: ```python if result.get("errcode") == 0: print(f"✅ Webhook is valid! Response: {json.dumps(result)}") # Output the full URL for downstream use print(f"\nWEBHOOK_URL={url}") ``` ### Technical Analysis A WeChat Work webhook key functions as a bearer credential: possession of the complete URL is sufficient to submit messages to the associated group webhook. The project exposes that credential through three channels: 1. Passing the URL or key as a command-line argument can expose it through shell history, process inspection, audit telemetry, terminal recording, and command-execution logs. 2. Printing `WEBHOOK_URL={url}` discloses the complete credential to standard output, where it may be retained in CI logs, agent transcripts, job logs, or monitoring systems. 3. Embedding the complete ...[truncated 1988 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • 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 (12)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description emphasizes scheduled/recurring webhook pushes with flexible recurrence rules, which is the core promised capability. The supplied code only validates a WeChat Work webhook, reads message content, and POSTs it immediately as text or markdown. While it does push to WeChat Work webhooks as described, it lacks any mechanism for time-based triggering, cron-like scheduling, persistence, recurrence rule parsing, or advanced patterns such as 'last Monday of each month.' Therefore the implementation materially underdelivers the declared primary purpose, making the description inaccurate.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description centers on setting up scheduled or recurring webhook pushes to WeChat Work groups, including multiple recurrence modes. The supplied code does not implement any scheduling, recurrence logic, content scheduling setup, or job management. Instead, it accepts a webhook URL or key, validates format, sends a test POST request to the WeChat Work webhook, and reports success/failure. While it does interact with WeChat Work webhooks, that is only tangentially related; its primary behavior is webhook validation, which is materially different from the declared scheduling/push automation purpose.

Content

No source excerpt is available for this finding.

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · references/schedule_patterns.md (reported line 44)May include surrounding context.

md
| 周四 / 星期四 | Thursday | TH |
| 周五 / 星期五 | Friday | FR |
| 周六 / 星期六 | Saturday | SA |
| 周日 / 星期日 | Sunday | SU |

---

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill instructs the agent to read files containing webhook secrets and make outbound network requests, but it declares no explicit tool scope or allowed-tools boundary. That increases the chance of unintended file access or external transmission beyond what a user expects, especially when handling secrets like webhook URLs/keys.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow directs a live test push to a user-supplied webhook before automation creation, but it does not require explicit confirmation that data will be sent to an external endpoint. This can leak sensitive or unintended content to third-party destinations and can also be abused if a malicious webhook URL is supplied.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The skill explicitly performs external transmission of content to a webhook, which is security-relevant because webhook URLs are secrets and the payload may include sensitive user data. In this skill context, outbound delivery is expected, but it is still dangerous without guardrails because the destination is user-controlled and the examples encourage direct curl-based sending.

Content

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

--message "<FORMATTED_CONTENT>"

text

Or use curl directly:

```bash
curl -s '<WEBHOOK_URL>' \

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The provided automation prompt template is written entirely in Chinese and directs the generated workflow in that language, without indicating that language should follow user preference. This can violate language/locale policy when the user has not opted into Chinese or requested Chinese output.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The section explicitly says to always generate a human-readable description for the user, and all provided user-facing examples are in Chinese. Because the file does not state that the skill is China/Chinese-locale specific or offer an opt-in language choice, this creates a natural-language locale policy concern.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The docstring and usage text describe the script as validating a webhook, but success is defined by sending a test message successfully. That mismatch is security-relevant because operators or downstream automation may invoke it assuming it is side-effect free, when it actually performs an action on an external system and can generate unintended outbound communications.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script's 'validation' logic performs a real POST to the supplied WeChat Work webhook, which causes an actual message to be delivered to the target group. In this skill context, users may expect harmless format validation, but the behavior can trigger unintended notifications, leak operational testing activity, or be abused to send messages to arbitrary approved webhooks supplied by a caller.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The script sends a live message to the provided webhook immediately, without requiring explicit user confirmation or presenting a safety notice at the point of transmission. In a scheduling/webhook skill, this increases the chance of accidental posts into production chat groups and makes the tool easier to misuse as a message-sending primitive under the guise of validation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The natural-language string sent by the script is fixed in Chinese, which imposes a specific language choice on users and recipients. The file does not offer a language option or explain that the skill is intentionally limited to a Chinese locale or region-specific workflow.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.