• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

supabase / supabase / 42102651042
87%

Build:
DEFAULT BRANCH: master
Ran 05 Nov 2026 08:26PM UTC
Jobs 1
Files 190
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

05 Nov 2026 08:21PM UTC coverage: 87.069% (+0.007%) from 87.062%
42102651042

push

github

web-flow
feat(studio): add reveal refinement for single api-key reads (#52965)

Part 5 of 6 in a stack for
[FE-4731](https://linear.app/supabase/issue/FE-4731/grants-rollout-api-keys-consumers-that-only-need-publishable-keys).
Based on #52964.

## Stack
1. #52961 Docs and project API docs consumers
2. #52962 Edge functions and vector bucket examples
3. #52963 Integrations landing data
4. #52964 Connect sheet and project connection popover; remove the
transitional api-keys hooks
5. 👉 #52965 `reveal` refinement for single api-key reads; API key pill
6. #52966 API key create and delete

## Changes
- Adds a `reveal` refinement for `GET /v1/projects/{ref}/api-keys/{id}`,
mirroring the list endpoint: the `reveal` variant adds
`api_gateway_keys_secret_read`, and the wrapper owns the `reveal` query
param.
- `getAPIKeysById` takes a plain or reveal grant instead of
`unguarded.migrating` and a manual `reveal` flag.
- `useRevealedSecret` mints the reveal grant, returns it, and doesn't
request unless it's granted.
- `ApiKeyPill` uses the reveal grant instead of its V2 check. Reveal and
copy are disabled while the check loads, when denied, or when it fails.
Publishable keys aren't gated.
- `useConnectServerEnv`: the secret can only be revealed once the reveal
grant is granted.

**Guard drift:** `ApiKeyPill` checked only
`api_gateway_keys_secret_read`, but the endpoint needs
`api_gateway_keys_read` and `api_gateway_keys_secret_read`. Users with
only the secret permission saw an enabled button and got a 403; they now
see it as restricted.

## Testing
- `data/guarded-fetch.test.ts`: type tests for the by-id endpoint (plain
and reveal grants match the raw client, `reveal` rejected as a caller
param, a list-endpoint reveal grant rejected), and a runtime test that
`reveal` is set from the grant. The "variant the endpoint doesn't have"
negative now uses the branches endpoint.
- `ApiKeyPill.platform.test.tsx` (renamed from `ApiKeyPill.test.tsx`,
now on real grants through MSW): re... (continued)

2049 of 2417 branches covered (84.77%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

2846 of 3205 relevant lines covered (88.8%)

201.2 hits per line

Subprojects
ID Flag name Job ID Ran Files Coverage
1 studio-tests 42102651042.1 05 Nov 2026 08:26PM UTC 760
38.44
GitHub Action Run
Source Files on build 42102651042
  • Tree
  • List 190
  • Changed 157
  • Source Changed 1
  • Coverage Changed 157
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #42102651042
  • 757040ff on github
  • Prev Build on master (#42076996700)
  • Next Build on master (#42159923037)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc