#067Technical4 min
Check a PostgreSQL database’s security
Prepare a read-only PostgreSQL connection and understand checks on roles, table grants, row protection and server settings.
Hackaiz team · updated 21/11/2026

01Know what the PostgreSQL check observes
The live PostgreSQL audit examines system catalogs: the database’s descriptions of tables, roles, permissions, extensions and settings. It opens one connection and uses read-only queries rather than retrieving rows from your business tables. This makes it useful for reviewing the database’s security configuration, not for proving that every application workflow enforces the right customer boundary.
Prepare the exact server and database you intend to review. A development database with test roles may have a very different permission structure from production. Record which environment you selected so that a finding on a table or role is assigned to the right owner. The result also includes the server version; keep that context when discussing the report with your database administrator.
02Save an authorized PostgreSQL connection
In the database selection dialog, find “Live Postgres and MySQL” and choose “PostgreSQL”. The address format shown in the interface starts with postgres:// and includes a username, password, host, port and database name. Use a dedicated read-only account created for the check. Do not use a superuser simply because it can see every catalog.
The address is encrypted when saved and is never shown back to you. If the host is on a private network, the interface explains that Hackaiz cannot reach it. An unreachable server and refused credentials are separate connection problems; neither is a clean security result. Do not expose a private production database broadly just to complete a check.
- 1Enter the address for the intended PostgreSQL environment.
- 2Accept “I own this database and allow Hackaiz to check it.” and click “Save”.
- 3Use “Select” to include the saved connection in the analysis flow; in the direct-check view, the run button is “Check my database”.
03Understand the specific PostgreSQL signals
The row-protection check is narrower than “every table without RLS is unsafe”. RLS means row-level security. This check looks for ordinary tables with RLS disabled that grant SELECT to a named non-owner role. Review whether that role should read the whole table. A separate check looks for privileges granted to PUBLIC on tables and views. Another examines privileged SECURITY DEFINER functions executable by PUBLIC, because a caller may then use permissions belonging to the function owner.
Account checks look for superuser roles that can log in and login roles without a stored password. The audit also queries authentication rules using trust or ident, and extensions with filesystem or network capabilities, including dblink and file_fdw. These are reasons to review the deployment context with its administrator, not instructions to delete a required extension immediately.
The server-setting checks include ssl set to off and log_statement set to all. The former identifies a server encryption setting; its absence is not a complete test of every client’s encryption requirements. Logging every statement can expose values in logs, so consider who can read those logs as well as why detailed logging was enabled.
04Handle incomplete checks and approved changes
Some PostgreSQL catalogs require privileges that a dedicated audit role may not have. In particular, password metadata and authentication rules can be restricted. The result lists checks not run when their queries fail. Treat those as unanswered questions and ask an authorized administrator to review them through an appropriate process, rather than escalating the audit account to superuser.
Use the object name, explanation and report level, Danger, To fix or To watch, to plan the next action. Have the database owner test permission or authentication changes before applying them. Hackaiz does not alter the connected database. Where a code fix is proposed through GitHub, it is a draft pull request for human review and approval, never an automatic merge. Database checks consume credits. After a deliberate correction, a new run can provide updated evidence for the checks that actually execute.
Frequently asked questions
Take the next step
Was this article helpful?