FRN121[high]Security
Privileges granted to PUBLIC
Every role, including ones created later, gets a privilege on a table or view.
Why it's risky in PostgreSQL
PUBLIC means every role in the database: application users, read-only reporting roles, and any role added in the future. A grant meant for one service usually belongs to that service's role instead.
What triggers it, and the safer way
GRANT SELECT ON customers TO PUBLIC;GRANT SELECT ON customers TO reporting;Suppress it when you're sure
Put this comment on the line before the statement. The reason is required and shows in the report.
-- fronelta:allow FRN121 <why this is safe here>Applies to PostgreSQL 14, 15, 16, 17.