npm [email protected] auto-exposes new public tables again when [api].auto_expose_new_tables is unset (regression of v2.106.0)
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 56/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- postgresql, typescript
Hướng nghiên cứu
Read apps/cli/src/command-internal/db-bootstrap/db-setup.ts and packages/config/src/api.ts, then compare their defaults with apps/cli-go/internal/db/start/start.go and ApplyApiPrivileges. Trace the sequence revoke logic in both implementations as well. Done means an unset key matches the Go behavior, the config description reflects that default, and revoking sequence privileges removes the reported update grant.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
v2.106.0 made an unset [api].auto_expose_new_tables resolve to false, "matching the new hosted-project default":
local start and reset revoke the default Data API privileges. At v2.121.0 the Go implementation still does this
(apps/cli-go/internal/db/start/start.go, ApplyApiPrivileges: "unset (default): revoke").
The CLI that npm [email protected] installs does the opposite. In
apps/cli/src/command-internal/db-bootstrap/db-setup.ts, applyApiPrivileges starts with
if (Option.getOrElse(autoExposeNewTables, () => true)) return;
so an unset key keeps the image's legacy grants. Its doc comment ("unset and true are both a no-op") and the config
schema (packages/config/src/api.ts: "When unset, new entities are auto-exposed, matching the cloud default.")
describe the default from before v2.106.0. Changelog 45329 says the hosted default flipped on 2026-05-30.
What we measured (npm [email protected], darwin-arm64, postgres 17.11.0.004): with the key unset, supabase db reset left anon and authenticated DELETE, INSERT, SELECT and UPDATE on all 91 public tables and views our
migrations create; with auto_expose_new_tables = false they had none.
Minimal repro, with a config.toml that leaves the key unset:
npm i -D [email protected]
npx supabase init
mkdir -p supabase/migrations
echo 'create table public.t (id int);' > supabase/migrations/0001_t.sql
npx supabase start
docker exec supabase_db_<project_id> psql -U postgres -Atc \
"select has_table_privilege('anon', 'public.t', 'INSERT')"
Per the v2.106.0 notes this should print f. The code path above leaves the grant in place, as it did for every
table in our project, so 2.121 prints t.
Impact: a local database built by 2.121 is laxer than a hosted project created with the default since
2026-05-30, and than every project from 2026-10-30. Code that reads or writes a table without an explicit GRANT
works locally and fails with permission denied once deployed. A schema reviewed against the local grants also
passes review with tables open to the anon key that the author never granted.
Also, in both implementations: the revoke takes usage, select on sequences but leaves update. After it,
pg_default_acl for postgres in public still reads {postgres=rwU, anon=w, authenticated=w, service_role=w} for
sequences, so a new sequence still lets those roles call nextval and setval.
Ask:
- Make the npm CLI resolve an unset
auto_expose_new_tablestofalse, as v2.106.0 and the Go path do, and update
the schema description. - Revoke
allon sequences, notusage, select.
- Ngôn ngữ chính
- TypeScript
- Star
- 2.4k
- Fork
- 537
- Merge trung bình
- 19 giờ 40 phút
- Pull request đã merge (30 ngày)
- 403
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của supabase/cli
-
stack: the gateway sets no X-Forwarded-For or X-Real-IP, so Edge Functions cannot see the client IPĐang mở🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
config push: changing auth.oauth_server.authorization_url_path fails with 400 (enabled and path must be sent together)Có thể đã có người làm @itz-puneet đã nhận 5 ngày trước. Đang mở🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
supabase/cli#7087 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
db schema declarative sync: no way to fail (non-zero exit) when the generated migration is destructiveCó thể làm lại được Pull request cho issue này đã bị đóng mà không được merge. Đang mở✨ Feature supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
Maintainer thường phản hồi trong vòng 1 ngày
-
📘 Docs supabase/cli
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
supabase/cli#6974 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Migration error caret is missing or misplaced when the statement contains multibyte charactersĐang mở🐛 Bug supabase/cli
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
level/task type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
wazuh/wazuh-dashboard-plugins#9508 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Testnet EOL page links Zonescan mainnetCó thể đã có người làm @napelvs đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Azure-Samples/azure-search-openai-demo#3249 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Docs] docs/architecture.mermaid leaves out 21 of the 51 src/ directoriesCó thể đã có người làm @uyg7x đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement status:needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
dongdongbh/Mindwtr#1438 ·
Maintainer thường phản hồi trong vòng 1 ngày