Skip to content

Redact mux/twitch shorthand stream keys and websocket url query values - #1713

Merged
milos-lk merged 2 commits into
mainfrom
milos/redact-stream-urls
Aug 14, 2026
Merged

Redact mux/twitch shorthand stream keys and websocket url query values#1713
milos-lk merged 2 commits into
mainfrom
milos/redact-stream-urls

Conversation

@milos-lk

Copy link
Copy Markdown
Contributor

Summary

  • RedactStreamKey now redacts mux:// and twitch:// shorthand stream urls, where the entire authority is the stream key. Previously only rtmp(s):// urls matched, so shorthand keys passed through redaction unchanged and were logged raw (e.g. in the egress request validated log, which redacts a clone of the start request via RedactEncodedOutputs before logging).
  • RedactDirectOutputs now redacts query parameter values in track egress websocket urls via a new utils.RedactUrlQueryValues helper. Websocket output urls commonly carry credentials in query parameters (token=, signature=, ...); parameter names are kept for debuggability.
  • Fixes RedactUpload reading AssumeRoleExternalId instead of SessionToken when redacting SessionToken — a set session token with an empty external id was cleared to "" instead of showing the {session_token} placeholder.

Test plan

  • Extended TestRedactStreamOutput with mux/twitch shorthand cases
  • Extended TestRedactDirectOutput with a websocket url query redaction case
  • Extended TestRedactUpload with a session-token-without-external-id case

🤖 Generated with Claude Code

mux:// and twitch:// shorthand stream urls carry the stream key as the
entire authority, but RedactStreamKey only matched rtmp(s):// urls, so
shorthand keys passed through redaction unchanged and ended up raw in
request logs. Track egress websocket urls can carry credentials in
query parameters and were not redacted at all.

Also fixes RedactUpload reading AssumeRoleExternalId instead of
SessionToken when redacting SessionToken.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: f65a9be

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@milos-lk
milos-lk merged commit d89b4a7 into main Aug 14, 2026
9 checks passed
@milos-lk
milos-lk deleted the milos/redact-stream-urls branch August 14, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants