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

supabase / supabase-py / 42026831817
98%

Build:
DEFAULT BRANCH: main
Ran 05 Nov 2026 12:24PM UTC
Jobs 42
Files 124
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 12:24PM UTC coverage: 95.462% (+0.02%) from 95.446%
42026831817

push

github

web-flow
fix(realtime): redact API keys and access tokens from debug logs (#1992)

## What

With debug logging on, realtime wrote the user's JWT and API key to the
logs in two places:

- `RealtimeClient._send` and `_send_no_wait` logged every outgoing frame
in full, including the `access_token` in join payloads and in the
`access_token` events that `set_auth` sends on every heartbeat.
- The `websockets` library logs the handshake request line (`> GET
/realtime/v1/websocket?vsn=2.0.0&apikey=... HTTP/1.1`) and every frame
it sends, so the token leaked through the `websockets.client` logger as
well.

The v2 fix (#1750) never reached v3. This is the small security fix that
lands before the logging rework in SDK-2721.

## How

- New private module `realtime/_redact.py`. Its `redact` function
replaces `apikey=` query values (case insensitive) and `access_token`
values (JSON, dict repr and keyword repr forms) with `<redacted>`.
- `RedactingLoggerAdapter` redacts the message, string arguments and
`websockets` frames before they are formatted, so the token is removed
even when `WEBSOCKETS_MAX_LOG_SIZE` is raised and frames are logged in
full. Frames that contain no secret are passed through untouched. It
bumps `stacklevel` so records still point at the code that logged them,
not at the adapter.
- The `realtime.client` logger is wrapped in the adapter, which covers
the `sending:` frame logs and every other log line in the module.
- `connect_once` passes an adapter around the `websockets.client` logger
to `websockets.connect`. The logger names are unchanged, so existing
logging configuration keeps working.
- `.sdk-parse-ignore` excludes `_redact.py` from the capability matrix
check, since it is internal and not public API.

## Tests

`tests/test_log_redaction.py` connects to a local WebSocket server with
debug logging on, with both the default and full length frame logging,
subscribes a channel, calls `set_auth`, subscribes a second channel, and
asserts that neither the ... (continued)

9635 of 10093 relevant lines covered (95.46%)

5.82 hits per line

Coverage Regressions

Lines Coverage ∆ File
12
92.63
0.08% src/realtime/client.py
Jobs
ID Job ID Ran Files Coverage
1 utils-py3.14-highest - 42026831817.1 05 Nov 2026 12:24PM UTC 19
99.5
GitHub Action Run
2 auth-py3.12-highest - 42026831817.2 05 Nov 2026 12:25PM UTC 36
91.55
GitHub Action Run
3 supabase-py3.13-highest - 42026831817.3 05 Nov 2026 12:24PM UTC 22
97.77
GitHub Action Run
4 auth-py3.11-highest - 42026831817.4 05 Nov 2026 12:25PM UTC 36
91.55
GitHub Action Run
5 supabase-py3.15-highest - 42026831817.5 05 Nov 2026 12:25PM UTC 22
97.76
GitHub Action Run
6 postgrest-py3.11-highest - 42026831817.6 05 Nov 2026 12:26PM UTC 25
97.89
GitHub Action Run
7 postgrest-py3.14-highest - 42026831817.7 05 Nov 2026 12:25PM UTC 25
97.89
GitHub Action Run
8 auth-py3.14-highest - 42026831817.8 05 Nov 2026 12:25PM UTC 36
91.52
GitHub Action Run
9 auth-py3.11-lowest-direct - 42026831817.9 05 Nov 2026 12:25PM UTC 36
91.55
GitHub Action Run
10 utils-py3.11-highest - 42026831817.10 05 Nov 2026 12:24PM UTC 19
99.51
GitHub Action Run
11 realtime-py3.12-highest - 42026831817.11 05 Nov 2026 12:25PM UTC 9
95.95
GitHub Action Run
12 utils-py3.12-highest - 42026831817.12 05 Nov 2026 12:24PM UTC 19
99.51
GitHub Action Run
13 storage-py3.11-lowest-direct - 42026831817.13 05 Nov 2026 12:25PM UTC 22
93.67
GitHub Action Run
14 functions-py3.12-highest - 42026831817.14 05 Nov 2026 12:24PM UTC 15
97.61
GitHub Action Run
15 functions-py3.13-highest - 42026831817.15 05 Nov 2026 12:24PM UTC 15
97.61
GitHub Action Run
16 utils-py3.13-highest - 42026831817.16 05 Nov 2026 12:24PM UTC 19
99.51
GitHub Action Run
17 postgrest-py3.13-highest - 42026831817.17 05 Nov 2026 12:26PM UTC 25
97.89
GitHub Action Run
18 realtime-py3.15-highest - 42026831817.18 05 Nov 2026 12:25PM UTC 9
95.61
GitHub Action Run
19 storage-py3.14-highest - 42026831817.19 05 Nov 2026 12:25PM UTC 22
93.65
GitHub Action Run
20 utils-py3.15-highest - 42026831817.20 05 Nov 2026 12:24PM UTC 19
99.5
GitHub Action Run
21 storage-py3.11-highest - 42026831817.21 05 Nov 2026 12:26PM UTC 22
93.67
GitHub Action Run
22 functions-py3.15-highest - 42026831817.22 05 Nov 2026 12:25PM UTC 15
97.61
GitHub Action Run
23 supabase-py3.14-highest - 42026831817.23 05 Nov 2026 12:24PM UTC 22
97.76
GitHub Action Run
24 supabase-py3.11-highest - 42026831817.24 05 Nov 2026 12:24PM UTC 22
97.77
GitHub Action Run
25 functions-py3.11-lowest-direct - 42026831817.25 05 Nov 2026 12:24PM UTC 15
97.61
GitHub Action Run
26 auth-py3.15-highest - 42026831817.26 05 Nov 2026 12:25PM UTC 36
91.52
GitHub Action Run
27 realtime-py3.13-highest - 42026831817.27 05 Nov 2026 12:25PM UTC 9
96.09
GitHub Action Run
28 storage-py3.15-highest - 42026831817.28 05 Nov 2026 12:27PM UTC 22
93.65
GitHub Action Run
29 storage-py3.12-highest - 42026831817.29 05 Nov 2026 12:26PM UTC 22
93.67
GitHub Action Run
30 postgrest-py3.15-highest - 42026831817.30 05 Nov 2026 12:25PM UTC 25
97.89
GitHub Action Run
31 postgrest-py3.12-highest - 42026831817.31 05 Nov 2026 12:26PM UTC 25
97.89
GitHub Action Run
32 functions-py3.11-highest - 42026831817.32 05 Nov 2026 12:24PM UTC 15
97.61
GitHub Action Run
33 storage-py3.13-highest - 42026831817.33 05 Nov 2026 12:25PM UTC 22
93.67
GitHub Action Run
34 utils-py3.11-lowest-direct - 42026831817.34 05 Nov 2026 12:24PM UTC 19
99.51
GitHub Action Run
35 realtime-py3.11-highest - 42026831817.35 05 Nov 2026 12:25PM UTC 9
96.24
GitHub Action Run
36 supabase-py3.11-lowest-direct - 42026831817.36 05 Nov 2026 12:24PM UTC 22
97.77
GitHub Action Run
37 functions-py3.14-highest - 42026831817.37 05 Nov 2026 12:24PM UTC 15
97.61
GitHub Action Run
38 auth-py3.13-highest - 42026831817.38 05 Nov 2026 12:25PM UTC 36
91.55
GitHub Action Run
39 realtime-py3.14-highest - 42026831817.39 05 Nov 2026 12:25PM UTC 9
95.45
GitHub Action Run
40 supabase-py3.12-highest - 42026831817.40 05 Nov 2026 12:24PM UTC 22
97.77
GitHub Action Run
41 postgrest-py3.11-lowest-direct - 42026831817.41 05 Nov 2026 12:25PM UTC 25
97.89
GitHub Action Run
42 realtime-py3.11-lowest-direct - 42026831817.42 05 Nov 2026 12:25PM UTC 9
96.24
GitHub Action Run
Source Files on build 42026831817
  • Tree
  • List 124
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #42026831817
  • 2b202075 on github
  • Prev Build on main (#42007041034)
  • Next Build on main (#42026860620)
  • 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