rq-earnings-analysis
Warn
Audited by Gen Agent Trust Hub on Apr 27, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: Potential script injection risk in
SKILL.md. The bash workflow instructions use shell variable interpolation (e.g.,${ORDER_BOOK_ID}) directly into Python heredoc blocks (`python3 - <<PY ... PY`). If these variables are populated with untrusted user input, it allows for arbitrary Python code execution within the agent's environment.
- [COMMAND_EXECUTION]: The
generate_report.pyscript usessubprocess.runto call an external HTML renderer (rq-report-renderer). While it usesshutil.whichto find the binary, it executes commands based on user-supplied output paths, which could be exploited if inputs are not strictly validated. - [EXTERNAL_DOWNLOADS]: The
extract_announcements.pyscript fetches PDF files from the Shanghai Stock Exchange (static.sse.com.cn). It includes specialized logic to solve anti-bot challenges for this legitimate financial source, which is functional rather than malicious. - [PROMPT_INJECTION]: Indirect prompt injection surface detected. 1. Ingestion points: External web search results (
web_search_findings.json) and PDF text extracted from announcements. 2. Boundary markers: No explicit delimiters or boundary markers are used in the report templates to isolate processed external text. 3. Capability inventory: Use ofsubprocess.runin the reporting pipeline. 4. Sanitization: Thegenerate_report.pyscript performs basic character normalization and truncation vianormalize_textandcompact_textfunctions. - [SAFE]: The obfuscation detection for the large hex-encoded blob in
extract_announcements.pyis a false positive. The data is a static index list used by a cookie-calculation algorithm to bypass anti-bot mechanisms on the official Shanghai Stock Exchange website.
Audit Metadata