Remove hardcoded fallback database password from db_engine.py #20

Open
opened 2026-02-20 06:49:38 +00:00 by cal · 1 comment
Owner

app/db_engine.py:21 — The PostgreSQL password fallback is sba_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 be None or raise if missing.

Priority: medium | Labels: security

`app/db_engine.py:21` — The PostgreSQL password fallback is `sba_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 be `None` or `raise` if missing. **Priority**: medium | **Labels**: security
cal added the
ai-working
label 2026-03-06 01:31:02 +00:00
cal removed the
ai-working
label 2026-03-06 01:33:49 +00:00
Author
Owner

Fixed in PR #55: #55

Changed os.environ.get('POSTGRES_PASSWORD', 'sba_dev_password_2024')os.environ.get('POSTGRES_PASSWORD') so the password is None if the env var is unset, causing an immediate connection failure rather than silently using the stale dev credential.

Fixed in PR #55: https://git.manticorum.com/cal/major-domo-database/pulls/55 Changed `os.environ.get('POSTGRES_PASSWORD', 'sba_dev_password_2024')` → `os.environ.get('POSTGRES_PASSWORD')` so the password is `None` if the env var is unset, causing an immediate connection failure rather than silently using the stale dev credential.
cal added the
ai-pr-opened
label 2026-03-06 01:33:55 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/major-domo-database#20
No description provided.