xhs-search-workflow

Warn

Audited by Gen Agent Trust Hub on Sep 24, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONPERSISTENCEOBFUSCATIONEXTERNAL_DOWNLOADSINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
  • [DYNAMIC_EXECUTION]: The skill uses the pyexecjs library to compile and execute local Javascript files at runtime (e.g., xhs_xray.js, xhs_xs_xsc_56.js). This is used to compute critical API headers (x-s, x-t) necessary for communication with Xiaohongshu servers.
  • Evidence found in scripts/xhs_client.py: _JS_XS = _compile_with_cwd(JS_DIR / 'xhs_xs_xsc_56.js') and _JS_XRAY = _compile_with_cwd(JS_DIR / 'xhs_xray.js').
  • [OBFUSCATION]: The bundled Javascript assets, such as xhs_xray.js, are minified and complex, making their behavior difficult to verify. Additionally, documentation in references/troubleshooting.md confirms that these assets utilize homoglyph identifiers (e.g., Greek Capital Iota Ιnfinity vs Latin Infinity) to impede analysis and execution in standard environments.
  • [PERSISTENCE]: The skill implements a persistence mechanism for authentication state. It saves session cookies to ~/.xhs-search-workflow/cookies.json to allow session reuse across different script executions and agent sessions.
  • Evidence found in scripts/xhs_auth.py: COOKIE_FILE = CONFIG_DIR / 'cookies.json'.
  • [COMMAND_EXECUTION]: The scripts/setup_env.sh script executes shell commands to initialize a Python virtual environment and install system dependencies. It also triggers npm to install Javascript packages.
  • [EXTERNAL_DOWNLOADS]: The environment setup process downloads and installs multiple Python and Node.js packages from public registries (PyPI and NPM). While these are standard services, the dependencies are required for the skill's core signature and extraction functions.
  • [INDIRECT_PROMPT_INJECTION]: The skill acts as a data ingestion surface by fetching search results, user profiles, and note content (titles, descriptions, comments) from Xiaohongshu. This content is then presented to the agent, creating a path for potential indirect prompt injection if the external data contains instructions meant to influence agent behavior.
  • Ingestion Points: scripts/search_notes.py and scripts/fetch_note_texts.py fetch note titles and descriptions.
  • Capabilities: The skill has network access, file system write access (Excel/media), and the ability to execute code via execjs.
  • Sanitization: A norm_str function is used to sanitize file names using regex, but no general sanitization of ingested text for LLM safety is present.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 24, 2026, 06:33 AM