sql-query-optimizer

Warn

Audited by Gen Agent Trust Hub on Sep 14, 2026

Risk Level: MEDIUMINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTIONPRIVILEGE_ESCALATION
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The skill is designed to ingest and analyze SQL queries provided by users. The benchmarking utility in scripts/benchmark-queries.ts executes these queries using prisma.$queryRaw. If the agent interpolates untrusted user queries into these execution contexts without rigorous validation, it creates a SQL injection attack surface.
  • Ingestion points: User-provided SQL queries are processed for analysis and benchmarking.
  • Boundary markers: None present to distinguish instructions from query data.
  • Capability inventory: Uses prisma.$queryRaw and prisma.$executeRaw to run commands against the connected database.
  • Sanitization: No sanitization or parameterization logic is present in the provided scripts.
  • [COMMAND_EXECUTION]: The skill includes functionality in scripts/detect-slow-queries.ts that executes raw SQL commands to interact with database internals and configuration tables (pg_stat_statements).
  • [PRIVILEGE_ESCALATION]: The skill attempts to modify database-level configuration settings using the ALTER DATABASE command to set log_min_duration_statement. Performing these actions requires high-level database permissions (superuser or owner), which exceeds the typical scope of query optimization analysis.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 14, 2026, 06:14 PM
Security Audit — agent-trust-hub — sql-query-optimizer