Skip to content

Fix false positive non-superuser errors#190

Open
jcoleman wants to merge 3 commits intobucardo:masterfrom
jcoleman:patch-1
Open

Fix false positive non-superuser errors#190
jcoleman wants to merge 3 commits intobucardo:masterfrom
jcoleman:patch-1

Conversation

@jcoleman
Copy link

Regex matching solely against the word "insufficient" means that it's trivial to cause this to alert unnecessarily by merely including the string "insufficient" in one's real query. Instead verify that we don't actually have a real query and know for certain this is an error condition.

jcoleman and others added 3 commits February 2, 2022 20:52
This hasn't worked for quite some time because `pg_stat_activity` columns
`state_change` and `backend_type` are `null` when the user isn't a
superuser.
Regex matching solely against the word "insufficient" means that it's trivial to cause this to alert unnecessarily by merely including the string "insufficient" in one's real query. Instead verify that we don't actually have a real query and know for certain this is an error condition.
@cosgroveb
Copy link

Can we get this merged? This causes false positives with a legitimate query a vendor package runs that includes the word "insufficient" in the WHERE clause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants