Skip to content

Redact SQL Server connection parameter values in logs - #2762

Merged
mivds merged 3 commits into
sodadata:mainfrom
wunianze666-netizen:fix/sqlserver-redact-connection-parameter-logs
Jul 12, 2026
Merged

mivds merged 3 commits into
sodadata:mainfrom
wunianze666-netizen:fix/sqlserver-redact-connection-parameter-logs

Conversation

@wunianze666-netizen

Copy link
Copy Markdown
Contributor

Summary

  • stop logging raw SQL Server connection_parameters values when building the connection string
  • keep the parameter names in the log output so debugging still shows which keys were applied
  • add a unit test that verifies secrets stay out of the logs while the connection string still includes the configured parameters

Why

connection_parameters can carry security-sensitive values such as access tokens. Logging those values verbatim makes it easy to leak secrets through CI logs or shared runtime logs.

@sonarqubecloud

Copy link
Copy Markdown

@mivds

mivds commented Jul 12, 2026

Copy link
Copy Markdown
Contributor

Hi @wunianze666-netizen, thank you for the contribution! This looks good to me. I've taken to opportunity to make a tiny refactor to simplify the test you added, and fixed a latent bug.

@mivds
mivds merged commit 6c553b5 into sodadata:main Jul 12, 2026
22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants