-
Notifications
You must be signed in to change notification settings - Fork 191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: Mask MotherDuck connection token in the logs #3875
Conversation
I believe there's another place where we leak tokens into logs: sqlmesh/sqlmesh/core/config/connection.py Lines 265 to 273 in 170df72
The ATTACH statement contains a token and this is statement is happily logged by the engine adapter. |
If I'm not mistaken we do not log this since this is the DuckDBPyConnection's |
@themisvaltinos ah, great point. I think you're right |
Update: I realized this is inconsistent with the other config classes, where I think we can just revert the last commit and simply factor out the regex at the top of the file so it's compiled once. Then it should be good to go. |
…__ as well" This reverts commit e62aa13.
e62aa13
to
e4a1989
Compare
Mask the MotherDuck connection token in logs, displaying it as asterisks (
md:db?motherduck_token=************
) instead of revealing the actual value.