Back to skill

Security audit

Tencent Docs Reader

Security checks for vulnerabilities and agentic risk

Overview

The core reader is mostly disclosed, but the package also includes an under-documented weekly-report workflow that can send employee names to an arbitrary webhook.

Install only if you trust the publisher and are comfortable with browser automation reading document contents. Avoid using it on sensitive documents unless you control the environment, validate URLs manually, do not set WECOM_WEBHOOK_URL unless intended, and review or remove check_weekly_report.py before use.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/read_sheet.py:216
Finding

Unrestricted Browser Navigation Enables Access to Untrusted or Internal Resources

Content
View full analysis
';" "document.getElementById('p').focus();" ) run([AB, 'eval', js], timeout=10) time.sleep(1) run([AB, 'press', 'Control+v'], timeout=10) time.sleep(2) out = run([AB, 'eval', "document.getElementById('p').value"], timeout=10) text = out.strip() ``` ### Technical Analysis The `--url` command-line argument is passed directly to `agent-browser open` without validating its scheme, hostname, port, path, or resolved network address. Although the documented purpose is to read Tencent Docs spreadsheets, the implementation does not require the destination to be `docs.qq.com`. Because the browser may have access to network resources unavailable to an external attacker, this behavior creates an SSRF-style browser primitive. The script also attempts to select, copy, and return the displayed content, potentially turning navigation into a data-extraction channel. Use of an argument array prevents shell command injection, but it does not mitigate unsafe browser navigation. ### Attack Path 1. An attacker persuades a user or automation workflow to invoke the script with an attacker-selected `--url`. 2. The attacker supplies a loopback, private-network, link-loc ...[truncated 1051 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/check_weekly_report.py:13
Finding

Undocumented Workflow Can Transmit Employee Names to an Arbitrary Webhook

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
README.md:20
Finding

Installation Instructions Execute Unpinned Third-Party Packages

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/check_weekly_report.py:14
Finding

Predictable Relative Output File Is Vulnerable to Symbolic-Link Overwrite

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (22)

Tainted flow: 'req' from os.environ.get (line 148, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The script takes a webhook endpoint from an environment variable and sends employee weekly-report status to it without validating destination, origin, or requiring runtime approval. This creates an exfiltration path for internal personnel/work-status data and enables misuse if the environment variable is set to an attacker-controlled URL.

Content

Scanner excerpt · scripts/check_weekly_report.py (reported line 153)May include surrounding context.

python
data=json.dumps(data, ensure_ascii=False).encode('utf-8'),
            headers={'Content-Type': 'application/json'}
        )
        with urllib.request.urlopen(req) as resp:
            print(f"已发送企业微信通知: {resp.read().decode('utf-8')}", file=sys.stderr)
    except Exception as e:
        print(f"发送企业微信通知失败: {e}", file=sys.stderr)

Tp2

High
Category
MCP Tool Poisoning
Confidence
85% confidence
Finding

Mixing characters from multiple Unicode scripts in a single identifier is a common technique to create visually ambiguous tool names.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description promises a generic Tencent Docs spreadsheet reading tool that supports selecting any sheet tab and returns TSV-like text. The supplied code does not implement that general reader behavior directly. Instead, it is a purpose-built workflow script for checking weekly report completion in one fixed Tencent Docs URL. It calls a separate read script, reads from a fixed output file, searches for specific columns such as '本周主要工作进展', '下周工作计划', and '责任人', determines which colleagues have not filled in reports, and may send notifications through a configured WeCom webhook or QQ message placeholder. These are materially different primary behaviors and include undeclared notification capabilities, so this is a clear mismatch.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill is described as a read-only Tencent Docs reader, but this script includes notification behavior and user-targeting logic via QQ-related messaging flow. That mismatch increases the risk of covert actions because operators may invoke the skill expecting only document retrieval, not downstream messaging or monitoring workflows.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

This code sends outbound WeCom webhook notifications containing employee names and reporting status, which exceeds the stated behavior of simply reading Tencent Docs spreadsheets. In a read-only skill context, undisclosed outbound messaging is a significant trust and data-governance issue because it can leak internal workflow information to external endpoints.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill declares no explicit tool scope or permission boundaries despite describing behavior that opens URLs, uses browser automation, copies document contents, and writes output files. In an agent ecosystem, missing scope declarations increase the chance of overbroad execution or unexpected access to network, shell, and filesystem capabilities beyond what users reasonably expect.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The trigger phrase qq doc is broad enough to match ordinary conversation, increasing the chance the skill activates when a user did not specifically intend to invoke browser-based document extraction. Because activation can lead to opening a URL and copying potentially sensitive document contents into the agent workflow, accidental invocation raises privacy and data-handling risk.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The standalone Chinese trigger 腾讯文档 is extremely broad and may fire on general discussion rather than an explicit user request to extract document contents. In this skill's context, accidental activation is more dangerous because the described behavior copies shared spreadsheet data into the agent's processing flow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill description emphasizes convenience but does not clearly warn users that invoking the skill causes an agent-controlled browser to open the provided Tencent Docs URL, select all content, copy it, and potentially expose that data to downstream agent steps or logs. This omission undermines informed consent and can lead to unintended disclosure of shared spreadsheet contents.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
79% confidence
Finding

Referencing installation via npx clawhub install tencent-docs-reader without a pinned version makes the installation supply chain mutable. A future compromised or maliciously updated package could be fetched and executed implicitly, exposing users to unexpected code execution during install.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Reading QQ and WeCom identifiers from the environment equips the skill with messaging-related capabilities unrelated to its declared reader-only role. In this context, those variables are indicators of hidden communication features and increase the chance of unauthorized notification or data disclosure paths.

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 · scripts/check_weekly_report.py (reported line 41)May include surrounding context.

python
"""检查周报填写情况"""
    # 1. 读取文档
    print(f"读取周报文档: {DOC_URL}", file=sys.stderr)
    result = subprocess.run(
        ["python", READ_SCRIPT, "--url", DOC_URL, "--auto-tab", "--output", OUTPUT_FILE],
        capture_output=True,
        text=True,

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

Using an external enterprise messaging webhook is not necessary to fulfill the skill's declared purpose of reading spreadsheet content. This broadens the data-flow surface and can expose employee completion status outside the expected read-only processing path.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script transmits employee reporting status to a webhook without an in-flow warning, confirmation, or consent gate. Even if the endpoint is legitimate, sending personnel/work-compliance information automatically can violate least surprise and internal privacy expectations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

A nominally simple document-reader skill actually drives a local browser-control binary and issues commands like open, click, press, eval, and tab management. That capability is broader than the declared purpose and increases the attack surface, especially because it can interact with the current browser context and clipboard rather than using a narrowly scoped document API.

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 · scripts/read_sheet.py (reported line 35)May include surrounding context.

python
def run(args, timeout=20):
    r = subprocess.run(args, capture_output=True, timeout=timeout)
    out = r.stdout.decode('utf-8', errors='replace')
    err = r.stderr.decode('utf-8', errors='replace')
    return out + err

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises reading spreadsheet text, but it also supports writing retrieved content to an arbitrary local path via --output. This can persist potentially sensitive document contents on disk in locations the user did not expect, increasing exposure through local disclosure, accidental overwrite, or later collection by other processes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The code copies spreadsheet contents to the system clipboard/browser paste flow and may write them to disk without any warning or sensitivity checks. In the context of Tencent Docs, spreadsheets often contain internal business or personal data, so silent local persistence and clipboard handling meaningfully increase the chance of unintended disclosure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

The natural-language instructions and usage guidance are presented only in Chinese, which effectively forces a specific language for users without an explicit opt-in or documented locale constraint. Under the stated policy, language restrictions should either be optional or clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
79% confidence
Finding

This markdown file documents an operation that writes extracted Tencent Docs content to a local file via the --output option, but it does not include any caution about where sensitive document data will be stored or whether existing files may be overwritten. For a skill that extracts document contents, a brief user-facing warning about local data persistence would improve safety disclosure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

Natural-language strings in the docstring, comments, and runtime messages are all Chinese, which effectively forces a specific language for users and operators. The file does not indicate that this language restriction is optional, configurable, or justified as a region-specific tool.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.