xiaohongshu-scraper

Fail

Audited by Gen Agent Trust Hub on Jun 17, 2026

Risk Level: HIGHCREDENTIALS_UNSAFEEXTERNAL_DOWNLOADSCOMMAND_EXECUTIONREMOTE_CODE_EXECUTION
Full Analysis
  • [CREDENTIALS_UNSAFE]: The script scripts/legacy/extract_chrome_cookies.py attempts to access sensitive browser data by reading the Chrome cookies database located at ~/Library/Application Support/Google/Chrome/Default/Cookies. It also attempts to retrieve the 'Chrome Safe Storage' encryption key from the macOS Keychain using the security find-generic-password command.
  • [EXTERNAL_DOWNLOADS]: The script scripts/legacy/extract_chrome_cookies.py performs dynamic package installation using subprocess.run(['pip', 'install', 'browser-cookie3']) if the library is missing at runtime.
  • [COMMAND_EXECUTION]: Multiple scripts in the package (xhs_scraper.py, xhs_fetch.py, xhs_fetch_stealth.py, etc.) generate temporary Swift code files (e.g., /tmp/ocr.swift) and execute them via the swift command-line tool to perform OCR tasks. The core scraping logic also relies heavily on subprocess.run to execute external tools like curl, tesseract, and the XHS-Downloader binary.
  • [REMOTE_CODE_EXECUTION]: The service management script scripts/xhs-api-service.sh automatically executes pip install -r requirements.txt when starting the API service, which downloads and installs external dependencies without explicit user confirmation during each start attempt.
  • [PROMPT_INJECTION]: Indirect Prompt Injection Risk. The skill ingests untrusted data from Xiaohongshu notes and interpolates it into Markdown and JSON files without sanitization.
  • Ingestion points: Scraped note titles, descriptions, and comments in scripts/xhs_scraper.py and scripts/legacy/xhs_fetch.py.
  • Boundary markers: None identified; the scraped content is written directly into Markdown headers and body text.
  • Capability inventory: The skill has access to subprocess.run (system commands), shutil.copy2 (file system writes), and requests (network operations).
  • Sanitization: No sanitization or escaping is performed on the scraped text content before it is processed by the agent in future steps.
Recommendations
  • HIGH: Downloads and executes remote code from: http://127.0.0.1:5556 - DO NOT USE without thorough review
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Jun 17, 2026, 01:56 AM