fix(hls,auth): redact credentials from URLs in errors - #4536
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review. WalkthroughThe changes redact userinfo, query parameters, and fragments from client-generated URL errors in moq-auth. The moq-auth and moq-hls conversions from reqwest errors remove the URL before exposing or storing those errors. Tests check that error display and debug output do not contain credentials or query secrets. Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to No concrete merge-blocking risk remains: the changed error paths redact the documented credential locations, and the path concern was not supported by the repository contract. Security Architecture ReviewSecurity architecture risk: ⚪ Minimal · up to The reviewed changes reduce credential exposure in errors without widening accepted URLs, changing transport security, or changing error categories. No material security risk introduced or worsened by this PR was identified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
MERGE Positive security improvement and a direct follow-up to the #4457 audit note that Complexity is minimal and well placed: both Regression tests mirror the #4457 closed-port pattern and assert both This is an automated review, not the maintainer's decision |
9ab3b77 to
4eaf6a7
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit d41e426.
Direction: good, narrowly scoped fix. Redacting at the reqwest-to-domain-error boundary avoids relying on every logging call to remember to strip credentials. Keeping the error variants unchanged is appropriate.
No actionable regression found in the refreshed diff. Tests exercise the error boundary; this review did not independently rerun those network tests.
Verification: static diff and targeted source inspection. I did not run the repository test/build suites or reproduce runtime scenarios in this review. This is a COMMENT review, not a merge approval.
reqwest's Display and Debug include the full dialed URL, so a signed playlist URL or an auth server URL carrying `?jwt=` leaked its token into logs. Strip it with `without_url()` on conversion, as #4457 did for moq-rtc. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
InsecureUrl and InvalidUrl echoed the configured URL verbatim, so a misconfigured auth URL leaked any `?jwt=` query or userinfo into the startup error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d41e426 to
1f64b67
Compare
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
MERGE (follow-up) Reviewed head What changed since the last Grok review
That closes the gap the first review did not cover: a misconfigured Residual (non-blocking) No other concrete issues in the new delta. This is an automated review, not the maintainer's decision |
|
Merge summary Rebased onto Checks on the rebased head
Regression tests spot check. I reverted both Worth noting the moq-auth leak arrives through On the byte-range residual. Agreed that
That is the maintainer's call rather than something to slip into a security fix targeting No public API or wire change here. No version bumps. (Written by Space Bunny Free) |
reqwest's
DisplayandDebuginclude the full dialed URL, so an HLS playlist or segment URL, or amoq-authserver URL, carrying?jwt=leaked its token into logs. This applies the samewithout_url()fix #4457 made in moq-rtc.moq-hls:From<reqwest::Error>strips the URL before wrapping.moq-auth:reqwest::Errorleaves thefrom_message!macro for a hand-written impl that strips the URL before flattening.moq-auth:InsecureUrlandInvalidUrlechoed the configured URL verbatim. They now drop userinfo, query, and fragment.Each crate gets an
http_error_redacts_urlregression test that dials a closed port with?jwt=secretand checks that neitherDisplaynorDebugcontains the secret.url_schemes_are_checked_at_constructionnow also checks that a refused URL is redacted. All three fail without the fix.I audited the other reqwest call sites and left them unchanged:
moq-tokiofingerprint bootstrap already clears the query, and reqwest never prints userinfo.moq-relaycluster.connect_apilogs anyhow's%err, which prints only the outermost context, not the reqwest source.without_url()can't redact the chain there anyway: http-cache wraps the reqwest error in its own anyhow error, so a fix would need a custom middleware.moq-cli authreports the operator's own--internal-urlback to them.Public API / wire impact: none. Error messages lose the URL; variants are unchanged.
(Written by Claude Opus 5.5)
🤖 Generated with Claude Code