Repository navigation
fix(db): do not log the database password - #204
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #204 +/- ##
=======================================
Coverage 68.17% 68.17%
=======================================
Files 78 78
Lines 3702 3702
=======================================
Hits 2524 2524
Misses 1178 1178 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The DEBUG log of the connection string included the password. It now logs the engine URL through repr(), which masks the password and keeps the driver, host and database.
dimoschi
force-pushed
the
fix/do-not-log-db-password
branch
from
October 6, 2026 12:31
8828a7f to
736eddb
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Types of changes
Proposed changes
src/database/session.pylogged the full connection string at DEBUG, password included. It now logs the engine URL withrepr(), which masks the password:Checklist
doc.
Additional context
tests/src/database/test_session.pyreloads the module with a known password and checks that it does not appear in the logs. It failed before the fix.