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.sh is vulnerable to shell command injection. In the prompt_input and prompt_select functions, the script uses the eval command 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 of scripts/generate_query.sh relies on dynamic execution through eval. 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.sh such 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 eval function.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 15, 2026, 07:35 PM