fix: Sanitize middleware logging and add tracing headers#754
Merged
thostetler merged 1 commit intoadsabs:masterfrom Jan 14, 2026
Merged
fix: Sanitize middleware logging and add tracing headers#754thostetler merged 1 commit intoadsabs:masterfrom
thostetler merged 1 commit intoadsabs:masterfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #754 +/- ##
========================================
+ Coverage 60.8% 61.0% +0.2%
========================================
Files 300 300
Lines 34871 34965 +94
Branches 1486 1506 +20
========================================
+ Hits 21193 21317 +124
+ Misses 13644 13614 -30
Partials 34 34
🚀 New features to boost your workflow:
|
- Replaced username logging with hashed userId in public-facing middleware logs - Added sanitization for User-Agent and tracing headers to prevent log injection - Forward tracing headers (X-Original-Uri, X-Forwarded-For, X-Amzn-Trace-Id) to bootstrap API - Enhanced logging throughout middleware with structured data and timing info - Added tests for tracing header forwarding
a9a709a to
39498ef
Compare
shinyichen
approved these changes
Jan 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tracing headers (X-Original-Uri, X-Forwarded-For, X-Amzn-Trace-Id) were not being forwarded from middleware to the bootstrap API, breaking distributed tracing. Additionally, middleware logs were exposing raw usernames and were vulnerable to log injection.