From c90989e301025e4442a65d709372b475cefb4545 Mon Sep 17 00:00:00 2001 From: Sam Rose Date: Sun, 26 Apr 2026 21:47:58 -0400 Subject: [PATCH] fix: set pgrst.db_schemas in 0028/0029 tests #160 added a pgrst.db_schemas filter to the function lints to match PostgREST's API exposure scope, but the test SQL didn't set the guc, so the positive cases stopped firing. Mirrors the pattern from test/sql/0023_sensitive_columns_exposed.sql. --- test/expected/0028_anon_security_definer_function_executable.out | 1 + .../0029_authenticated_security_definer_function_executable.out | 1 + test/sql/0028_anon_security_definer_function_executable.sql | 1 + .../0029_authenticated_security_definer_function_executable.sql | 1 + 4 files changed, 4 insertions(+) diff --git a/test/expected/0028_anon_security_definer_function_executable.out b/test/expected/0028_anon_security_definer_function_executable.out index f8bcf136..d9cc4729 100644 --- a/test/expected/0028_anon_security_definer_function_executable.out +++ b/test/expected/0028_anon_security_definer_function_executable.out @@ -1,5 +1,6 @@ begin; set local search_path = ''; + set local pgrst.db_schemas = 'public'; -- BASELINE: empty user-schema, no rows select * from lint."0028_anon_security_definer_function_executable"; name | title | level | facing | categories | description | detail | remediation | metadata | cache_key diff --git a/test/expected/0029_authenticated_security_definer_function_executable.out b/test/expected/0029_authenticated_security_definer_function_executable.out index aeb200a9..7f009934 100644 --- a/test/expected/0029_authenticated_security_definer_function_executable.out +++ b/test/expected/0029_authenticated_security_definer_function_executable.out @@ -1,6 +1,7 @@ NOTICE: identifier "pg_regress/0029_authenticated_security_definer_function_executable" will be truncated to "pg_regress/0029_authenticated_security_definer_function_executa" begin; set local search_path = ''; + set local pgrst.db_schemas = 'public'; -- BASELINE: empty user-schema, no rows select * from lint."0029_authenticated_security_definer_function_executable"; name | title | level | facing | categories | description | detail | remediation | metadata | cache_key diff --git a/test/sql/0028_anon_security_definer_function_executable.sql b/test/sql/0028_anon_security_definer_function_executable.sql index b75673ac..10119188 100644 --- a/test/sql/0028_anon_security_definer_function_executable.sql +++ b/test/sql/0028_anon_security_definer_function_executable.sql @@ -1,5 +1,6 @@ begin; set local search_path = ''; + set local pgrst.db_schemas = 'public'; -- BASELINE: empty user-schema, no rows select * from lint."0028_anon_security_definer_function_executable"; diff --git a/test/sql/0029_authenticated_security_definer_function_executable.sql b/test/sql/0029_authenticated_security_definer_function_executable.sql index cf01b23a..1004bef1 100644 --- a/test/sql/0029_authenticated_security_definer_function_executable.sql +++ b/test/sql/0029_authenticated_security_definer_function_executable.sql @@ -1,5 +1,6 @@ begin; set local search_path = ''; + set local pgrst.db_schemas = 'public'; -- BASELINE: empty user-schema, no rows select * from lint."0029_authenticated_security_definer_function_executable";