auto-claude: 2.2 - Replace hardcoded password in run_migration.py with safe fallback and add warning comment
This commit is contained in:
parent
6e9f1a4e4d
commit
4cb505f21c
@ -15,7 +15,10 @@ if user_site not in sys.path:
|
||||
|
||||
# Use localhost for production (PostgreSQL only accepts local connections)
|
||||
# See CLAUDE.md: Scripts in scripts/ must use localhost (127.0.0.1) to connect
|
||||
DATABASE_URL = os.environ.get('DATABASE_URL', 'postgresql://nordabiz_app:NordaBiz2025Secure@127.0.0.1:5432/nordabiz')
|
||||
# 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).
|
||||
DATABASE_URL = os.environ.get('DATABASE_URL', 'postgresql://nordabiz_app:CHANGE_ME@127.0.0.1:5432/nordabiz')
|
||||
|
||||
try:
|
||||
import psycopg2
|
||||
|
||||
Loading…
Reference in New Issue
Block a user