Skip to content

Redact sensitive header values when displaying Headers collections#1328

Open
fredrikekre wants to merge 1 commit into
masterfrom
fe/headers
Open

Redact sensitive header values when displaying Headers collections#1328
fredrikekre wants to merge 1 commit into
masterfrom
fe/headers

Conversation

@fredrikekre

@fredrikekre fredrikekre commented Jul 8, 2026

Copy link
Copy Markdown
Member

Printing a Headers collection (REPL, at-show, logging, stacktraces) used
the default AbstractVector show and leaked raw values of sensitive
headers such as Authorization. Request/Response display already masks
these via _HTTP_REDACTED_HEADERS; add Base.show methods for Headers
that route values through the same _http_render_header_value redactor,
restoring the HTTP.jl 1.x behavior of masking Authorization,
Proxy-Authorization, Cookie, and Set-Cookie with "******".

Redaction is display-only: header(), iteration, and indexing still
return the real values, and wire output is unaffected.

Co-Authored-By: Claude Code noreply@anthropic.com

Printing a Headers collection (REPL, at-show, logging, stacktraces)
used the default AbstractVector show and leaked raw values of sensitive
headers such as Authorization. Request/Response display already masks
these via _HTTP_REDACTED_HEADERS; add Base.show methods for Headers
that route values through the same _http_render_header_value redactor,
restoring the HTTP.jl 1.x behavior of masking Authorization,
Proxy-Authorization, Cookie, and Set-Cookie with "******".

Redaction is display-only: header(), iteration, and indexing still
return the real values, and wire output is unaffected.

Co-Authored-By: Claude Code <noreply@anthropic.com>
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.06%. Comparing base (626dac7) to head (bf7168c).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1328      +/-   ##
==========================================
- Coverage   88.08%   88.06%   -0.02%     
==========================================
  Files          30       30              
  Lines       11847    11869      +22     
==========================================
+ Hits        10435    10453      +18     
- Misses       1412     1416       +4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

1 participant