pg-query
Pass
Audited by Gen Agent Trust Hub on May 27, 2026
Risk Level: SAFECREDENTIALS_UNSAFECOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [CREDENTIALS_UNSAFE]: The script
scripts/query.jsis designed to read database credentials from sensitive file paths, specifically~/.config/pg-query/credentials(or the Windows equivalent), which is a location outside of the immediate project environment.\n- [COMMAND_EXECUTION]: The skill implements a tool that allows the agent to run any SQL command on a connected PostgreSQL database. This provides the agent with high-privilege access to read, modify, or delete database content depending on the provided credentials.\n- [PROMPT_INJECTION]: The skill exhibits a vulnerability surface for indirect prompt injection as it processes raw SQL input without validation or sanitization.\n - Ingestion points: SQL query strings passed as command-line arguments from the agent to
scripts/query.js.\n - Boundary markers: Absent; there are no delimiters or instructions to ignore embedded commands within the SQL string.\n
- Capability inventory: Full database access (CRUD operations) via the
pglibrary inscripts/query.js.\n - Sanitization: Absent; the script executes the SQL string directly using the
pgclient's query method without any escaping or validation.
Audit Metadata