optimize-postgres-query
Pass
Audited by Gen Agent Trust Hub on Nov 27, 2026
Risk Level: SAFECOMMAND_EXECUTIONDATA_EXFILTRATIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The skill instructs the agent to execute PostgreSQL commands like
EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT)and shell commands such asgrepto analyze query performance and locate code. - [DATA_EXFILTRATION]: The skill requires reading 'real parameters' (such as IDs, slugs, and date ranges) from production-sized databases to exercise slow query paths. This constitutes data exposure necessary for its optimization purpose.
- [DYNAMIC_EXECUTION]: The skill includes instructions to generate and execute integration tests (e.g., in TypeScript) to compare results and performance between old and new query versions.
- [INDIRECT_PROMPT_INJECTION]: The skill has an attack surface for indirect injection as it processes untrusted SQL queries and code snippets from users and database outputs.
- Ingestion points: User-provided SQL descriptions,
pg_stat_statementsrows, andEXPLAINplans (SKILL.md). - Boundary markers: Not explicitly defined for separating instructions from data during processing.
- Capability inventory: Database command execution (
EXPLAIN ANALYZE) and codebase search (grep). - Sanitization: No specific escaping or validation steps are defined for the ingested query components.
Audit Metadata