Back to skill

Security audit

Save Article Miaoyan

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly does what it says, but it automatically fetches links, writes notes to synced storage, and shares URLs with external services in ways users may not clearly expect.

Review this before installing. It is suitable only if you are comfortable with automatic WeChat-link saves, fixed writes into a synced Miaoyan folder, and article URLs being sent to external extraction providers. Do not use it with private, tokenized, internal, signed, or sensitive URLs unless the implementation is changed to require confirmation and restrict allowed URL destinations.

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

T09 · Insecure Skill Coding Practices

Error
Location
save_article_to_miaoyan.py:57
Finding

Unrestricted URL Fetching Enables SSRF and Local File Access

Content
View full analysis
str: """Use curl to fetch content directly.""" cmd = [ "curl", "-s", "-L", "--max-time", "20", "-H", "User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36", "-H", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "-H", "Accept-Language: zh-CN,zh;q=0.9,en;q=0.8", url ] result = subprocess.run(cmd, capture_output=True, text=True) if result.returncode != 0: raise Exception(f"curl failed: {result.stderr}") return result.stdout ``` The unrestricted fetch is reachable through the fallback sequence: ```python def fetch_article(url: str) -> dict: """Fetch article content using multiple methods.""" site_type = detect_site_type(url) html = None method = None try: html = fetch_with_jina(url) if html and len(html) > 100: method = 'jina' print(f"✅ 使用 Jina Reader 抓取成功") except Exception as e: print(f"⚠️ Jina 抓取失败: {e}") if not html or len(html) < 100: try: html = fetch_with_curl(url) if html and len(html) > 100: method = 'curl' print(f"✅ 使用 curl 抓取成功") except Exception as e: print(f"⚠️ curl 抓取失败: {e}") if not html or len(html) < 100: try: html = fetch_with_tavily(url) if html and len(html) > 100: method = 'tavily' print(f"✅ 使用 Tavily 抓取成功") except Exception as e: print(f"⚠️ Tavily 抓取失败: {e}") if not html or len(html) < 100: raise Exception("所有抓取方式都失败了") if me ...[truncated 2939 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
save_article_to_miaoyan.py:74
Finding

Sensitive URLs Are Automatically Disclosed to Third-Party Extraction Services

Content
View full analysis
str: """Use Jina AI Reader to fetch Markdown.""" jina_url = f"https://r.jina.ai/http://{url}" cmd = [ "curl", "-s", "-L", "--max-time", "30", "-H", "User-Agent: Mozilla/5.0", jina_url ] result = subprocess.run(cmd, capture_output=True, text=True) if result.returncode != 0: raise Exception(f"Jina fetch failed: {result.stderr}") return result.stdout ``` ```python def fetch_with_tavily(url: str) -> str: """Use the Tavily Extract API.""" api_url = "https://api.tavily.com/extract" payload = { "api_key": TAVILY_API_KEY, "urls": [url] } cmd = [ "curl", "-s", "-X", "POST", api_url, "-H", "Content-Type: application/json", "-d", json.dumps(payload) ] result = subprocess.run(cmd, capture_output=True, text=True) if result.returncode != 0: raise Exception(f"Tavily fetch failed: {result.stderr}") try: data = json.loads(result.stdout) if data.get('results') and len(data['results']) > 0: return data['results'][0].get('raw_content', '') else: raise Exception(f"Tavily no results: {data}") except json.JSONDecodeError: raise Exception(f"Tavily invalid JSON: {result.stdout[:200]}") ``` Jina is attempted first for every submitted URL, while Tavily is used as a later fallback: ```python try: html = fetch_with_jina(url) if html and len(html) > 100: method = 'jina' print(f"✅ 使用 Jina Reader 抓取成功") except Exception as e: print(f"⚠️ Jina 抓取失败: {e}") if not html or len(html) < 100: try: html = fetch_with_curl(url) if html and len(html) > 100: met ...[truncated 2856 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (29)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The documented behavior does not cleanly match the analyzed behavior: the description promises arbitrary webpage saving, but the finding indicates narrower URL support, possible automatic trigger behavior, and delegation to external scripts. This mismatch is dangerous because users may invoke the skill under false assumptions about when it activates, what content it processes, and what external components actually handle their data.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The stated purpose is to fetch an article, summarize it, and save it to Miaoyan. Spawning a bash subprocess to an absolute local script path introduces command-execution capability beyond the user-facing intent; article saving does not inherently require shell execution when it could be implemented directly in code.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill describes automatic detection and saving when a WeChat link is sent, but it does not prominently warn users that this causes a file write side effect. Hidden or insufficiently disclosed automatic file creation can lead to unintended persistence of sensitive content, surprise data retention, and unsafe triggering in chat-driven environments.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The manifest says the skill can fetch and save '任意网页文章(微信、博客、技术文章等)', implying broad webpage support. However, the README explicitly states non-WeChat links will not trigger and only public WeChat article links are recognized, which is a substantive mismatch in advertised scope.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill describes capabilities that involve environment access, network fetching, shell execution, and file writes, but it does not declare any explicit tool scope or permissions boundaries. This is dangerous because users and hosting frameworks cannot reliably constrain or review what the skill is allowed to do, increasing the chance of unintended filesystem access, command execution, or data handling beyond user expectations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill uses fallback retrieval services, including third-party services, but does not warn users that article URLs, content, or metadata may be transmitted externally. This is dangerous because users may unknowingly expose private, sensitive, or access-controlled links to outside providers during retrieval and summarization.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The OpenClaw invocation text suggests that merely sending an article link may automatically trigger the workflow, which is overly broad and can cause unintended activation. That creates risk of accidental network requests, content ingestion, and file writes without sufficiently explicit user confirmation for each action.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The manifest says the skill can fetch and save '任意网页文章(微信、博客、技术文章等)', implying broad webpage/article support. This trigger file documents automatic and manual activation only for mp.weixin.qq.com article URLs, creating a semantic mismatch between the advertised scope and the documented behavior exposed to users.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger is configured to automatically execute a file-writing workflow immediately when a matching link appears in a message, without explicit user confirmation at the time of action. This is dangerous because merely receiving or relaying a matching message can cause unintended persistence to local storage, creating opportunities for unwanted writes, social-engineering-triggered actions, and noisy or abusive note creation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill explicitly states a high-priority immediate execution model for a write operation and says not to wait for user confirmation. In the context of chat-triggered automation, this weakens user intent verification and increases the risk of unintended filesystem modifications from unsolicited, accidental, or attacker-supplied content that matches the trigger pattern.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill manifest says it can fetch and save arbitrary webpage articles such as WeChat, blogs, and technical articles. However, this file is documented and implemented specifically as a WeChat-message listener that matches only mp.weixin.qq.com article URLs, which is narrower and semantically different from a general article-saving skill.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · auto_save_article.py (reported line 23)May include surrounding context.

python
skill_path = "/Users/andy/.qclaw/workspace/skills/save-article-miaoyan/save_article.sh"
    
    try:
        result = subprocess.run(
            ["bash", skill_path, url],
            capture_output=True,
            text=True,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code automatically triggers article fetching and saving whenever a matching WeChat URL appears in a message, without explicit user confirmation at the time of execution. In an agent context, this can cause unintended network access, content retrieval, note creation, and possible propagation of sensitive or malicious content simply by sending or relaying a crafted link.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill reads a third-party API credential from the environment and uses it to send user-requested URLs/content to Tavily, but the manifest description does not disclose that external service dependency or data sharing. This creates a transparency and data-handling risk because users may assume article processing is local except for direct fetching.

Content

No source excerpt is available for this finding.

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · save_article_to_miaoyan.py (reported line 67)May include surrounding context.

python
url
    ]
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        raise Exception(f"curl failed: {result.stderr}")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · save_article_to_miaoyan.py (reported line 84)May include surrounding context.

python
url
    ]
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        raise Exception(f"curl failed: {result.stderr}")

subprocess module call

Medium
Category
Dangerous Code Execution
Confidence
70% confidence
Finding

subprocess module calls execute external commands. Without careful input validation, this enables command injection.

Content

Scanner excerpt · save_article_to_miaoyan.py (reported line 106)May include surrounding context.

python
url
    ]
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        raise Exception(f"curl failed: {result.stderr}")

Tainted flow: 'cmd' from os.environ.get (line 100, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · save_article_to_miaoyan.py (reported line 67)May include surrounding context.

python
url
    ]
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        raise Exception(f"curl failed: {result.stderr}")

Tainted flow: 'cmd' from os.environ.get (line 100, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · save_article_to_miaoyan.py (reported line 84)May include surrounding context.

python
url
    ]
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        raise Exception(f"curl failed: {result.stderr}")

Tainted flow: 'cmd' from os.environ.get (line 100, credential/environment) → subprocess.run (code execution)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · save_article_to_miaoyan.py (reported line 106)May include surrounding context.

python
url
    ]
    
    result = subprocess.run(cmd, capture_output=True, text=True)
    if result.returncode != 0:
        raise Exception(f"curl failed: {result.stderr}")

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill forwards user-supplied article URLs to Jina Reader and optionally Tavily, which are third-party services outside the user's environment. Undisclosed forwarding of URLs and possibly article content is dangerous because it can leak sensitive links, access patterns, or private resources to external providers.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill sends the provided URL to Jina Reader and Tavily without clearly warning the user that external services will receive that data. In a note-saving skill, users are likely to expect fetching and storage behavior, but not silent transmission to additional processors, which raises privacy and compliance concerns.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
95% confidence
Finding

The code performs external transmission to Tavily's API endpoint, sending user-requested URLs and an API credential off-device. This matters because the skill description emphasizes saving articles to Miaoyan, while the actual implementation shares data with an undisclosed third party, increasing privacy and data-governance risk.

Content

Scanner excerpt · save_article_to_miaoyan.py (reported line 93)May include surrounding context.

python
def fetch_with_tavily(url: str) -> str:
    """使用 Tavily Extract API 抓取"""
    api_url = "https://api.tavily.com/extract"
    
    payload = {
        "api_key": TAVILY_API_KEY,

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script writes fetched content directly into a fixed iCloud-synced Miaoyan directory without a confirmation step, preview, or warning. In skill context, that can silently persist untrusted or sensitive content into synced storage, potentially causing privacy issues or note-base pollution.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

All user-facing instructions and interaction examples are presented only in Chinese, and the examples imply Chinese command phrases such as '保存文章' and '保存这篇' as expected usage. The file does not mention that the skill is intentionally limited to Chinese users or offer any language/locale opt-in.

Content

No source excerpt is available for this finding.