From fa987d7ea3e8dd81b8176ad02b8a4f0f8bbc631c Mon Sep 17 00:00:00 2001 From: busya Date: Tue, 13 Oct 2026 10:11:13 +0300 Subject: [PATCH] chore(security): adopt standard gitleaks scan --- .env.example | 2 +- .gitleaks.toml | 51 +++++++++++++++++++ .../api/routes/__tests__/test_profile_api.py | 4 +- .../translate/__tests__/test_preview.py | 2 +- .../scripts/seed_scenario_disposition_e2e.py | 2 +- backend/tests/api/test_admin.py | 2 +- backend/tests/api/test_environments_stats.py | 2 +- backend/tests/api/test_scenario_runs_api.py | 2 +- .../tests/core/test_core_config_manager.py | 2 +- backend/tests/core/test_encryption.py | 2 +- backend/tests/integration/fixtures/pki.py | 2 +- .../test_maintenance_lifecycle_e2e.py | 2 +- .../tests/scripts/test_clean_release_tui.py | 16 +++--- .../scripts/test_clean_release_tui_v2.py | 12 ++--- .../dashboard_testing/registry/conftest.py | 2 +- .../registry/test_due_admission_atomicity.py | 2 +- .../registry/test_scenario_runner_walker.py | 6 +-- .../test_security_ops_offline.py | 2 +- backend/tests/services/test_llm_provider.py | 2 +- .../test_profile_preference_service.py | 2 +- backend/tests/test_endpoint_locality.py | 2 +- backend/tests/test_security_orthogonal.py | 2 +- .../src/lib/api/__tests__/reports2.test.ts | 2 +- 23 files changed, 88 insertions(+), 37 deletions(-) create mode 100644 .gitleaks.toml diff --git a/.env.example b/.env.example index 55dc1838c..30d3898b2 100644 --- a/.env.example +++ b/.env.example @@ -40,7 +40,7 @@ FRONTEND_SSL_PORT=443 AUTH_SECRET_KEY=change-me-to-a-random-secret-32-chars-min # Fernet-ключ шифрования паролей подключений и API-ключей. # Сгенерировать: python3 -c "import base64,os; print(base64.urlsafe_b64encode(os.urandom(32)).decode())" -ENCRYPTION_KEY=D40dpvWPZxKd41jeaTHtEs2R7nwMVLxbkMRLjAICRls= +ENCRYPTION_KEY=GENERATE_WITH_RUN_SH # Сервисный токен для agent→backend вызовов. # Сгенерировать: python3 -c "import secrets; print('svc-' + secrets.token_urlsafe(24))" SERVICE_JWT=replace-with-random-service-secret diff --git a/.gitleaks.toml b/.gitleaks.toml new file mode 100644 index 000000000..65cf33858 --- /dev/null +++ b/.gitleaks.toml @@ -0,0 +1,51 @@ +title = "ss-tools tracked source secret scan" +minVersion = "8.30.0" + +[extend] +useDefault = true + +# These are named synthetic JSON fixtures. The rule, file, and field context +# must all match; similarly named fields in production files remain scanned. +[[allowlists]] +description = "Synthetic dashboard-testing JSON fixture fields" +targetRules = ["generic-api-key"] +condition = "AND" +regexTarget = "line" +paths = [ + '''(?:^|.*/)backend/tests/fixtures/dashboard_scenarios/admitted_v2_actual_docker\.json$''', + '''(?:^|.*/)frontend/src/routes/dashboard-testing/scenarios/\[id\]/runs/\[runId\]/__tests__/fixtures/actual-mutated-run\.json$''', + '''(?:^|.*/)specs/033-gradio-agent-chat/fixtures/api/service_token_valid\.json$''', + '''(?:^|.*/)specs/038-dashboard-scenario-model/fixtures/api/scenario_(?:cycle|missing_ref)\.json$''', +] +regexes = [ + '''"(?:idempotency_key|raw_base64|scenario_key|step_key|service_secret|access_token)"\s*:''', +] + +# Public quickstart commands intentionally use a literal placeholder, never a +# credential. Keep the exception tied to the auth-header rule and those lines. +[[allowlists]] +description = "Quickstart curl Authorization placeholder" +targetRules = ["curl-auth-header"] +condition = "AND" +regexTarget = "line" +paths = [ + '''(?:^|.*/)specs/008-migration-ui-improvements/quickstart\.md$''', +] +regexes = [ + '''(?i)Authorization:\s*Bearer\s+YOUR_TOKEN(?:\s|['"\\]|$)''', +] + +# Generated LiteLLM OpenAPI descriptions contain public example tokens. Only +# allow the known placeholder/sample forms within this generated documentation; +# an arbitrary Authorization value still fails the default rule. +[[allowlists]] +description = "Generated LiteLLM OpenAPI documented auth samples" +targetRules = ["curl-auth-header"] +condition = "AND" +regexTarget = "secret" +paths = [ + '''(?:^|.*/)docs/openapi/litellm/openapi\.json$''', +] +regexes = [ + '''(?i)^(?:YOUR_TOKEN|YOUR[_ -]?(?:API[_ -]?)?KEY|<[^>]+>|sk-(?:1234|12345|\.\.\.)|token|[A-Z][a-z]{7}-[0-9]{4})$''', +] diff --git a/backend/src/api/routes/__tests__/test_profile_api.py b/backend/src/api/routes/__tests__/test_profile_api.py index 78becb4b2..43370e67a 100644 --- a/backend/src/api/routes/__tests__/test_profile_api.py +++ b/backend/src/api/routes/__tests__/test_profile_api.py @@ -143,7 +143,7 @@ def test_patch_profile_preferences_success(profile_route_deps_fixture): "show_only_slug_dashboards": True, "git_username": "ivan.ivanov", "git_email": "ivan@company.local", - "git_personal_access_token": "ghp_1234567890", + "git_personal_access_token": "ghp_1234567890", # gitleaks:allow "start_page": "reports-logs", "auto_open_task_drawer": False, "dashboards_table_density": "free", @@ -165,7 +165,7 @@ def test_patch_profile_preferences_success(profile_route_deps_fixture): assert called_kwargs["current_user"] == mock_user assert called_kwargs["payload"].git_username == "ivan.ivanov" assert called_kwargs["payload"].git_email == "ivan@company.local" - assert called_kwargs["payload"].git_personal_access_token == "ghp_1234567890" + assert called_kwargs["payload"].git_personal_access_token == "ghp_1234567890" # gitleaks:allow assert called_kwargs["payload"].show_only_slug_dashboards is True assert called_kwargs["payload"].start_page == "reports-logs" assert called_kwargs["payload"].auto_open_task_drawer is False diff --git a/backend/src/plugins/translate/__tests__/test_preview.py b/backend/src/plugins/translate/__tests__/test_preview.py index 2f8a95f16..7498d9a4a 100644 --- a/backend/src/plugins/translate/__tests__/test_preview.py +++ b/backend/src/plugins/translate/__tests__/test_preview.py @@ -50,7 +50,7 @@ def _make_mock_provider(**overrides): provider.provider_type = overrides.get("provider_type", "openai") provider.base_url = overrides.get("base_url", "https://api.openai.com/v1") provider.default_model = overrides.get("default_model", "gpt-4o-mini") - provider.api_key = "encrypted-key-123" + provider.api_key = "encrypted-key-123" # gitleaks:allow return provider # endregion Test.Tests.MakeMockProvider diff --git a/backend/src/scripts/seed_scenario_disposition_e2e.py b/backend/src/scripts/seed_scenario_disposition_e2e.py index 2c561bdc1..d69aaa54a 100644 --- a/backend/src/scripts/seed_scenario_disposition_e2e.py +++ b/backend/src/scripts/seed_scenario_disposition_e2e.py @@ -68,7 +68,7 @@ def seed() -> None: environment_id="e2e", status="failed", phase="completed", - idempotency_key="e2e-scenario-disposition-run", + idempotency_key="e2e-scenario-disposition-run", # gitleaks:allow target_snapshot={"dashboard_id": 47001}, )) artifact = db.get(ScenarioArtifact, ARTIFACT_ID) diff --git a/backend/tests/api/test_admin.py b/backend/tests/api/test_admin.py index 25e34d2d5..839623baf 100644 --- a/backend/tests/api/test_admin.py +++ b/backend/tests/api/test_admin.py @@ -240,7 +240,7 @@ class TestUpdateUser: with patch("src.api.routes.admin.AuthRepository", return_value=mock_repo): client = _make_client({get_auth_db: lambda: mock_session}) resp = client.put("/api/admin/users/user-1", json={ - "password": "NewStrongPass1", + "password": "NewStrongPass1", # gitleaks:allow "is_active": False, }) assert resp.status_code == 200 diff --git a/backend/tests/api/test_environments_stats.py b/backend/tests/api/test_environments_stats.py index 419daacd8..ffc58fd06 100644 --- a/backend/tests/api/test_environments_stats.py +++ b/backend/tests/api/test_environments_stats.py @@ -12,7 +12,7 @@ import os os.environ.setdefault("DATABASE_URL", "sqlite:///:memory:") os.environ.setdefault("AUTH_DATABASE_URL", "sqlite:///:memory:") os.environ.setdefault("SECRET_KEY", "test-secret-key-for-tests") -os.environ.setdefault("ENCRYPTION_KEY", "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=") +os.environ.setdefault("ENCRYPTION_KEY", "MDEyMzQ1Njc4OWFiY2RlZjAxMjM0NTY3ODlhYmNkZWY=") # gitleaks:allow import sys from pathlib import Path diff --git a/backend/tests/api/test_scenario_runs_api.py b/backend/tests/api/test_scenario_runs_api.py index 6ea56a756..286fe4a59 100644 --- a/backend/tests/api/test_scenario_runs_api.py +++ b/backend/tests/api/test_scenario_runs_api.py @@ -175,7 +175,7 @@ def _seed(session) -> None: return __import__("datetime").datetime.fromisoformat(value.replace("Z", "+00:00")) session.add(ScenarioRegistryEntry( - scenario_id=_SCENARIO, scenario_key="fi-0080_execution-fixture", name="Execution fixture", + scenario_id=_SCENARIO, scenario_key="fi-0080_execution-fixture", name="Execution fixture", # gitleaks:allow description="canonical", dashboard_id=80, environment_ids=["env-preprod-02"], # Owned by the non-admin RUN/RUN_PROD principal used by _user_with, so the object ACL lets # the PROD-gate tests exercise 403/approval instead of collapsing to a 404 foreign run. diff --git a/backend/tests/core/test_core_config_manager.py b/backend/tests/core/test_core_config_manager.py index c46c23a3e..b994ca32a 100644 --- a/backend/tests/core/test_core_config_manager.py +++ b/backend/tests/core/test_core_config_manager.py @@ -16,7 +16,7 @@ import pytest from src.core.config_models import AppConfig, Environment, FeaturesConfig, GlobalSettings # Hardcoded fixture — frozen Fernet key for deterministic encryption tests. -_VALID_FERNET_KEY = "MldUHg5kwSAcPnnYxmhWDS6ASb6e_bWQRV5gtwHrjQ0=" +_VALID_FERNET_KEY = "MldUHg5kwSAcPnnYxmhWDS6ASb6e_bWQRV5gtwHrjQ0=" # gitleaks:allow _MODULE = "src.core.config_manager" diff --git a/backend/tests/core/test_encryption.py b/backend/tests/core/test_encryption.py index 490d0a2de..56ea0f815 100644 --- a/backend/tests/core/test_encryption.py +++ b/backend/tests/core/test_encryption.py @@ -16,7 +16,7 @@ import pytest # Hardcoded valid Fernet key — generated once, frozen as fixture. # 32 url-safe base64 bytes. Never recompute at test time (anti-tautology). -_VALID_FERNET_KEY = "MldUHg5kwSAcPnnYxmhWDS6ASb6e_bWQRV5gtwHrjQ0=" +_VALID_FERNET_KEY = "MldUHg5kwSAcPnnYxmhWDS6ASb6e_bWQRV5gtwHrjQ0=" # gitleaks:allow # ── _require_fernet_key ───────────────────────────────────────────────────── diff --git a/backend/tests/integration/fixtures/pki.py b/backend/tests/integration/fixtures/pki.py index f6e2f023e..5630ae4c7 100644 --- a/backend/tests/integration/fixtures/pki.py +++ b/backend/tests/integration/fixtures/pki.py @@ -128,7 +128,7 @@ def ca_chain(): ) fullchain = server_crt + "\n" + intermediate_crt - server_key_passphrase = "test-passphrase-12345" + server_key_passphrase = "test-passphrase-12345" # gitleaks:allow server_key_encrypted = server_key.private_bytes( encoding=serialization.Encoding.PEM, format=serialization.PrivateFormat.TraditionalOpenSSL, diff --git a/backend/tests/integration/test_maintenance_lifecycle_e2e.py b/backend/tests/integration/test_maintenance_lifecycle_e2e.py index 292d66e77..b5e26057f 100644 --- a/backend/tests/integration/test_maintenance_lifecycle_e2e.py +++ b/backend/tests/integration/test_maintenance_lifecycle_e2e.py @@ -40,7 +40,7 @@ # - _process_states_for_end() — removes chart and restores layout # # @REJECTED -# Calling the API route directly rejected — requires TaskManager auth, JWT/permission setup, +# Calling the API route directly rejected — requires TaskManager auth, JWT/permission setup, gitleaks:allow # and async TaskManager processing which adds ~30s per test without additional coverage. # Mocking SupersetClient rejected — would test the orchestrator's SQL logic but not the # actual Superset API integration. diff --git a/backend/tests/scripts/test_clean_release_tui.py b/backend/tests/scripts/test_clean_release_tui.py index 99fb4d014..8b84d6b14 100644 --- a/backend/tests/scripts/test_clean_release_tui.py +++ b/backend/tests/scripts/test_clean_release_tui.py @@ -54,8 +54,8 @@ def test_tui_initial_render(mock_curses_module, mock_stdscr: MagicMock): titles, headers, footers and the READY state are drawn appropriately. """ # Ensure constants match - mock_curses_module.KEY_F10 = curses.KEY_F10 - mock_curses_module.KEY_F5 = curses.KEY_F5 + mock_curses_module.KEY_F10 = curses.KEY_F10 # gitleaks:allow + mock_curses_module.KEY_F5 = curses.KEY_F5 # gitleaks:allow mock_curses_module.color_pair.side_effect = lambda x: x mock_curses_module.A_BOLD = 0 @@ -90,8 +90,8 @@ def test_tui_run_checks_f5(mock_curses_module, mock_stdscr: MagicMock): Simulates pressing F5 to transition into the RUNNING checks flow. """ # Ensure constants match - mock_curses_module.KEY_F10 = curses.KEY_F10 - mock_curses_module.KEY_F5 = curses.KEY_F5 + mock_curses_module.KEY_F10 = curses.KEY_F10 # gitleaks:allow + mock_curses_module.KEY_F5 = curses.KEY_F5 # gitleaks:allow mock_curses_module.color_pair.side_effect = lambda x: x mock_curses_module.A_BOLD = 0 @@ -129,7 +129,7 @@ def test_tui_exit_f10(mock_curses_module, mock_stdscr: MagicMock): Simulates pressing F10 to exit the application immediately without running checks. """ # Ensure constants match - mock_curses_module.KEY_F10 = curses.KEY_F10 + mock_curses_module.KEY_F10 = curses.KEY_F10 # gitleaks:allow app = CleanReleaseTUI(mock_stdscr) mock_stdscr.getch.return_value = curses.KEY_F10 @@ -149,8 +149,8 @@ def test_tui_clear_history_f7(mock_curses_module, mock_stdscr: MagicMock): """ Simulates pressing F7 to clear history. """ - mock_curses_module.KEY_F10 = curses.KEY_F10 - mock_curses_module.KEY_F7 = curses.KEY_F7 + mock_curses_module.KEY_F10 = curses.KEY_F10 # gitleaks:allow + mock_curses_module.KEY_F7 = curses.KEY_F7 # gitleaks:allow mock_curses_module.color_pair.side_effect = lambda x: x mock_curses_module.A_BOLD = 0 @@ -183,7 +183,7 @@ def test_tui_real_mode_bootstrap_imports_artifacts_catalog( """ @TEST_CONTRACT: bootstrap.json + artifacts.json -> candidate PREPARED with imported artifacts """ - mock_curses_module.KEY_F10 = curses.KEY_F10 + mock_curses_module.KEY_F10 = curses.KEY_F10 # gitleaks:allow mock_curses_module.color_pair.side_effect = lambda x: x mock_curses_module.A_BOLD = 0 diff --git a/backend/tests/scripts/test_clean_release_tui_v2.py b/backend/tests/scripts/test_clean_release_tui_v2.py index 1cbe6af2c..590be3ae8 100644 --- a/backend/tests/scripts/test_clean_release_tui_v2.py +++ b/backend/tests/scripts/test_clean_release_tui_v2.py @@ -33,8 +33,8 @@ def _build_mock_stdscr() -> MagicMock: # @PURPOSE: Verify F5 key dispatch invokes run_checks exactly once before graceful exit. def test_tui_f5_dispatches_run_action(mock_curses_module: MagicMock) -> None: """F5 should dispatch run action from TUI loop.""" - mock_curses_module.KEY_F10 = curses.KEY_F10 - mock_curses_module.KEY_F5 = curses.KEY_F5 + mock_curses_module.KEY_F10 = curses.KEY_F10 # gitleaks:allow + mock_curses_module.KEY_F5 = curses.KEY_F5 # gitleaks:allow mock_curses_module.color_pair.side_effect = lambda value: value mock_curses_module.A_BOLD = 0 @@ -57,8 +57,8 @@ def test_tui_f5_dispatches_run_action(mock_curses_module: MagicMock) -> None: # @PURPOSE: Verify blocked compliance state is surfaced after F5-triggered run action. def test_tui_f5_run_smoke_reports_blocked_state(mock_curses_module: MagicMock) -> None: """F5 smoke test should expose blocked outcome state after run action.""" - mock_curses_module.KEY_F10 = curses.KEY_F10 - mock_curses_module.KEY_F5 = curses.KEY_F5 + mock_curses_module.KEY_F10 = curses.KEY_F10 # gitleaks:allow + mock_curses_module.KEY_F5 = curses.KEY_F5 # gitleaks:allow mock_curses_module.color_pair.side_effect = lambda value: value mock_curses_module.A_BOLD = 0 @@ -105,8 +105,8 @@ def test_tui_non_tty_refuses_startup(capsys) -> None: # @PURPOSE: Verify F8 path reports disabled action instead of mutating hidden facade state. def test_tui_f8_blocked_without_facade_binding(mock_curses_module: MagicMock) -> None: """F8 should not perform hidden state mutation when facade action is not bound.""" - mock_curses_module.KEY_F10 = curses.KEY_F10 - mock_curses_module.KEY_F8 = curses.KEY_F8 + mock_curses_module.KEY_F10 = curses.KEY_F10 # gitleaks:allow + mock_curses_module.KEY_F8 = curses.KEY_F8 # gitleaks:allow mock_curses_module.color_pair.side_effect = lambda value: value mock_curses_module.A_BOLD = 0 diff --git a/backend/tests/services/dashboard_testing/registry/conftest.py b/backend/tests/services/dashboard_testing/registry/conftest.py index b1a903987..4bbbb790c 100644 --- a/backend/tests/services/dashboard_testing/registry/conftest.py +++ b/backend/tests/services/dashboard_testing/registry/conftest.py @@ -400,7 +400,7 @@ def seed_execution_fixture(db: Session) -> None: entry = ScenarioRegistryEntry( scenario_id=_EXEC_SCENARIO_ID, - scenario_key="fi-0080_execution-fixture", + scenario_key="fi-0080_execution-fixture", # gitleaks:allow name="FI-0080 Execution fixture", description="Canonical 044 executable graph + run states", dashboard_id=80, diff --git a/backend/tests/services/dashboard_testing/registry/test_due_admission_atomicity.py b/backend/tests/services/dashboard_testing/registry/test_due_admission_atomicity.py index f11267176..ed67cff15 100644 --- a/backend/tests/services/dashboard_testing/registry/test_due_admission_atomicity.py +++ b/backend/tests/services/dashboard_testing/registry/test_due_admission_atomicity.py @@ -344,7 +344,7 @@ def test_pending_approval_run_is_not_dispatched_until_gate_approval(registry_ses params={}, environment_id="prod", actor="ops.oncall-046", - idempotency_key="due-admission-approval-046", + idempotency_key="due-admission-approval-046", # gitleaks:allow trigger_source="scheduled", ) registry_session.commit() diff --git a/backend/tests/services/dashboard_testing/registry/test_scenario_runner_walker.py b/backend/tests/services/dashboard_testing/registry/test_scenario_runner_walker.py index f5743c3dc..3a5652cc5 100644 --- a/backend/tests/services/dashboard_testing/registry/test_scenario_runner_walker.py +++ b/backend/tests/services/dashboard_testing/registry/test_scenario_runner_walker.py @@ -340,7 +340,7 @@ def test_assertion_pass_records_policy_decision(seeded_execution): {}, "env-preprod-02", actor="test-walker", - idempotency_key="walker-policy-001", + idempotency_key="walker-policy-001", # gitleaks:allow auto_advance=False, ) run.runner_plan = _action_plan("policy-assert-044", "assertion", "compare_to_baseline") @@ -380,7 +380,7 @@ def test_required_evidence_integrity_becomes_blocked(seeded_execution): {}, "env-preprod-02", actor="test-walker", - idempotency_key="walker-policy-002", + idempotency_key="walker-policy-002", # gitleaks:allow auto_advance=False, ) run.runner_plan = _action_plan("shot-integrity-044", "screenshot", "capture_screenshot") @@ -498,7 +498,7 @@ def test_walker_required_missing_adapter_unavailable(seeded_execution): {}, "env-preprod-02", actor="test-walker", - idempotency_key="walker-eval-missing-001", + idempotency_key="walker-eval-missing-001", # gitleaks:allow auto_advance=False, ) run.runner_plan = _required_eval_plan("eval-missing-044") diff --git a/backend/tests/services/dashboard_testing/test_security_ops_offline.py b/backend/tests/services/dashboard_testing/test_security_ops_offline.py index 4863b2af3..247b05f16 100644 --- a/backend/tests/services/dashboard_testing/test_security_ops_offline.py +++ b/backend/tests/services/dashboard_testing/test_security_ops_offline.py @@ -107,7 +107,7 @@ def test_persist_raw_response_redacts_credentials_and_pii(tmp_path: Path) -> Non raw = { "model": "vlm-1", "message": "checked", - "notes": "password=hunter2 api_key=sk-1234567890abcdefgh token=abcdef1234567890", + "notes": "password=hunter2 api_key=sk-1234567890abcdefgh token=abcdef1234567890", # gitleaks:allow "contact": "analyst@corp.example", "findings": [{"criterion_id": "c1", "status": "pass"}], } diff --git a/backend/tests/services/test_llm_provider.py b/backend/tests/services/test_llm_provider.py index f306cc668..cb8e4cadd 100644 --- a/backend/tests/services/test_llm_provider.py +++ b/backend/tests/services/test_llm_provider.py @@ -8,7 +8,7 @@ import sys sys.path.insert(0, str(Path(__file__).parent.parent / "src")) import os -os.environ.setdefault("ENCRYPTION_KEY", "MldUHg5kwSAcPnnYxmhWDS6ASb6e_bWQRV5gtwHrjQ0=") +os.environ.setdefault("ENCRYPTION_KEY", "MldUHg5kwSAcPnnYxmhWDS6ASb6e_bWQRV5gtwHrjQ0=") # gitleaks:allow from unittest.mock import MagicMock, patch import pytest diff --git a/backend/tests/services/test_profile_preference_service.py b/backend/tests/services/test_profile_preference_service.py index 0978483c2..048540131 100644 --- a/backend/tests/services/test_profile_preference_service.py +++ b/backend/tests/services/test_profile_preference_service.py @@ -16,7 +16,7 @@ import pytest # Set ENCRYPTION_KEY before importing anything that uses EncryptionManager import os os.environ.setdefault("SECRET_KEY", "test-secret-key-for-testing") -os.environ.setdefault("ENCRYPTION_KEY", "MldUHg5kwSAcPnnYxmhWDS6ASb6e_bWQRV5gtwHrjQ0=") +os.environ.setdefault("ENCRYPTION_KEY", "MldUHg5kwSAcPnnYxmhWDS6ASb6e_bWQRV5gtwHrjQ0=") # gitleaks:allow from src.schemas.profile import ProfilePreferenceUpdateRequest diff --git a/backend/tests/test_endpoint_locality.py b/backend/tests/test_endpoint_locality.py index 214fd11f7..950509bf3 100644 --- a/backend/tests/test_endpoint_locality.py +++ b/backend/tests/test_endpoint_locality.py @@ -165,7 +165,7 @@ def test_extra_local_suffixes_extendible(monkeypatch): # @RELATION BINDS_TO -> [Services.LlmProvider.CreateProvider] def _config(base_url: str) -> MagicMock: os.environ.setdefault( - "ENCRYPTION_KEY", "MldUHg5kwSAcPnnYxmhWDS6ASb6e_bWQRV5gtwHrjQ0=" + "ENCRYPTION_KEY", "MldUHg5kwSAcPnnYxmhWDS6ASb6e_bWQRV5gtwHrjQ0=" # gitleaks:allow ) config = MagicMock() config.name = "Perimeter Test" diff --git a/backend/tests/test_security_orthogonal.py b/backend/tests/test_security_orthogonal.py index 0a6f26f91..7ca012769 100644 --- a/backend/tests/test_security_orthogonal.py +++ b/backend/tests/test_security_orthogonal.py @@ -536,7 +536,7 @@ class TestLogMasking: masked = _mask_details({ "username": "john", "password": "supersecret", - "token": "eyJhbGciOiJIUzI1NiJ9.xxx", + "token": "eyJhbGciOiJIUzI1NiJ9.xxx", # gitleaks:allow "api_key": "ssk_abc123", "source": "LOCAL", }) diff --git a/frontend/src/lib/api/__tests__/reports2.test.ts b/frontend/src/lib/api/__tests__/reports2.test.ts index 91cef41aa..48eabc2fb 100644 --- a/frontend/src/lib/api/__tests__/reports2.test.ts +++ b/frontend/src/lib/api/__tests__/reports2.test.ts @@ -5,7 +5,7 @@ // @TEST_CONTRACT: getReportsSummary -> GET /reports/summary via api.fetchApi // @TEST_CONTRACT: getReportsSettings -> GET /settings/reports via api.fetchApi // @TEST_CONTRACT: updateReportsSettings -> PUT /settings/reports via api.requestApi -// @TEST_EDGE: api_error -> fetchApi/rejection propagates normalized error +// @TEST_EDGE: api_error -> fetchApi/rejection propagates normalized error gitleaks:allow // @TEST_EDGE: settings_update -> requestApi with payload and method import { describe, it, expect, vi, beforeEach } from 'vitest';