Fix secret scanning issues: Replace hardcoded credentials with environment variables

This commit is contained in:
Gan, Jimmy
2025-06-24 09:50:24 +08:00
parent e3c9f17a5d
commit a5d979b948
4 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ from pathlib import Path
def get_db_url():
"""Get database URL from environment variables."""
db_user = os.getenv('DB_USER', 'mold_user')
db_password = os.getenv('DB_PASSWORD', 'mold_password')
db_password = os.getenv('DB_PASSWORD', 'your_db_password_here')
db_host = os.getenv('DB_HOST', 'localhost')
db_port = os.getenv('DB_PORT', '5434')
db_name = os.getenv('DB_NAME', 'mold_cost_calculator_dev')
+1 -1
View File
@@ -6,7 +6,7 @@ from pathlib import Path
def get_db_url():
"""Get database URL from environment variables."""
db_user = os.getenv('DB_USER', 'mold_user')
db_password = os.getenv('DB_PASSWORD', 'mold_password')
db_password = os.getenv('DB_PASSWORD', 'your_db_password_here')
db_host = os.getenv('DB_HOST', 'localhost')
db_port = os.getenv('DB_PORT', '5434')
db_name = os.getenv('DB_NAME', 'mold_cost_calculator_dev')