Remove hardcoded fallback database password from db_engine.py
#20
Labels
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/major-domo-database#20
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
app/db_engine.py:21— The PostgreSQL password fallback issba_dev_password_2024. Hardcoding it as a default makes it easy to accidentally run against a database without realizing the env var is unset. The fallback should beNoneorraiseif missing.Priority: medium | Labels: security
Fixed in PR #55: #55
Changed
os.environ.get('POSTGRES_PASSWORD', 'sba_dev_password_2024')→os.environ.get('POSTGRES_PASSWORD')so the password isNoneif the env var is unset, causing an immediate connection failure rather than silently using the stale dev credential.