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

supabase / storage / 45202716949
89%

Build:
DEFAULT BRANCH: master
Ran 23 Nov 2026 03:15PM UTC
Jobs 2
Files 393
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

23 Nov 2026 03:12PM UTC coverage: 88.458% (+0.01%) from 88.446%
45202716949

push

github

web-flow
fix: bind Vercel OIDC sub to tenant in JWT verification (#1732)

## Problem

Vercel Marketplace OIDC tokens are signed with one key that is shared by
every Vercel installation. When a tenant's JWKS includes that key, a
valid signature does not prove that the token was issued for this
tenant. Storage checks the signature, `exp` and `nbf`, but not `sub`. So
a Vercel token issued for a different project is accepted, on the
`Authorization` header and as the S3 protocol session token
(`X-Amz-Security-Token`).

## Resulting behavior

- A JWT whose `iss` starts with `https://integrations.vercel.com/` must
have `sub` equal to the serving tenant ID (the project ref). If not,
verification fails with the same `AccessDenied` error as an invalid
token.
- The check is in `verifyJWT` and on the `verifyJWTWithCache` cache-hit
path, so a cached verification cannot skip it. A Vercel-issued token
with no tenant ID given is rejected.
- The REST JWT plugin and the S3 SigV4 session-token path pass
`request.tenantId`. Single-tenant mode uses `PROJECT_REF` / `TENANT_ID`.
Multi-tenant mode uses the tenant from `x-forwarded-host`.
- Tokens with any other `iss`, or no `iss`, are not changed.

## Verification

- [x] `vitest run --config vitest.unit.config.ts
src/internal/auth/jwt.test.ts src/http/plugins/jwt.test.ts
src/http/plugins/signature-v4.test.ts
src/http/plugins/signature-v4-session-token.test.ts`: 4 files, 122 tests
pass.
- [x] `signature-v4-session-token.test.ts` sends a real Vercel-issued
JWT as the S3 session token in the header and in the presigned URL
query, without mocking JWT verification.
- [x] With the check disabled, the 6 new rejection tests fail
(verifyJWT, cache-hit path, no tenant, the REST plugin, and the S3
header and query locations).
- [x] `biome check` on the changed files and `tsc --noEmit` pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Michael Zalimeni <zalimeni@users.noreply.github.com>
Co-authored... (continued)

9901 of 11767 branches covered (84.14%)

Branch coverage included in aggregate %.

12 of 12 new or added lines in 2 files covered. (100.0%)

17115 of 18774 relevant lines covered (91.16%)

1283.96 hits per line

Jobs
ID Job ID Ran Files Coverage
1 rest-pg18 - 45202716949.1 23 Nov 2026 03:22PM UTC 368
68.97
GitHub Action Run
2 unit - 45202716949.2 23 Nov 2026 03:15PM UTC 384
71.9
GitHub Action Run
Source Files on build 45202716949
  • Tree
  • List 393
  • Changed 3
  • Source Changed 3
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #45202716949
  • e3cb2344 on github
  • Prev Build on master (#45169501572)
  • Next Build on master (#45263270344)
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