auto-claude: 2.6 - Replace hardcoded password in scripts/test_collaboration_matching.py with safe fallback

This commit is contained in:
Maciej Pienczyn 2026-01-10 12:54:39 +01:00
parent 914dac410e
commit c228716c0f

View File

@ -26,8 +26,11 @@ import sys
from datetime import datetime
# Set database URL for DEV environment
# WARNING: The fallback DATABASE_URL uses a placeholder password.
# Production credentials MUST be set via the DATABASE_URL environment variable.
# NEVER commit real credentials to version control (CWE-798).
if 'DATABASE_URL' not in os.environ:
os.environ['DATABASE_URL'] = 'postgresql://nordabiz_app:NordaBiz2025Secure@localhost:5433/nordabiz'
os.environ['DATABASE_URL'] = 'postgresql://nordabiz_app:CHANGE_ME@localhost:5433/nordabiz'
# Import after setting DATABASE_URL
from database import SessionLocal, Company, ITAudit, ITCollaborationMatch