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
pyexecjslibrary 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 inreferences/troubleshooting.mdconfirms that these assets utilize homoglyph identifiers (e.g., Greek Capital IotaΙnfinityvs LatinInfinity) 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.jsonto 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.shscript executes shell commands to initialize a Python virtual environment and install system dependencies. It also triggersnpmto 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.pyandscripts/fetch_note_texts.pyfetch 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_strfunction is used to sanitize file names using regex, but no general sanitization of ingested text for LLM safety is present.
Audit Metadata