Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis 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: 82d99c8a5e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
82d99c8 to
6d30840
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6d30840724
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
6d30840 to
706734c
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 706734c85a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
706734c to
89dfede
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89dfede747
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
89dfede to
1eed953
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1eed9530dd
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
183d1f9 to
37397e5
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 37397e5655
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Presigned URLs carry their signature in the query string, and such URLs reach the logs in several ways: the handler logs the cache key, which is usually the upstream URL; the request middleware binds the raw request URI to the logger it passes on; ErrorResponse logs the request URL; and client errors quote the URL they failed on, including redirect targets the client never saw. ErrorResponse, the proxy strategy and the git strategy's ensure-refs endpoint also return error text, including git's quoted remote URL, in the response body. Loggers from Configure now replace URL queries with REDACTED in the message and in string, error and URL attributes. In text, a URL is a double-quoted string or a word with a "/" before its "?". Quotes after that "/" belong to the word, since git prints redirect URLs unquoted and with their quotes as is. A quoted URL's query runs to the closing quote, since net/http errors quote URLs with %q, which keeps spaces. An unquoted one runs to the next whitespace, since URL.String leaves quotes in queries unescaped. The scan is a single pass, so long header values bound by the middleware stay cheap. The middleware and the handler's cache_key also redact explicitly, so they stay redacted under any logger. ErrorResponse, the proxy strategy's error handler and git ensure-refs redact the bodies they write. Signed-off-by: Ravi Agarwal <ravi@perplexity.ai> Co-authored-by: Perplexity <noreply@perplexity.ai>
37397e5 to
c0c8235
Compare
Signed-off-by: Ravi Agarwal <ravi@perplexity.ai> Co-authored-by: Perplexity <noreply@perplexity.ai>
|
@codex review Created with Perplexity |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b3c1193833
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Signed-off-by: Ravi Agarwal <ravi@perplexity.ai> Co-authored-by: Perplexity <noreply@perplexity.ai>
|
@codex review Created with Perplexity |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
Presigned URLs carry their credentials in the query string (for S3,
X-Amz-Credential,X-Amz-SignatureandX-Amz-Security-Token). These URLs currently reach logs and error responses through:cache_keylog field, which is usually the upstream URL, on fill and serve failures;log.headersis set, so every later record for that request carries it;ErrorResponse, which logs the request URL;net/httpclient errors, which quote the failing URL, including redirect targets the client never saw.ErrorResponseand theproxystrategy's error handler also return that text in the response body;gitstrategy'sensure-refsendpoint, which returns clone and fetch errors in its 502 body, andgit fetcherrors quote the remote URL.Change
logging.Configurereplace URL queries withREDACTEDin the message and in string, error and URL attributes, including bound and grouped attributes.%+vadds foralecthomas/errors.uriand the handler'scache_keyare also redacted explicitly, so they stay redacted under any logger.ErrorResponse, theproxyerror handler andgitensure-refsredact the bodies they write.Text redaction is lexical and runs in a single pass, so it stays linear on long header values bound by the middleware:
/before its?. Quotes after that/belong to the word, becausegitprints redirect URLs unquoted, with any quotes in them left as they are.net/httperrors quote URLs with%q, including relative redirectLocationvalues they fail to parse, and that keeps spaces.URL.Stringleaves quotes in queries unescaped.Behaviour changes
?is kept.?in a quoted string, or in a word likea/b?c, is redacted even when it is not a URL.urlattributes that held a*url.URL, such as the oneErrorResponseadds, are now strings instead of objects with a field per URL component.Testing
Each test fails without the corresponding change.
TestRedactTextcovers multiple URLs, nested client errors, escaped quotes, other schemes, path-only and quoted relative URLs, spaces inside quoted URLs, quotes inside unquoted paths and queries, and unclosed quotes.TestRedactTextClientErrorsuses errors from a realhttp.Clientfollowing invalid absolute and relative redirects, and redirects with apostrophes or spaces in their location.TestRedactTextIsLinearchecks linear time on 1 MiB inputs.TestRedactingHandlercovers every attribute shape through both the text and JSON handlers, including the error trace the text handler prints.TestConfigureRedactsURLQuerieschecks thatConfigureinstalls the redacting handler in both modes.TestRedactURIand a newTestMiddlewarecase cover the middleware'suri.TestErrorResponseRedactsURLQueriescovers theErrorResponsebody and log record.TestHTTPProxyErrorRedactsRedirectQuerycovers theproxyerror body after a redirect to a signed URL fails.TestEnsureRefsHandlercase covers theensure-refs502 body whengit fetchfails on a redirect to a signed URL with quotes in its path.TestLoggedCacheKeyOmitsQuerycovers the handler'scache_keyon a cache hit whose response write fails.Created with Perplexity