china-law-search
Fail
Audited by Gen Agent Trust Hub on Aug 22, 2026
Risk Level: HIGHREMOTE_CODE_EXECUTIONCOMMAND_EXECUTIONCREDENTIALS_UNSAFEEXTERNAL_DOWNLOADS
Full Analysis
- [REMOTE_CODE_EXECUTION]: The
lib/gov_api.pyscript attempts to install external software at runtime usingnpm install -g @playwright/cliif the binary is missing, followed by execution of the installed package. - [COMMAND_EXECUTION]: The skill makes extensive use of
subprocess.runto execute external commands includingnpm,playwright-cli, andpandoc. These calls are used for environment setup, network traffic interception, and document format conversion. - [DYNAMIC_EXECUTION]: In
lib/gov_api.py, a multi-line Javascript snippet is constructed and passed toplaywright-cli --raw run-code. This allows for the execution of arbitrary Javascript within a browser context to harvest session headers. - [CREDENTIALS_UNSAFE]: The
scripts/law_search.pyfile reads sensitive data from a specific local configuration file at~/.kiro/settings/mcp.json. It extracts fields likeIMA_X_IMA_COOKIEandIMA_X_IMA_BKNand injects them into the process environment variables. - [UNVERIFIABLE_DEPENDENCIES]: The entry script
scripts/law_search.pydynamically modifiessys.pathto include a path pointing to a local GitHub repository (~/github/tencent-ima-copilot-mcp/src) and imports modules from it, which can lead to the execution of unverified code. - [EXTERNAL_DOWNLOADS]: The skill downloads legislative documents and regulation metadata from official government domains (
flk.npc.gov.cnandgov.cn). While these sources are well-known, the process involves downloading HTML content that is subsequently passed to a document converter (pandoc). - [INDIRECT_PROMPT_INJECTION]: The skill ingests large amounts of untrusted text and HTML from external websites and presents it to the agent for processing, which could serve as a vector for indirect instructions.
- Ingestion points: Regulation search results and full-text HTML content fetched in
lib/flk_api.pyandlib/gov_api.py. - Boundary markers: Not present; the content is interpolated directly into the context.
- Capability inventory: The skill possesses file-writing capabilities and command execution via
subprocess. - Sanitization: Only basic removal of highlight tags is performed; no robust sanitization of law content exists before it is processed by the AI.
Recommendations
- HIGH: Downloads and executes remote code from: unknown (check file) - DO NOT USE without thorough review
- AI detected serious security threats
Audit Metadata