Skip to content

Redact sensitive headers in OpenAPI provider debug logging#3436

Merged
jlowin merged 2 commits intomainfrom
worktree-agent-a0cbaeb8
Mar 7, 2026
Merged

Redact sensitive headers in OpenAPI provider debug logging#3436
jlowin merged 2 commits intomainfrom
worktree-agent-a0cbaeb8

Conversation

@jlowin
Copy link
Member

@jlowin jlowin commented Mar 7, 2026

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

@jlowin jlowin added the bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. label Mar 7, 2026
@marvin-context-protocol marvin-context-protocol bot added openapi Related to OpenAPI integration, parsing, or code generation features. high-priority labels Mar 7, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +32 to +34
_SENSITIVE_HEADERS = frozenset(
{"authorization", "x-api-key", "cookie", "proxy-authorization"}
)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@jlowin
Copy link
Member Author

jlowin commented Mar 7, 2026

Auto-reviewed: all CI checks green, review comments addressed. Merging.

@jlowin jlowin merged commit bafd541 into main Mar 7, 2026
7 checks passed
@jlowin jlowin deleted the worktree-agent-a0cbaeb8 branch March 7, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. high-priority openapi Related to OpenAPI integration, parsing, or code generation features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Debug logging in OpenAPI provider can expose auth headers

1 participant