Skip to content

Conversation

@astuyve
Copy link
Contributor

@astuyve astuyve commented Nov 25, 2025

Open Bits Dev Session

You can ask for changes by mentioning @DataDog in a comment.

Feedback (especially what can be better) welcome in #code-gen-feedback!


What does this PR do?

  • ensure redactable header keys are compared case-insensitively
  • add regression coverage for uppercase header names

Motivation

  • protect sensitive headers even when clients send mixed-case key names

Testing Guidelines

  • pytest tests/test_tag_object.py (blocked: missing ujson dependency in the sandbox; installing from PyPI is unavailable without network access)

Additional Notes

  • None.

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog
  • This PR passes the integration tests (ask a Datadog member to run the tests)

Co-authored-by: astuyve <astuyve@gmail.com>
@astuyve astuyve requested review from a team as code owners November 25, 2025 19:06
@datadog-datadog-prod-us1
Copy link
Contributor

datadog-datadog-prod-us1 bot commented Nov 25, 2025

Bits AI Dev Agent Status: ✅ Done [Fix CI Errors]

Status History (3 entries)
2025-11-25 19:06:06 UTC ✅ Processed user query
2025-11-25 19:10:08 UTC ❌ Failed to process user query
2025-11-25 19:25:56 UTC ✅ Processed user query

You can ask for changes by mentioning @DataDog in a comment.

@astuyve
Copy link
Contributor Author

astuyve commented Nov 25, 2025

@DataDog the linter failed with black-22.3.0:

Successfully installed black-22.3.0 click-8.1.8 mypy-extensions-1.1.0 pathspec-0.12.1 platformdirs-4.4.0 tomli-2.3.0 typing-extensions-4.15.0
All done! ✨ 🍰 ✨
24 files would be left unchanged.
--- tests/test_tag_object.py	2025-11-25 19:06:13.372962 +0000
+++ tests/test_tag_object.py	2025-11-25 19:06:35.231549 +0000
@@ -111,13 +111,11 @@
             "Authorization": "secret",
             "headers": {"X-AUTHORIZATION": "another"},
         }
         spanMock = MagicMock()
         tag_object(spanMock, "function.request", payload)
-        spanMock.set_tag.assert_any_call(
-            "function.request.Authorization", "redacted"
-        )
+        spanMock.set_tag.assert_any_call("function.request.Authorization", "redacted")
         spanMock.set_tag.assert_any_call(
             "function.request.headers.X-AUTHORIZATION", "redacted"
         )
 
     def test_json_tag_object(self):
would reformat tests/test_tag_object.py

@astuyve astuyve merged commit ea7ad6e into main Nov 25, 2025
82 of 83 checks passed
@astuyve astuyve deleted the dd/fix-header-redaction-casing branch November 25, 2025 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants