From 109063c705340f89749b4b4a126a4cc242d4a12d Mon Sep 17 00:00:00 2001 From: AIOSAI Date: Thu, 7 May 2026 17:20:21 -0700 Subject: [PATCH] feat(system): remove fake API key pattern from test fixture that triggered secret scanning Co-Authored-By: @devpulse --- src/aipass/api/tests/test_critical_paths.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/aipass/api/tests/test_critical_paths.py b/src/aipass/api/tests/test_critical_paths.py index 54521082..f676c7a7 100644 --- a/src/aipass/api/tests/test_critical_paths.py +++ b/src/aipass/api/tests/test_critical_paths.py @@ -40,7 +40,7 @@ class TestGetApiKey: secrets_dir.mkdir(parents=True) env_file = secrets_dir / ".env" env_file.write_text( - "OPENROUTER_API_KEY=sk-or-v1-NOTREAL-test-00000000000000000000000000\n", + "OPENROUTER_API_KEY=sk-or-v1-fake-test-key-do-not-use-aabbccdd0011\n", encoding="utf-8", ) @@ -48,7 +48,7 @@ class TestGetApiKey: mock_path_cls.home.return_value = tmp_path result = api_key.fetch_api_key("openrouter") - assert result == "sk-or-v1-NOTREAL-test-00000000000000000000000000" + assert result == "sk-or-v1-fake-test-key-do-not-use-aabbccdd0011" mock_jh.log_operation.assert_called_once() @patch("aipass.api.apps.handlers.auth.keys.json_handler") @@ -88,7 +88,7 @@ class TestValidateKey: def test_valid_openrouter_key(self): """Valid openrouter key with correct prefix and length passes.""" - key = "sk-or-v1-NOTREAL-test-000000000000000000000000000000000000" + key = "sk-or-v1-fake-test-key-do-not-use-aabbccdd00110000000000" assert api_key.fetch_validate_key(key, "openrouter") is True def test_key_too_short(self):