Redact sensitive headers in OpenAPI provider debug logging#3436
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: dcdf0f4de2
ℹ️ 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".
| _SENSITIVE_HEADERS = frozenset( | ||
| {"authorization", "x-api-key", "cookie", "proxy-authorization"} | ||
| ) |
There was a problem hiding this comment.
Redact arbitrary auth header names
This redaction list only masks four exact header names, but OpenAPI apiKey auth headers are user-defined and RequestDirector passes arbitrary in: header values through to request.headers; as a result, common credentials like Api-Key/X-Auth-Token still get logged in OpenAPITool.run debug output. In deployments that enable debug logging, this leaves sensitive tokens exposed despite the security fix.
Useful? React with 👍 / 👎.
|
Auto-reviewed: all CI checks green, review comments addressed. Merging. |
The experimental OpenAPI provider logged full request headers at debug level, including Authorization, X-API-Key, and other sensitive values. Debug logs are often captured in production logging systems, so these should be redacted even at debug level.
Closes #3427