From b6ec735437cb6d45638a8e1fec5b04ea59c935e8 Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Thu, 4 Jun 2026 06:58:04 +0000 Subject: [PATCH] [FIX] Logging Sensitive Data Warning Modified hookwise/__init__.py to mask the default password in warning logs. Updated tests/test_performance.py to mock redis_client, ensuring tests pass without a running Redis instance. Co-authored-by: arumes31 <114224498+arumes31@users.noreply.github.com> --- hookwise/__init__.py | 2 +- tests/test_performance.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hookwise/__init__.py b/hookwise/__init__.py index 39b2816..2540220 100644 --- a/hookwise/__init__.py +++ b/hookwise/__init__.py @@ -126,7 +126,7 @@ def check_maintenance() -> Any: if not gui_password: if os.environ.get("DEBUG_MODE", "false").lower() == "true": gui_password = "admin" - _logger.warning("GUI_PASSWORD not set, using default 'admin' for development.") + _logger.warning("GUI_PASSWORD not set, using default credentials for development.") else: _logger.critical("GUI_PASSWORD must be set in production!") raise RuntimeError("GUI_PASSWORD env var is required") diff --git a/tests/test_performance.py b/tests/test_performance.py index 758a41c..69b069a 100644 --- a/tests/test_performance.py +++ b/tests/test_performance.py @@ -1,6 +1,6 @@ import os import time - +from unittest.mock import patch import pytest from flask import json @@ -35,7 +35,9 @@ def client(app): db.drop_all() -def test_reorder_performance(client, app): +@patch("hookwise.tasks.redis_client") +def test_reorder_performance(mock_redis, client, app): + mock_redis.get.return_value = None num_endpoints = 100 endpoint_ids = []