trace2: redact signatures from presigned blob storage URLs - #72
trace2: redact signatures from presigned blob storage URLs#72dreynaud-oai wants to merge 3 commits into
Conversation
Trace2 redacts passwords in HTTP(S) URLs, but leaves signatures in their query strings. Presigned blob storage URLs can therefore expose access credentials in trace output. Redact values for sig, signature, and query names ending in -signature. Match names case-insensitively after percent decoding, without checking the host. Preserve the rest of the URL and the existing redaction opt-out. Extend the existing event tests to cover signatures alongside passwords, encoded and repeated query parameters, and unchanged URL fields. Signed-off-by: Daniel Reynaud <dreynaud@openai.com>
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 807668babf
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Transport errors can embed a presigned URL in a message passed to die(). Trace2 records that message without the argument redaction applied to start and child_start events, so a failed request can still expose its signature. Format error messages once and redact embedded URLs before passing them to the output targets. Keep the separate message and format fields, and redact URLs in either field. Leave stderr and request arguments unchanged. Test all three targets with quoted URLs and multiple URLs in one error, and check that stderr and the redaction opt-out retain their behavior. Signed-off-by: Daniel Reynaud <dreynaud@openai.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c1e270459c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
URL schemes are case-insensitive, but the redactor only recognized lowercase HTTP(S) prefixes. Uppercase and mixed-case schemes could therefore leave signatures in trace output. Use case-insensitive matching for argument URLs and URLs embedded in error messages. Preserve the original URL spelling and cover these schemes in the existing redaction tests. Signed-off-by: Daniel Reynaud <dreynaud@openai.com>
Trace2 redacts passwords in HTTP(S) URLs, but leaves signatures in their query strings. Presigned blob storage URLs can therefore expose access credentials in trace output.
Redact values for
sig,signature, and query names ending in-signature, matching names case-insensitively after percent decoding. Preserve the rest of the URL and honorGIT_TRACE2_REDACT=0. The change affects only trace output, not the URL used for the request.Extend the existing Trace2 tests for signatures alongside passwords, encoded and repeated query parameters, and unchanged URL fields.