query-expert
Warn
Audited by Gen Agent Trust Hub on Sep 15, 2026
Risk Level: MEDIUMCOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/generate_query.shis vulnerable to shell command injection. In theprompt_inputandprompt_selectfunctions, the script uses theevalcommand to dynamically assign values to variables:eval "$var_name='$input'". Because the input is not sanitized or escaped, a malicious string containing a single quote followed by shell commands can break out of the variable assignment and execute arbitrary code in the shell environment. \n- [DYNAMIC_EXECUTION]: The implementation ofscripts/generate_query.shrelies on dynamic execution througheval. This pattern is used to map user-supplied strings to shell variables at runtime, which is an inherently unsafe practice that facilitates the command execution vulnerability mentioned above. \n- [INDIRECT_PROMPT_INJECTION]: The skill exhibits an attack surface for indirect prompt injection. If the AI agent uses the query generation script to process untrusted data (such as a query requirement or table name provided by a third party), the malicious data could contain a payload designed to exploit the shell injection vulnerability. \n - Ingestion points: Inputs to
scripts/generate_query.shsuch as table names, column names, or conditions, which may be derived from external data. \n - Boundary markers: The script lacks any boundary markers or sanitization logic to handle shell-sensitive characters like single quotes or backticks. \n
- Capability inventory: The skill includes several shell scripts (
analyze_performance.sh,generate_query.sh,optimize_query.sh) that interact with the local shell environment. \n - Sanitization: No input validation or escaping is performed on the data before it is processed by the
evalfunction.
Audit Metadata