pg.ddx.io  pgaudit/pgaudit GitHub issues and pull requests  
help / color / mirror / Atom feed
From: fabiobaiao (@fabiobaiao) <noreply+fabiobaiao@github.com>
To: pgaudit/pgaudit <noreply+pgaudit-pgaudit@github.com>
Subject: [pgaudit/pgaudit] issue #205: `INSERT` with `RETURNING` emits a log over a column that's not being selected
Date: Tue, 28 Feb 2023 17:31:42 +0000
Message-ID: <gh-pgaudit-pgaudit-205@github.com> (raw)

An 

```sql
INSERT INTO "table"("col1", "col2") VALUES ('foo', 'bar') RETURNING "col1";
```
with a 

```sql
GRANT SELECT("col2") on TABLE "table" TO "auditor";
```

emits an audit log.

It seems that the `insertedCols` are being checked against both the `INSERT` and `SELECT` grants, whilst I guess it should be checking the latter grant against the `selectedCols`.

view thread (6+ messages)  latest in thread

Message-ID: <gh-pgaudit-pgaudit-205@github.com>
Permalink:  ../gh-pgaudit-pgaudit-205@github.com/

 · 


This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox