Skip to content

fix(sdk): refuse status client redirects - #683

Open
chainsmt wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
chainsmt:feat/status-client-no-redirect
Open

chainsmt wants to merge 1 commit into
Sub-Rosa-Issue:mainfrom
chainsmt:feat/status-client-no-redirect

Conversation

@chainsmt

@chainsmt chainsmt commented Nov 24, 2026 •

Copy link
Copy Markdown

Summary

Following redirects from the SDK status client can send status requests (and any future headers) to an unreviewed origin. This change makes KeeperStatusClient refuse automatic redirects and surface a typed error instead.

What changed

  • Set redirect: "manual" on status fetches so the runtime never follows 3xx responses.
  • Introduce StatusRedirectError for every 3xx / opaque redirect outcome.
  • Redact Location from error messages and readiness output so intermediary destinations are not leaked.
  • Add same-origin and cross-origin redirect fixtures under packages/sdk/fixtures/.

Acceptance criteria

  • Automatic redirects disabled in the SDK status client
  • Typed error for every 3xx response
  • Location value redacted from errors
  • Same-origin and cross-origin redirect fixtures

Test plan

  • pnpm --filter @sub-rosa/sdk exec node --import tsx --test src/status-client.test.ts src/public-api-snapshot.test.ts

Closes #675

Disable automatic redirects and raise StatusRedirectError for 3xx without echoing Location.
@drips-wave

drips-wave Bot commented Nov 24, 2026

Copy link
Copy Markdown

@chainsmt Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

sdk(high/easy): refuse cross-origin redirects in the status client

1 participant