Back to skill

Security audit

全网作品数据抓取分析工具(抖音小红书视频号快手B站通用)

Security checks for vulnerabilities and agentic risk

Overview

This skill mostly matches a social-media scraping tool, but it adds under-disclosed donation prompts, persistent local state, browser/server side effects, and insecure Feishu credential handling.

Review this carefully before installing. Only use it in an environment where social-media scraping is allowed, avoid enabling Feishu sync unless you are comfortable storing credentials locally in plaintext, and expect that repeated use can open a donation page and store local usage state. Prefer a sandboxed Python environment and narrowly scoped Feishu credentials if you proceed.

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

other

Warning
Location
scraper.py:1071
Finding

Unsolicited Recurring Donation Prompt in the Core Scraping Path

Content
View full analysis
= _FIRST_PROMPT_AFTER: return True if last_prompt > 0 and (use_count - last_prompt) >= _RE_PROMPT_INTERVAL: return True ``` ```python server = HTTPServer(("127.0.0.1", port), _AppreciationHandler) server_thread = threading.Thread(target=server.serve_forever, daemon=True) server_thread.start() html_content = _generate_html(port) tmp_fd, tmp_path = tempfile.mkstemp( suffix=".html", prefix="appreciation_" ) with os.fdopen(tmp_fd, "w", encoding="utf-8") as f: f.write(html_content) webbrowser.open("file://" + tmp_path) response_event.wait(timeout=_SERVER_TIMEOUT) ``` ### Technical Analysis Every call to `scrape_post()` invokes the appreciation module and increments persistent usage state. Once the configured threshold is reached, the code opens a donation page in the system browser. If the user dismisses the prompt, it is displayed again after a further interval. Displaying a donation prompt, launching the default browser, writing a temporary HTML file, and binding a localhost HTTP server are not necessary to scrape public social-media statistics. These actions therefore exceed the minimum privileges and side effects required by the declared functionality. The server is restricted to `127.0.0.1`, which prevents direct remote access in ordinary network configurations, but it still creates an unnecessary local listening service for up to 120 seconds. The HTTP endpo ...[truncated 1408 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
feishu_sync.py:51
Finding

Feishu Application Secret and Base Token Stored in Plaintext

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
feishu_sync.py:303
Finding

Feishu Token and Scraped Records Exposed Through Process Arguments

Content
View full analysis
bool: cmd = [ "lark-cli", "base", "+record-batch-create", "--base-token", base_token ] if table_id: cmd.extend(["--table-id", table_id]) cmd.extend([ "--json", json.dumps( {"records": [{"fields": record}]}, ensure_ascii=False ) ]) result = subprocess.run( cmd, capture_output=True, text=True, timeout=30 ) ``` ### Technical Analysis The subprocess invocation safely uses an argument list rather than a shell string, so the reviewed code does not expose a conventional shell-command injection vulnerability. However, both the Feishu Base Token and the complete scraped record are placed in the child process argument vector. Depending on the operating system and host configuration, process arguments may be visible through: - Process inspection tools and `/proc`. - Endpoint detection and response products. - Process accounting and audit logs. - Container or orchestration telemetry. - Crash reports and debugging tools. The JSON record can contain post URLs, author names, titles, publication times, scrape timestamps, and engagement statistics. ### Attack Path 1. Feishu synchronization is enabled in CLI mode. 2. A social-media scrape completes successfully. 3. `_push_via_cli()` creates a command containing `--base-token` and the full record JSON. 4. The `lark-cli` subprocess starts. 5. A local observer or monitoring system records the process command line while it exists. 6. The observer obtains the Base Token and scraped record data. 7. The token may be reused with suitable Feishu authentication, while the re ...[truncated 581 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scraper.py:342
Finding

Insufficient Host Validation Permits SSRF-Like Outbound Requests

Content
View full analysis
str: url_lower = url.lower() domain = urllib.parse.urlparse(url_lower).hostname or "" for short_domain, platform in SHORT_URL_DOMAINS.items(): if short_domain in domain: return platform for platform, keywords in PLATFORM_KEYWORDS.items(): if any(kw in url_lower for kw in keywords): return platform return "unknown" ``` ```python def resolve_short_url(url: str) -> str: url = _clean_share_url(url) for method in ['head', 'get']: try: if HAS_CURL_CFFI: resp = ( curl_requests.head( url, headers=PC_HEADERS, impersonate="chrome131", allow_redirects=True, timeout=10 ) if method == 'head' else curl_requests.get( url, headers=PC_HEADERS, impersonate="chrome131", allow_redirects=True, timeout=10 ) ) elif HAS_REQUESTS: kwargs = { "headers": PC_HEADERS, "allow_redirects": True, "timeout": 10 } if method == 'head': resp = requests.head(url, **kwargs) else: kwargs["stream"] = True resp = requests.get(url, **kwargs) ``` ```python def _xhs_meta(url: str) -> ScrapeResult: r = ScrapeResult( platform ...[truncated 3050 chars]
Remediation
View remediation
bool: host = host.rstrip(".").lower() allowed = allowed.rstrip(".").lower() return host == allowed or host.endswith("." + allowed) ``` 3. Reject URLs containing usernames, malformed ports, unsupported schemes, or ambiguous encodings. 4. Permit only `https` unless a documented platform endpoint requires otherwise. 5. Resolve all destination addresses before connecting and reject loopback, private, link-local, multicast, reserved, unspecified, and metadata ranges. 6. Disable automatic redirects or validate every redirect target using the same policy. 7. Apply a strict redirect limit. 8. Protect against DNS rebinding by connecting only to validated resolved addresses and verifying the destination throughout the request. 9. Maintain a small exact allowlist for each platform instead of general substring keywords. 10. Add tests for malicious hosts, redirect chains, IPv4 and IPv6 literals, mixed encodings, trailing dots, and private-address destinations. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:124
Finding

Unpinned Third-Party Dependency Installation Instructions

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • System Prompt LeakageDirect Leakage, Indirect Extraction, Tool-Based Exfiltration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (36)

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
99% confidence
Finding

The analysis indicates undeclared donation/appreciation functionality and overstated claims around full WeChat Channels scraping capability. Overpromising technical capability and hiding unrelated modules reduces user trust and can lead to risky execution paths such as browser automation or off-platform interactions users did not expect.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The analysis indicates undeclared donation/appreciation functionality and overstated claims around full WeChat Channels scraping capability. Overpromising technical capability and hiding unrelated modules reduces user trust and can lead to risky execution paths such as browser automation or off-platform interactions users did not expect.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The analysis indicates undeclared donation/appreciation functionality and overstated claims around full WeChat Channels scraping capability. Overpromising technical capability and hiding unrelated modules reduces user trust and can lead to risky execution paths such as browser automation or off-platform interactions users did not expect.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The analysis indicates undeclared donation/appreciation functionality and overstated claims around full WeChat Channels scraping capability. Overpromising technical capability and hiding unrelated modules reduces user trust and can lead to risky execution paths such as browser automation or off-platform interactions users did not expect.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger phrases are broad enough to match many generic data-related requests, causing the skill to activate outside its intended scope. Over-broad activation is risky because it can unexpectedly steer conversations into scraping, browser automation, network actions, or external sync workflows without sufficiently specific user intent.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The auto-activation rule is ambiguous because it triggers on common keywords without clear boundaries or confirmation. In agent settings, ambiguous invocation can lead to unintended use of network, browser, or storage capabilities on unrelated user prompts.

Content

No source excerpt is available for this finding.

Ssd 3

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill solicits user-provided credentials/secrets and sets up persistent automatic synchronization of scraped data to an external table. This is dangerous because it combines secret handling, outbound data transfer, and persistence, increasing the risk of credential exposure, unauthorized sharing, and silent ongoing exfiltration of collected data.

Content

No source excerpt is available for this finding.

Direct Prompt Extraction

High
Category
System Prompt Leakage
Confidence
85% confidence
Finding

Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.

Content

Scanner excerpt · appreciation.py (reported line 1999)May include surrounding context.

python
# ---------------------------------------------------------------------------
# Show prompt function
# ---------------------------------------------------------------------------

def show_appreciation_prompt():

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
99% confidence
Finding

The code starts a localhost HTTP server and automatically opens the user's browser to a donation page during normal operation. Even though it binds to 127.0.0.1, launching services and browser windows without clear need or consent expands the attack surface, creates intrusive side effects, and can be abused by other local processes to interact with the temporary endpoint and influence state.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill demonstrates file I/O, shell/package installation, and network access but does not declare any explicit tool scope or permissions boundaries. In an agent environment, this increases the chance of over-privileged execution and makes it harder to enforce least privilege or review what the skill is allowed to do.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

Natural-language instructions, triggers, and user-facing guidance are exclusively in Chinese, and the file does not indicate that the skill is region-specific or provide any opt-in or alternative language behavior. If organizational policy requires avoiding forced language selection without user choice, this constitutes a language/locale policy issue.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill explicitly references anti-detection techniques such as simulated browser TLS fingerprints and browser automation fallback to evade platform protections. Even if intended for scraping reliability, bypass-oriented techniques materially increase compliance, detection-evasion, and abuse risk beyond ordinary data analysis.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
83% confidence
Finding

The skill instructs users to configure third-party Feishu credentials and enables remote record creation, which extends the skill from local scraping into external data exfiltration/storage. Without strong disclosure and constraints, this creates privacy and data-governance risk, especially if scraped content includes sensitive or regulated information.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill asks users to provide Feishu App Secret and enables automatic sync to an external service without a clear privacy, retention, or transmission warning. Requesting secrets in conversational flow and then auto-sending scraped data can expose both user credentials and collected content to unintended parties.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The generated HTML explicitly sets lang="zh-CN" and all user-facing text in the appreciation page is written in Chinese. This forces a specific language/locale experience without offering the user a choice or documenting that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

This file implements a donation/tipping workflow that is unrelated to the advertised scraping and analysis capability of the skill. Hidden monetization behavior in a utility skill violates least surprise and creates trust and consent issues, especially because it adds side effects not disclosed in the manifest.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The browser launch and local server are triggered automatically after usage thresholds with no user-facing warning or consent. In the context of a scraping tool, this is deceptive and can surprise users, interfere with automated environments, and normalize unsafe side effects from a utility component.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The code persists app_secret and related configuration in plaintext under ~/.social_media_scraper/feishu_config.json without setting restrictive file permissions or warning the user that credentials are stored locally. On multi-user systems or compromised accounts, these secrets could be recovered and used to access or abuse the associated Feishu application.

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 · feishu_sync.py (reported line 310)May include surrounding context.

python
cmd.extend(["--table-id", table_id])
    cmd.extend(["--json", json.dumps({"records": [{"fields": record}]}, ensure_ascii=False)])

    result = subprocess.run(cmd, capture_output=True, text=True, timeout=30)
    if result.returncode == 0:
        print("✅ 数据已同步到飞书多维表格")
        return True

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

Once enabled, scraped data is automatically transmitted to Feishu without a per-sync disclosure or a clear runtime confirmation that specific records are leaving the local tool. In a scraping tool handling links, authors, timestamps, and engagement data, silent outbound syncing can create privacy, compliance, or unexpected data-sharing risks, especially if users do not realize auto-push remains active.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · feishu_sync.py (reported line 335)May include surrounding context.

python
# 1. 获取 tenant_access_token
    token_url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"
    resp = requests.post(token_url, json={"app_id": app_id, "app_secret": app_secret}, timeout=10)
    token_data = resp.json()
    if token_data.get("code") != 0:
        print(f"⚠️ 获取飞书token失败: {token_data}")

Tainted flow: 'app_id' from input (line 221, user input) → requests.post (network output)

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 · feishu_sync.py (reported line 335)May include surrounding context.

python
# 1. 获取 tenant_access_token
    token_url = "https://open.feishu.cn/open-apis/auth/v3/tenant_access_token/internal"
    resp = requests.post(token_url, json={"app_id": app_id, "app_secret": app_secret}, timeout=10)
    token_data = resp.json()
    if token_data.get("code") != 0:
        print(f"⚠️ 获取飞书token失败: {token_data}")

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · feishu_sync.py (reported line 353)May include surrounding context.

python
api_url = f"https://open.feishu.cn/open-apis/bitable/v1/apps/{base_token}/tables/{tbl_id}/records"
    payload = {"fields": record}

    resp = requests.post(api_url, headers=headers, json=payload, timeout=10)
    data = resp.json()
    if data.get("code") == 0:
        print("✅ 数据已同步到飞书多维表格")

Tainted flow: 'api_url' from input (line 350, user input) → requests.post (network output)

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 · feishu_sync.py (reported line 353)May include surrounding context.

python
api_url = f"https://open.feishu.cn/open-apis/bitable/v1/apps/{base_token}/tables/{tbl_id}/records"
    payload = {"fields": record}

    resp = requests.post(api_url, headers=headers, json=payload, timeout=10)
    data = resp.json()
    if data.get("code") == 0:
        print("✅ 数据已同步到飞书多维表格")