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

supabase / supabase / 41474320027
87%

Build:
DEFAULT BRANCH: master
Ran 02 Nov 2026 03:49PM UTC
Jobs 1
Files 186
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

02 Nov 2026 03:42PM UTC coverage: 86.747% (+0.02%) from 86.725%
41474320027

push

github

web-flow
feat(studio): send role passwords as precomputed SCRAM-SHA-256 verifiers (#52544)

## What kind of change does this PR introduce?

Feature.

## What is the current behavior?

Role passwords are sent as plaintext in the SQL (`create role ...
password '...'` and `alter role ... password '...'`), so they can end up
in Postgres logs.

## What is the new behavior?

ASCII role passwords are hashed in the browser with Web Crypto and sent
as a precomputed `SCRAM-SHA-256$...` verifier. Postgres stores a
verifier as given, so the plaintext no longer appears in the SQL or the
server logs. This applies to every flow that sets a role password,
because they all go through the role create and update mutations.

Non-ASCII passwords are still sent as plaintext. Postgres normalizes
passwords with SASLprep before hashing, and the browser code doesn't
apply it, so a verifier built from the raw text could stop the role from
logging in. For ASCII, SASLprep changes nothing, so the verifier always
matches. The `saslprep` package can't be used here because it reads its
table with `fs.readFileSync` at import time. Covering non-ASCII
passwords is a follow-up, most likely a server-side API.

Studio also falls back to plaintext when `crypto.subtle` isn't
available, which browsers only expose in secure contexts. This keeps
setting a password working on self-hosted Studio served over plain HTTP.

## Known limitations

- The verifier is built with 4096 iterations, the Postgres default. If a
project sets `scram_iterations` higher, these roles keep 4096, because
Postgres stores a supplied verifier as given. Reading the setting first
needs an extra query and a grant for it, so it's left for the follow-up
below.
- Non-ASCII passwords, and Studio over plain HTTP, still send plaintext.
- The follow-up is a server-side path that sets the password without it
going through the SQL, which would honor the server's own settings and
cover these cases.

A verifier isn't secret (it can be attacked... (continued)

1985 of 2356 branches covered (84.25%)

Branch coverage included in aggregate %.

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

1 existing line in 1 file now uncovered.

2793 of 3152 relevant lines covered (88.61%)

195.26 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
87.5
-12.5% apps/studio/lib/telemetry/use-track-funnel-error.ts
Subprojects
ID Flag name Job ID Ran Files Coverage
1 studio-tests 41474320027.1 02 Nov 2026 03:49PM UTC 744
37.5
GitHub Action Run
Source Files on build 41474320027
  • Tree
  • List 186
  • Changed 152
  • Source Changed 0
  • Coverage Changed 152
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #41474320027
  • 5ff6930c on github
  • Prev Build on master (#41465414857)
  • Next Build on master (#41481536799)
  • 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