test: expect scrubbed custom header values in e2e - #2133
Merged
sabre1041 merged 1 commit intoAug 20, 2026
Conversation
The GHSA-5jhf-2qmf-m8c5 fix scrubs configured custom header values from --debug trace output, but the e2e specs still asserted the raw values, so every "custom header is provided" spec has failed on main since then. Expect the scrubbed values instead. The specs still verify that each custom header name is present on every matching request. Signed-off-by: Terry Howe <terrylhowe@gmail.com>
TerryHowe
requested review from
Wwwsylvia,
sabre1041,
sajayantony and
shizhMSFT
as code owners
August 17, 2026 12:28
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2133 +/- ##
==========================================
+ Coverage 87.44% 87.63% +0.18%
==========================================
Files 139 139
Lines 5544 5651 +107
==========================================
+ Hits 4848 4952 +104
Misses 417 417
- Partials 279 282 +3 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Aug 18, 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.
What this PR does
Fixes the 9 failing
1.1 registry users: when custom header is providede2e specs that have brokenmainsince the GHSA-5jhf-2qmf-m8c5 fix landed.Why
That fix scrubs configured custom header names from
--debugtrace output, since--headeris commonly used to pass credential headers:cmd/oras/internal/option/remote.gocollects every--headername intosensitiveHeadersand passes them totrace.NewTransportinternal/trace/transport.goreplaces those values with*****The e2e specs were not updated, so they still assert the raw values:
while the debug output now contains:
Every spec fails at
test/e2e/internal/utils/match/request.go:58withfailed to match all headers. This affectsattach,blob,manifest,pull,push,repo,tag, and bothcpspecs, and it fails on every PR branched after the fix (for example #2130, where it is unrelated to that PR's dependency bump).The change
Expect the scrubbed values. The specs still verify that each custom header name is present on every matching request, which is what they were really guarding.
Verification
The full e2e suite could not be run locally (macOS AirPlay Receiver holds port 5000, so the test registry is unreachable), so the expected literals were checked directly against the real
trace.logHeaderwith a throwaway unit test:"Foo": "*****"\nand"A": "*****"\nare both produced, and neither raw value leaks. CI on this PR exercises the real suite.Note, not addressed here
The
loginspec in the same block passes only vacuously — it omits-d, sogetRequestsfinds no requests and the matcher's loop never runs. Worth a follow-up.