Repository navigation
pgvector: a USING (true) policy for the auditor is not a read gap - #19
Merged
xkimopro merged 1 commit intoNov 21, 2026
Merged
Conversation
docs/pgvector.md tells operators to admit the auditor with a row-security policy, but any table where row_security_active() held was reported as partly unread, leaving its classification, integrity and isolation checks inconclusive. The catalog query now also asks pg_policy whether a permissive USING (true) policy reaches the connecting role (directly, by membership, or via PUBLIC) and no restrictive policy narrows it; such a table is read in full and records row_security_admits_all. Anything else is still a gap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
docs/pgvector.mdtells operators to admit the auditor with an RLS policy. But any table whererow_security_active()held was reported as partly unread. As a result, about a dozen checks per table came back inconclusive ("content-read failures").pg_policyfor a permissiveUSING (true)policy that reaches the connecting role, with no restrictive policy narrowing it. The policy can reach the role directly, through membership, or via PUBLIC. Such a table is read in full and recordsrow_security_admits_all.docs/pgvector.md: the RLS trade-off section explains which policy counts.How you verified it
ruff check .: cleanpytest -rswithVECSHIELD_PG_DSNpointing at PostgreSQL 17.12 / pgvector 0.8.7, so the live tests ran instead of skipping. Acrosstests/test_pgvector.py,test_pgvector_unit.py,test_pg_access_hardening.py,test_store_facts_selfhosted.pyandtest_isolation.py: 274 passed, 0 skipped.mainshows on this machine (symlinks,/proc, webhook sockets,test_demo). No new failures.npm test: console unchangedhalfvec, and a least-privilege control.Tests added:
This is one of six independent pgvector PRs, all based on
main(0041576). They merge cleanly with each other in any order.Checklist