postgres-best-practices
Pass
Audited by Gen Agent Trust Hub on Apr 20, 2026
Risk Level: SAFE
Full Analysis
- [SAFE]: The skill provides secure coding guidelines for PostgreSQL interactions, explicitly prohibiting the use of f-strings or string concatenation for SQL queries to prevent SQL injection vulnerabilities.- [COMMAND_EXECUTION]: The skill includes boilerplate code for database CRUD operations (retrieve, insert, update, delete). These helpers utilize the
psycopg.sqllibrary to ensure that table names, column names, and data values are safely escaped and handled by the database driver.- [CREDENTIALS_UNSAFE]: The provided_dsn()function demonstrates the correct practice of retrieving database connection details and passwords from environment variables, avoiding the risk of hardcoded credentials in the source code.- [EXTERNAL_DOWNLOADS]: The skill references and recommends standard, reputable Python packages includingpsycopg,pydantic, andshandy-sqlfmtfor database connectivity, data modeling, and SQL formatting.
Audit Metadata