Skip to content

creds: mask OAuth bearer token in trace logs#21659

Closed
intomonx wants to merge 2 commits into
curl:masterfrom
intomonx:master
Closed

creds: mask OAuth bearer token in trace logs#21659
intomonx wants to merge 2 commits into
curl:masterfrom
intomonx:master

Conversation

@intomonx

Copy link
Copy Markdown
Contributor

Masked OAuth bearer tokens in credential trace output by emitting *** when a bearer token is present, matching the existing password redaction behavior and preventing sensitive token disclosure in verbose/debug logs.

Masked OAuth bearer tokens in credential trace output by emitting *** when a bearer token is present, matching the existing password redaction behavior and preventing sensitive token disclosure in verbose/debug logs.

@bagder bagder left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fair enough I suppose

@intomonx intomonx requested a review from bagder May 18, 2026 14:28

@intomonx intomonx left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ok to merge 😃

@bagder

bagder commented May 18, 2026

Copy link
Copy Markdown
Member

It should just be noted that this is no guarantee that the token will not be shown in (other) verbose output.

@intomonx

Copy link
Copy Markdown
Contributor Author

Agreed. This mitigation reduces one known exposure path, but it does not guarantee that the token will never appear in other verbose, trace, shell, CI, proxy, or application logs. Any bearer token that appears in debug output should still be treated as compromised and rotated.

@bagder bagder closed this in 38cd720 May 18, 2026
@bagder

bagder commented May 18, 2026

Copy link
Copy Markdown
Member

Thanks!

outcast36 pushed a commit to greearb/curl that referenced this pull request Jun 3, 2026
Masked OAuth bearer tokens in credential trace output by emitting ***
when a bearer token is present, matching the existing password redaction
behavior and preventing sensitive token disclosure in verbose/debug
logs.

Closes curl#21659
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants