Back to skill

Security audit

餐厅推荐交叉验证

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a restaurant recommendation scraper as advertised, but it needs Review because it stores authenticated browser sessions, mixes real and simulated recommendations, and uses a broad system-level installer.

Install only if you are comfortable with authenticated scraping of Dianping and Xiaohongshu and with local browser-session files being saved on disk. Use a dedicated low-privilege account, keep the session directory private, prefer a virtual environment over setup.sh, and treat server/mock outputs as demonstrations unless you explicitly run the real Playwright-based path.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T08 · Insecure Dependencies

Warning
Location
setup.sh:29
Finding
Unpinned Dependencies Installed into the System Python Environment<![CDATA[ ## Vulnerability Details **File Location**: `setup.sh:29-38` **Vulnerability Type**: Unsafe and unpinned dependency installation **Risk Level**: Medium ### Vulnerable Code ```bash python3 -m pip install --upgrade pip -q --break-system-packages python3 -m pip install playwright beautifulsoup4 requests pandas numpy thefuzz -q --break-system-packages echo "✅ Python 依赖安装完成" # Install Playwright browsers echo "" echo "3️⃣ 安装 Playwright 浏览器..." echo " 这将下载 Chromium 浏览器(约 170MB)" echo "" python3 -m playwright install chromium --with-deps 2>/dev/null || python3 -m playwright install chromium ``` ### Technical Analysis The setup script installs mutable, unpinned packages directly into the host Python environment. It also upgrades `pip` and uses `--break-system-packages`, which bypasses protections intended to prevent package managers from modifying distribution-managed Python installations. Because no exact versions or package hashes are specified, the artifacts installed at setup time can differ from those reviewed during this audit. A compromised upstream release, dependency account, package index, or transitive dependency could consequently introduce attacker-controlled installation or runtime code. The Playwright installation also downloads a Chromium build. Its `--with-deps` option may invoke the operating system package manager to install additional dependencies, potentially requesting elevated privileges. Installing browser and OS components is materially broader than installing the minimum application dependencies in an isolated environment. This is a supply-chain exposure rather than evidence that any currently named dependency is malicious. ### Attack Path 1. An attacker compromises an upstream package, maintainer account, transitive dependency, package index response, or browser distribution artifact. 2. The attacker publishes a malicious release under a dependency name used by the setup script. 3. A user runs `setup.sh`. 4. The script ...[truncated 1410 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Create and use a project-specific virtual environment instead of modifying the system Python installation: ```bash python3 -m venv .venv . .venv/bin/activate python -m pip install --upgrade pip ``` 2. Remove `--break-system-packages` from all installation commands. 3. Pin every direct and transitive dependency to reviewed versions in a lock file. 4. Generate and enforce cryptographic hashes, for example: ```bash python -m pip install --require-hashes -r requirements.lock ``` 5. Pin the Playwright package and browser revision to tested versions. Verify downloaded artifacts through trusted package sources and available integrity controls. 6. Separate browser and operating system dependency installation from normal skill setup. Clearly disclose that this optional step may require elevated privileges and require explicit user confirmation. 7. Run installation and scraping under a dedicated, unprivileged account or container with access limited to the required project and session directories. 8. Add dependency scanning and update review to the release process. Regenerate the lock file only after reviewing new direct and transitive dependency versions. ]]>
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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (75)

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The document claims the system does not touch sensitive information and does not collect personal information, yet elsewhere states that Playwright persistent context saves cookies, localStorage, and login session state. This contradiction is dangerous because it can mislead users and reviewers into underestimating the sensitivity of the stored data, increasing the chance of unsafe handling or overbroad trust.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding
Based on the code provided, this chunk is a demonstration script rather than the implementation of the described skill. It may call into another module that could perform the declared behavior, but that behavior is not visible here. Since the evaluation is description versus the supplied code chunk, the declared purpose overstates what this code actually does. The script only runs example searches and prints formatted output for two hardcoded scenarios.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding
The declared description is about runtime restaurant data aggregation and analysis across Xiaohongshu and Dianping. The actual code chunk does not perform any restaurant lookup, scraping, rating retrieval, review-count fetching, geographic search, consistency analysis, or confidence scoring. Instead, it is purely a deployment/publishing helper script for ClawHub. This is a materially different primary purpose and introduces undeclared capabilities related to packaging and publication. Therefore, the description does not accurately represent this code chunk.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
There is a clear description-behavior mismatch. The declared purpose promises substantial functional behavior involving external platform cross-checking and recommendation analysis, but the provided code chunk is only module metadata. Even allowing for partial implementation, this chunk does not exhibit any of the claimed capabilities or supporting logic.

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding
The core purpose substantially aligns: the code does cross-reference restaurant data from Xiaohongshu and Dianping and computes consistency/recommendation scores. However, there is a meaningful description-to-behavior mismatch because the implementation relies on real scraping with Playwright and persistent authenticated sessions, including automated login prompting, which is a notable undeclared capability/resource access pattern. The code also searches by both location and cuisine, not just geographic location, and returns richer restaurant metadata than the description states. These are not merely incidental implementation details because authenticated scraping is a significant operational capability not reflected in the declared purpose or permissions.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The overall theme of restaurant cross-checking is aligned, but the implementation materially differs from the declared purpose. The description promises automatic retrieval of real platform data from Xiaohongshu and Dianping, including ratings and review counts, to validate recommendation consistency. In this code chunk, `search_mock` creates synthetic DianpingRestaurant objects and mock Xiaohongshu posts, then scores them locally. The CLI explicitly states it uses mock data and directs users to another script for real data. That makes this code a testing/demo stub rather than the described live cross-referencing capability. The scoring and consistency analysis are related supporting behavior, but the absence of actual fetching/validation from the named platforms is a material mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared purpose is a two-platform validation skill that combines Xiaohongshu and Dianping data to assess restaurant quality and consistency. The supplied code chunk is much narrower: it only defines a Dianping fetcher and even that is explicitly a simplified/mock implementation using hardcoded sample data rather than real scraping. There is no code for Xiaohongshu access, no merging of results from both sources, no validation logic, and no confidence-scoring mechanism. This is a material mismatch in primary behavior and implemented capabilities, not merely an incomplete helper detail.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared purpose describes a dual-platform validation tool that cross-references Xiaohongshu and Dianping to assess restaurant quality and consistency and produce trustworthy recommendations with confidence scores. The supplied code implements only a Dianping scraper. It does not query Xiaohongshu, merge or compare results from two sources, analyze inter-platform consistency, or compute any confidence metric. While fetching ratings and review counts from Dianping aligns partially with the description, the primary advertised behavior—cross-referencing two platforms for validation—is absent. Therefore this is a material description-behavior mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The declared purpose describes a two-platform validation tool that cross-references Xiaohongshu and Dianping restaurant recommendations and produces validated insights based on ratings, review counts, consistency analysis, and confidence scores. The supplied code chunk only covers a single Xiaohongshu-oriented component and explicitly notes that real scraping is not implemented. Its current behavior is to fabricate mock post data, average likes/saves/comments/sentiment, extract top keywords, and return aggregated restaurant entries. That is a materially different and much narrower behavior than the declared end-to-end cross-platform validation system, so this is a clear description-behavior mismatch.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description promises a dual-platform restaurant validation tool that combines Xiaohongshu and Dianping data to assess quality and consistency. The supplied code only performs Xiaohongshu scraping. It gathers search-result note metadata from Xiaohongshu, applies simple heuristics for restaurant detection and sentiment, and aggregates posts. There is no Dianping integration, no cross-referencing logic, no rating/review-count collection as described, and no confidence-score generation. Additionally, the code uses Playwright with persistent session management, which is an access/implementation capability not mentioned in the declared purpose. Overall, the actual behavior is materially narrower and different from the declared functionality.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The code chunk does not perform restaurant recommendation retrieval, cross-platform comparison, rating/review extraction, geographic querying, or confidence-score analysis. Its primary purpose is session persistence and login management for the two platforms using Playwright. While session handling could support a larger scraper, this chunk itself is materially different from the declared skill purpose and introduces undeclared capabilities related to browser automation, login persistence, and local session storage.

Ae1

High
Category
analysis-evasion
Content
See [scripts/requirements.txt](scripts/requirements.txt) for complete list.
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Description-Behavior Mismatch

High
Confidence
99% confidence
Finding
The skill advertises cross-platform validation of restaurant quality, but this code returns fabricated mock Xiaohongshu posts while presenting them as search results. In a recommendation or decision-support workflow, this undermines integrity and can mislead downstream ranking, confidence scoring, and user trust because outputs appear data-backed when they are synthetic.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This markdown file presents all instructions, warnings, and usage guidance exclusively in Chinese. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation unless the locale constraint is clearly documented and justified, which is not present here.

Context-Inappropriate Capability

Medium
Confidence
93% confidence
Finding
The documentation describes persistent login session management and storage of session state for Dianping and Xiaohongshu, which expands the skill from simple recommendation cross-checking into handling authenticated browser data. Persisting cookies, localStorage, and session artifacts creates a sensitive-data exposure risk if the local machine, repository, or session directory is accessed by another process or user.

Intent-Code Divergence

Medium
Confidence
94% confidence
Finding
The documentation advertises a server mode for restaurant queries while explicitly stating it uses simulated data, which conflicts with the skill description claiming automatic retrieval and cross-checking of real cross-platform reviews. This can mislead users or downstream agents into treating fabricated or placeholder outputs as trustworthy recommendations, undermining decision integrity.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The trigger conditions are broad enough to match many ordinary restaurant-related conversations containing a location, food, and recommendation intent. In an agent environment, this can cause unintended automatic invocation, unnecessary data access, or execution of auxiliary tooling without sufficiently explicit user intent.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The guide instructs users to authenticate with an API token directly on the command line but does not warn that shell history, process listings, logs, and screenshots may expose the credential. In a publishing workflow, a leaked token could let an attacker publish, modify, or impersonate the skill owner depending on token scope.

Skill Enumeration

Medium
Category
Agent Snooping
Content
## 📖 参考资料

- **ClawHub 文档**: https://clawhub.com/docs
- **Skill 创建指南**: `/home/ubuntu/.npm-global/lib/node_modules/openclaw/skills/skill-creator/SKILL.md`
- **ClawHub CLI**: `clawhub --help`

---
Confidence
80% confidence
Finding
Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The quickstart instructs users to authenticate to third-party platforms and states that login state will be saved for 1–2 weeks, but it does not explain where that authenticated session data is stored, who can access it, or the risk of account compromise if those files are copied. In a skill that automates scraping with authenticated sessions, silently persisting session state increases the chance that sensitive cookies or tokens are left on disk without adequate protection.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The publishing instructions tell the user to run `clawhub publish .` on the local skill directory without explicitly warning that this uploads the entire referenced skill contents to a remote service. In a skill repository, this can cause accidental disclosure of sensitive local files, embedded secrets, test artifacts, or unpublished content if the directory contents are broader than the author expects.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The README explicitly documents scraping Dianping and Xiaohongshu, including cookie-based authentication for Xiaohongshu, but does not provide concrete guidance for secure handling of cookies, user session data, or privacy-sensitive scraped content. This can lead users to embed live account cookies in code or logs and to collect/store third-party data without adequate safeguards, increasing the risk of credential leakage and privacy violations.

Intent-Code Divergence

Medium
Confidence
93% confidence
Finding
The guide says the skill is integrated and can be directly used for recommendation queries, but later discloses that the server version only returns simulated demo data. In an agent setting, this inconsistency is dangerous because the agent may invoke the skill under the assumption that it provides real validation, misleading users and contaminating outputs with fictitious evidence.

Vague Triggers

Medium
Confidence
94% confidence
Finding
The activation example is broad enough that ordinary restaurant-related conversation could trigger the skill automatically. In a conversational agent, over-broad triggers can cause unintended tool invocation, unnecessary data processing, and insertion of simulated recommendations into normal dialogue without explicit user intent.

Vague Triggers

Medium
Confidence
92% confidence
Finding
The recommended dialogue-based usage encourages automatic invocation but does not define boundaries, exclusions, or disambiguation rules. Because this skill outputs simulated data in the server version, ambiguous triggering is more dangerous than usual: users may receive fabricated recommendations when they were only casually discussing food options.

Static analysis

No suspicious patterns detected.