Back to skill

Security audit

Wechat Allauto Gzh

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its WeChat writing-and-draft purpose, but it can modify a WeChat draft account automatically and inserts fixed creator branding without clear per-run consent.

Install only if you are comfortable reviewing every generated article, cover, author, digest, and WeChat draft before publication. Prefer guided/local generation, avoid relying on automatic mode, and use a dedicated low-privilege environment and separate WeChat credentials until the auto-upload trigger, branding defaults, and mock verification behavior are fixed.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

other

Error
Location
scripts/html_writer.py:245
Finding

Hardcoded Creator Branding Manipulates User-Generated Publishing Output

Content
View full analysis
str: footer = f'

{text}

' return html_content + '\n' + footer ``` ```python # scripts/write_article_v2.py:91 html_content = self.html_writer.add_footer( html_content, "小爪制作,需要审核" ) ``` ```python # scripts/write_article_v2.py:365-376 def _push_draft(self, access_token: str, title: str, content: str, thumb_media_id: str, author: str = "小爪") -> Optional[str]: """Push a draft to a WeChat Official Account.""" import requests url = f"https://api.weixin.qq.com/cgi-bin/draft/add?access_token={access_token}" data = { "articles": [{ "title": title, "content": content, "author": author, "digest": f"{title} - 小爪制作", ``` ```html
小爪
需要审核
{theme_data['name']}风格
``` ### Technical Analysis The article-generation pipeline automatically adds fixed creator attribution to user-requested content. The modification is applied through several independent paths: 1. A hardcoded footer is appended to generated HTML. 2. Generated covers contain fixed creator branding. 3. WeChat draft metadata defaults to a fixed author. 4. The draft digest contains fixed creator attribution. 5. The standalone publishing and update scripts use additional hardcoded author defaults. These val ...[truncated 1583 chars]
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
scripts/cron_detector.py:26
Finding

Broad Scheduled-Task Detection Can Trigger Unconfirmed Automatic Draft Upload

Content
View full analysis
Remediation
View remediation

other

Warning
Location
scripts/content_searcher.py:38
Finding

Mock Search and Verification Results Are Presented as Real Evidence

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:4
Finding

Unbounded Python Dependencies and Integrity-Free Runtime CDN Assets

Content
View full analysis
=2.28.0 python-dotenv>=0.19.0 pyyaml>=6.0 tavily-python>=0.3.0 ``` ```html ``` ### Technical Analysis The Python requirements specify only lower bounds. A future installation may therefore resolve to versions that were not reviewed with this Skill. No lock file or package hashes were identified in the audited structure. Generated cover pages also execute JavaScript from a third-party CDN when opened in a browser. Although explicit JavaScript versions are present in the URLs, the page does not use Subresource Integrity attributes or a restrictive Content Security Policy. Consequently, the browser trusts the code returned by the CDN at runtime. No evidence was found that the listed packages are malicious, typosquatted, or currently compromised. The vulnerability is the lack of reproducible and integrity-checked dependency resolution, not a confirmed malicious dependency. ### Attack Path #### Python dependency path 1. A user follows the installation instructions and runs `pip install -r requirements.txt`. 2. The package resolver selects any available version satisfying each minimum version. 3. A newly released, compromised, or incompatible version can be installed without repository changes. 4. Package installation or subsequent import executes code under the user’s Python environment. 5. That code may access files, environment variables, and network resources available to the process. #### Browser CDN path 1. The Skill generates a cover HTML f ...[truncated 1086 chars]
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (144)

Tainted flow: 'url' from os.getenv (line 24, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/push_draft.py (reported line 26)May include surrounding context.

python
def get_access_token():
    url = f"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={APP_ID}&secret={APP_SECRET}"
    try:
        response = requests.get(url, timeout=30)
        result = response.json()
        if 'access_token' in result:
            print(f"✅ Access Token 获取成功!")

Tainted flow: 'url' from os.getenv (line 24, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/update_draft.py (reported line 27)May include surrounding context.

python
def get_access_token():
    url = f"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={APP_ID}&secret={APP_SECRET}"
    try:
        response = requests.get(url, timeout=30)
        result = response.json()
        if 'access_token' in result:
            print(f"✅ Access Token 获取成功!")

Tainted flow: 'url' from os.getenv (line 24, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/push_draft.py (reported line 48)May include surrounding context.

python
print(f"🖼️ 上传封面图片: {image_path}")
        with open(image_path, 'rb') as f:
            files = {'media': f}
            response = requests.post(url, files=files, timeout=30)
        result = response.json()
        if 'media_id' in result:
            print(f"✅ 封面上传成功!")

Tainted flow: 'url' from os.getenv (line 24, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/push_draft.py (reported line 77)May include surrounding context.

python
}
    try:
        print(f"📤 正在创建草稿...")
        response = requests.post(
            url,
            data=json.dumps(data, ensure_ascii=False).encode('utf-8'),
            headers={'Content-Type': 'application/json'},

Tainted flow: 'url' from os.getenv (line 24, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/update_draft.py (reported line 145)May include surrounding context.

python
}
    try:
        print(f"📤 正在创建草稿...")
        response = requests.post(
            url,
            data=json.dumps(data, ensure_ascii=False).encode('utf-8'),
            headers={'Content-Type': 'application/json'},

Tainted flow: 'url' from os.getenv (line 24, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/update_draft.py (reported line 56)May include surrounding context.

python
try:
        print(f"📋 获取草稿列表...")
        response = requests.post(
            url,
            data=json.dumps(data),
            headers={'Content-Type': 'application/json'},

Tainted flow: 'url' from os.getenv (line 24, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/update_draft.py (reported line 90)May include surrounding context.

python
try:
        print(f"📋 获取草稿列表...")
        response = requests.post(
            url,
            data=json.dumps(data),
            headers={'Content-Type': 'application/json'},

Tainted flow: 'url' from os.getenv (line 24, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/update_draft.py (reported line 183)May include surrounding context.

python
try:
        print(f"📋 获取草稿列表...")
        response = requests.post(
            url,
            data=json.dumps(data),
            headers={'Content-Type': 'application/json'},

Tainted flow: 'url' from os.getenv (line 327, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/write_article_v2.py (reported line 329)May include surrounding context.

python
import requests
        url = f"https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={WECHAT_APP_ID}&secret={WECHAT_APP_SECRET}"
        try:
            response = requests.get(url, timeout=30)
            result = response.json()
            if 'access_token' in result:
                return result['access_token']

Tainted flow: 'url' from os.getenv (line 327, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/write_article_v2.py (reported line 353)May include surrounding context.

python
print(f"   📤 正在上传封面...")
            with open(image_path, 'rb') as f:
                files = {'media': f}
                response = requests.post(url, files=files, timeout=30)
            result = response.json()
            if 'media_id' in result:
                print(f"   ✓ 封面上传成功")

Tainted flow: 'url' from os.getenv (line 327, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/write_article_v2.py (reported line 386)May include surrounding context.

python
try:
            print(f"   📤 正在推送草稿...")
            response = requests.post(
                url,
                data=json.dumps(data, ensure_ascii=False).encode('utf-8'),
                headers={'Content-Type': 'application/json'},

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · CONTRIBUTING.md (reported line 51)May include surrounding context.

bash
# 复制配置模板
cp .env.example .env

# 编辑 .env 文件,填写微信公众号配置

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · README.md (reported line 45)May include surrounding context.

bash
# 复制配置模板
cp .env.example .env

# 编辑 .env 文件,填写微信公众号配置

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · CONTRIBUTING.md (reported line 52)May include surrounding context.

复制配置模板

cp .env.example .env

编辑 .env 文件,填写微信公众号配置

text

#### 4. 获取微信公众号配置

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · README.md (reported line 47)May include surrounding context.

复制配置模板

cp .env.example .env

编辑 .env 文件,填写微信公众号配置

text

#### 4. 获取微信公众号配置

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

Deleting files, managing a Git repository, changing directories, and running shell commands are unrelated to the stated writing-and-publishing purpose and substantially increase the attack surface. In an agent environment, such hidden operational behaviors can damage the workspace or manipulate code repositories under the guise of content creation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Deleting files, managing a Git repository, changing directories, and running shell commands are unrelated to the stated writing-and-publishing purpose and substantially increase the attack surface. In an agent environment, such hidden operational behaviors can damage the workspace or manipulate code repositories under the guise of content creation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Deleting files, managing a Git repository, changing directories, and running shell commands are unrelated to the stated writing-and-publishing purpose and substantially increase the attack surface. In an agent environment, such hidden operational behaviors can damage the workspace or manipulate code repositories under the guise of content creation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Deleting files, managing a Git repository, changing directories, and running shell commands are unrelated to the stated writing-and-publishing purpose and substantially increase the attack surface. In an agent environment, such hidden operational behaviors can damage the workspace or manipulate code repositories under the guise of content creation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

Deleting files, managing a Git repository, changing directories, and running shell commands are unrelated to the stated writing-and-publishing purpose and substantially increase the attack surface. In an agent environment, such hidden operational behaviors can damage the workspace or manipulate code repositories under the guise of content creation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Deleting files, managing a Git repository, changing directories, and running shell commands are unrelated to the stated writing-and-publishing purpose and substantially increase the attack surface. In an agent environment, such hidden operational behaviors can damage the workspace or manipulate code repositories under the guise of content creation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Deleting files, managing a Git repository, changing directories, and running shell commands are unrelated to the stated writing-and-publishing purpose and substantially increase the attack surface. In an agent environment, such hidden operational behaviors can damage the workspace or manipulate code repositories under the guise of content creation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

Deleting files, managing a Git repository, changing directories, and running shell commands are unrelated to the stated writing-and-publishing purpose and substantially increase the attack surface. In an agent environment, such hidden operational behaviors can damage the workspace or manipulate code repositories under the guise of content creation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

Deleting files, managing a Git repository, changing directories, and running shell commands are unrelated to the stated writing-and-publishing purpose and substantially increase the attack surface. In an agent environment, such hidden operational behaviors can damage the workspace or manipulate code repositories under the guise of content creation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

Deleting files, managing a Git repository, changing directories, and running shell commands are unrelated to the stated writing-and-publishing purpose and substantially increase the attack surface. In an agent environment, such hidden operational behaviors can damage the workspace or manipulate code repositories under the guise of content creation.

Content

No source excerpt is available for this finding.