mirror of
https://github.com/supabase/supabase.git
synced 2026-12-06 08:29:01 +00:00
bot/decrease-eslint-ratchet-baselines
9
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
88ca61270f |
docs: clarify that the supabase stack commands predate CLI v3 (#52667)
## What kind of change does this PR introduce? Docs fix. ## What is the current behavior? The [Try the experimental `supabase stack` commands](https://supabase.com/docs/guides/local-development/cli/migrating-to-v3#try-the-experimental-supabase-stack-commands) section of the v3 migration guide opens with "v3 includes the experimental `supabase stack` commands". On a page listing v2 to v3 changes, that reads as if the stack commands are new in v3. They were already available in v2 and are still experimental. ## What is the new behavior? The opening paragraph now says the commands were available in v2, that v3 keeps improving them, and that they are still experimental. It also links to the Running multiple local projects guide. The rest of the section is unchanged. Linear: [CLI-2918](https://linear.app/supabase/issue/CLI-2918) ## Additional context The section stays on the page on purpose, to raise visibility of the stack commands for people reading the migration guide. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
dc3cbeffe8 |
fix: remove anon read access to interfaces_feedback (#52534)
## Problem The CLI (supabase/cli#5988) and MCP server (supabase/mcp#474) only submit and delete feedback. Neither reads it back. But `anon` can still read a row's feedback text with its delete token, so a leaked token exposes the submission. Linear: [CLI-2406](https://linear.app/supabase/issue/CLI-2406) ## Solution New migration on `public.interfaces_feedback`: - Revoke all privileges from `anon` and `authenticated`, then grant `anon` only `delete` and `select (delete_token)`. - Rename the select policy to "Token holders can match their own feedback for deletion". - Update the `delete_token` column comment to say it authorizes deletes only. Key choices: - **The select policy and `select (delete_token)` stay.** Clients delete with a `delete_token=eq.<token>` filter. A filtered delete needs select on the filtered column and must pass the select policy. Tested locally: revoking the grant makes deletes fail with `42501`, and dropping the policy makes them silently match 0 rows. - **Privileges are reset, not revoked column by column.** Default grants differ between Postgres images. On the current local image, `anon` gets every table privilege by default, which overrides column-level grants. Starting from `revoke all` gives the same end state everywhere. No client changes are needed. The delete policy and `submit_interfaces_feedback` are unchanged. ## Review instructions Run these against a local stack (`supabase db reset`) or this PR's preview branch. Replace the placeholders: - `<PROJECT_URL>`: for example `http://127.0.0.1:54321` - `<ANON_KEY>`: the project's anon key - `<DELETE_TOKEN>`: the token returned in step 1 or 5 1. Submit feedback. The response is the delete token. ```bash curl -X POST '<PROJECT_URL>/rest/v1/rpc/submit_interfaces_feedback' \ -H 'apikey: <ANON_KEY>' \ -H 'Content-Type: application/json' \ -d '{"feedback": "test"}' ``` 2. Try to read the feedback with the token. Expect `401` with code `42501`. ```bash curl '<PROJECT_URL>/rest/v1/interfaces_feedback?select=feedback&delete_token=eq.<DELETE_TOKEN>' \ -H 'apikey: <ANON_KEY>' \ -H 'x-feedback-token: <DELETE_TOKEN>' ``` Only `select=delete_token` succeeds. Every other column returns `42501`. 3. Delete without the token header. Expect `Content-Range: */0`. ```bash curl -i -X DELETE '<PROJECT_URL>/rest/v1/interfaces_feedback?delete_token=eq.<DELETE_TOKEN>' \ -H 'apikey: <ANON_KEY>' \ -H 'Prefer: count=exact' ``` 4. Delete with the token header. Expect `Content-Range: */1`. ```bash curl -i -X DELETE '<PROJECT_URL>/rest/v1/interfaces_feedback?delete_token=eq.<DELETE_TOKEN>' \ -H 'apikey: <ANON_KEY>' \ -H 'Prefer: count=exact' \ -H 'x-feedback-token: <DELETE_TOKEN>' ``` 5. Submit feedback with a project ref and user ID. ```bash curl -X POST '<PROJECT_URL>/rest/v1/rpc/submit_interfaces_feedback' \ -H 'apikey: <ANON_KEY>' \ -H 'Content-Type: application/json' \ -d '{"feedback": "test", "project_ref": "my-project", "user_id": "my-user"}' ``` 6. Delete with only the token header. Expect `Content-Range: */0`. ```bash curl -i -X DELETE '<PROJECT_URL>/rest/v1/interfaces_feedback?delete_token=eq.<DELETE_TOKEN>' \ -H 'apikey: <ANON_KEY>' \ -H 'Prefer: count=exact' \ -H 'x-feedback-token: <DELETE_TOKEN>' ``` 7. Delete with all three headers. Expect `Content-Range: */1`. ```bash curl -i -X DELETE '<PROJECT_URL>/rest/v1/interfaces_feedback?delete_token=eq.<DELETE_TOKEN>' \ -H 'apikey: <ANON_KEY>' \ -H 'Prefer: count=exact' \ -H 'x-feedback-token: <DELETE_TOKEN>' \ -H 'x-feedback-project-ref: my-project' \ -H 'x-feedback-user-id: my-user' ``` 8. Optional: run `supabase feedback add` and `supabase feedback delete` against this PR's preview branch. Both succeed (already confirmed). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
9c67468326 |
docs: update terraform docs pinned version (#50233)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? There have been [many updates](https://github.com/supabase/terraform-provider-supabase/compare/v1.1.3...v1.11.0) to our terraform provider since the docs were last updated. This PR updates the pinned version of [our terraform docs](https://supabase.com/docs/guides/deployment/terraform) to the latest version. ## What is the current behavior? [Outdated terraform docs](https://supabase.com/docs/guides/deployment/terraform) ## What is the new behavior? [Updated terraform docs](https://docs-git-kanad-2026-09-10-bump-terraform-docs-version-supabase.vercel.app/docs/guides/deployment/terraform) ## Additional context n/a <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated Terraform documentation content to use provider version `v1.11.0`. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
1b01a9c8af |
feat: table for collecting interfaces feedback (#48420)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Database migration — adds a table for collecting free-form product feedback submitted from Supabase interfaces (starting with the CLI and the MCP server), including support for deleting a submission via a server-issued token. ## What is the current behavior? There is no destination for feedback submitted from the CLI or MCP server. The existing `feedback` and `feedback_comments` tables are scoped to the docs feedback widget, so interface feedback would otherwise end up as ad-hoc GitHub issues — with no way to revoke something submitted by accident (e.g. a secret key pasted into the message). ## What is the new behavior? Adds `public.interfaces_feedback`: | Column | Type | Notes | | --- | --- | --- | | `id` | `bigint` identity | primary key (not exposed through the API) | | `created_at` | `timestamptz` | `not null default now()` | | `feedback` | `text` | `not null`, ≤ 1000 chars — the free-form feedback | | `delete_token` | `uuid` | server-generated, `unique not null`; authorizes deleting the row | | `user_agent` | `text` | ≤ 255 chars; interface + version, also identifies the source interface | | `user_id` | `text` | optional, ≤ 255 chars; unverified, interface-defined identifier | | `project_ref` | `text` | optional, ≤ 255 chars | | `metadata` | `jsonb` | ≤ 8 KB catch-all | **Submission** happens exclusively through a `SECURITY DEFINER` function, `submit_interfaces_feedback(...)`, which inserts the row and returns the server-generated `delete_token` exactly once. There is no insert grant or policy on the table itself, so clients cannot insert directly or supply their own token — the function is the only door. Execute is revoked from `PUBLIC` and granted to `anon` only (both statements matter: local and hosted databases have different default function ACLs). **Deletion** is a hard `DELETE` authorized by presenting the token in an `x-feedback-token` request header. RLS policies compare the row's `delete_token` against that header (`current_setting('request.headers', ...)`) — the URL filter is never the security boundary; a request without the matching header affects zero rows, even with no filter or someone else's token in the filter. Tokens never expire (the delete right shouldn't lapse). The header is cast to `uuid` and compared against the untransformed column, so lookups use the unique index on `delete_token` even for header-only reads; a malformed token header is rejected with a `400` (`22P02`), consistent with what a malformed URL filter value already returns. **Context gate (defense-in-depth)**: rows submitted with a `project_ref` and/or `user_id` additionally require the matching `x-feedback-project-ref` / `x-feedback-user-id` headers — on both reads and deletes — so a leaked bare token can neither read the submission text back nor remove the row. A `NULL` column imposes no requirement: context-free rows keep token-only behavior, and extra headers sent against them are ignored (this keeps clients that always send their current context from being locked out of rows submitted without it). These are client-supplied, unverified values, so the gate is a knowledge factor rather than an identity check; clients should persist `{delete_token, project_ref, user_id}` together at submit time and re-present them byte-exact (`project_ref`/`user_id` are compared as plain text). **Reads** are limited to `grant select (feedback, delete_token)` behind the same token-scoped policy: a token-holder can preview their own submission text before deleting and confirm the delete matched (`Prefer: count=exact` → `Content-Range: */1` vs `*/0`). No other columns are readable by any API role; `delete_token` needs select because PostgREST requires a WHERE clause on deletes and filter columns require select privilege. Verified locally via `supabase db reset` + the local REST API: token issuance, token-scoped preview and delete, zero-row results for missing/wrong/malformed tokens (including a victim's token in the filter without the header), the full context-gate matrix (project+user, project-only, and context-free rows, incl. lenient extra-header behavior), denied direct inserts and column reads, length caps enforced through the function, and no execute for `authenticated`. ## Additional context Linear tickets: [CLI-1946](https://linear.app/supabase/issue/CLI-1946), [CLI-1999](https://linear.app/supabase/issue/CLI-1999) The client-side flows (`supabase feedback add` / `feedback delete` in the CLI, and the MCP tool) land separately in their respective repos and will call the RPC / DELETE endpoint described above. Supersedes #48378 — recreated on a fresh git branch so that the Supabase preview branch used for testing this table isn't shared with unrelated work. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added support for collecting and storing feedback submitted through interfaces. * Feedback can include submission source, timestamps, user details, project references, and additional metadata. * Added secure feedback submission with controlled access to protect submitted information. * Added support for authorized feedback removal using a secure deletion token. * Added safeguards to validate feedback content and restrict access to permitted information. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
99599a843d |
docs(cli): address review feedback on getting-started update tabs (#48504)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Docs update — follow-up to #48426, addressing review feedback on the npm panel of "Updating the Supabase CLI". ## What is the current behavior? - Lead-in text doesn't match the short imperative style of the other platform tabs ([review comment](https://github.com/supabase/supabase/pull/48426#discussion_r3678295762), [review comment](https://github.com/supabase/supabase/pull/48426#discussion_r3678299519)) - Beta instructions use `npm update supabase@beta`, which stays within the semver range in `package.json` and can't move a stable install to the `beta` dist-tag ([review comment](https://github.com/supabase/supabase/pull/48426#discussion_r3671400751)) ## What is the new behavior? - Lead-ins rewritten to match the other tabs: "Update the CLI with npm:" - Beta command changed to `npm install supabase@beta --save-dev`, which works for both updating an existing beta install and switching channels ## Additional context Prettier passes locally; MDX lint couldn't run locally (`node-pty` build issue), so relying on CI. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Streamlined the Supabase CLI upgrade instructions for npm installs. * Clarified the stable update command and updated the beta-channel guidance to use the beta install command for switching. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com> Co-authored-by: Miranda Limonczenko <miranda.limonczenko@supabase.io> |
||
|
|
29f11b85e7 |
docs(cli): make getting-started platform tabs consistent (#48426)
## What kind of change does this PR introduce? Docs consistency fix for the [CLI getting-started guide](https://supabase.com/docs/guides/local-development/cli/getting-started). The page has three install-channel tab groups (Installing, Beta channel, Updating the Supabase CLI). The first two order tabs **npm → macOS → Windows → Linux** with npm as the default, but the Updating section put npm last and defaulted to macOS. This PR aligns all three, plus two related consistency fixes found while auditing the CLI-focused pages: - Move the npm tab first in the Updating section and set `defaultActiveId="npm"`, matching the other two groups - Rename the Updating section's `#### Linux package manager` heading to `#### Linux packages` to match the Installing and Beta channel sections (in-page `#linux-packages` links target the first occurrence in Installing, so they are unaffected) - Add `queryGroup="platform"` to all three groups so the selected platform stays in sync across them and persists in the URL — the same mechanism the page's Access services tabs (`access-method`) and the local-development overview (`package-manager`) already use Other CLI-focused pages were checked (`cli/testing-and-linting`, `cli-workflows`, `guides/cli`, `local-development` overview) and have no similar tab inconsistencies. Noticed in passing, intentionally not changed here: the Updating npm tab suggests `npm update supabase@beta --save-dev` for the beta channel, but `npm update` doesn't accept a dist-tag — switching to beta should be `npm install supabase@beta --save-dev`. Left for a follow-up since it's a content bug, not an ordering issue. Validation: `pnpm lint:mdx` and Prettier pass with no findings on this file. 🤖 Generated with [Claude Code](https://claude.com/claude-code) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Improved the Supabase CLI installation and update guide with clearer platform-specific tab behavior. * Refined the “Updating the Supabase CLI” tabs to default to npm, and added stable/beta npm update instructions in the npm panel. * Updated Linux update wording and re-formatted the step list under the Linux packages tab for better readability. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: Claude Fable 5 <noreply@anthropic.com> |
||
|
|
24eacce920 |
chore: remove mise.toml (#47888)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES ## What kind of change does this PR introduce? Removes the `mise.toml` file (partial revert of a change in https://github.com/supabase/supabase/pull/47719) ## What is the current behavior? Folks with `mise` installed are seeing a confusing "error parsing config file" error ## What is the new behavior? Folks with `mise` installed should no longer see that error. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Removed the configuration that enabled automatic version-file handling for Node.js and pnpm. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
1ce1fd6664 |
chore: small onboarding docs/DX updates (#47719)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. YES (in fact, this PR makes a tiny change!) ## What kind of change does this PR introduce? Docs and config file changes to fix up some outdated docs and improve the onboarding experience a little bit: - [x] Fixes up the `pnpm` versioning guidance in `DEVELOPERS.md` (as well as some small formatting cleanups) - [x] Introduces a lightweight `mise.toml` file for [mise](https://mise.en.dev/) users. We use mise in other codebases in the @supabase org — if you have mise installed and you open your terminal into this codebase, mise will read the `mise.toml` file and automatically set up the Node/pnpm versions set in the `.nvmrc`/`package.json` files. - [x] Cleans up a TOC in `CONTRIBUTING.md` that looked ill-formatted — the numbered list appears on one line, which I don't believe is intended (see [here](https://github.com/supabase/supabase/blob/561e43b36c02cb5576e7ea3d3a11f9349ace0bcc/CONTRIBUTING.md)). I opted to remove the TOC wholesale as opposed to fixing the formatting since the GitHub UI has a native TOC viewer. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated contributor and developer guides to improve navigation and clarify setup instructions. * Removed an extra table of contents from the contributing guide. * Refined dependency/version guidance and formatting in the development guide. * **Chores** * Updated local tooling settings to better support version-file based workflows. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
b9883eb543 |
docs: add Kanad Gupta to humans.txt (#47477)
## I have read the [CONTRIBUTING.md](https://github.com/supabase/supabase/blob/master/CONTRIBUTING.md) file. yes ## What kind of change does this PR introduce? Adds myself to the `humans.txt` file per the onboarding instructions. ## What is the current behavior? n/a ## What is the new behavior? n/a ## Additional context n/a <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated the site’s public team information to include a new team member name. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |