Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
Python agentaianthropicclaude-codecompressioncontext-engineeringcontext-windowcursorfastapilangchainllmmcpopenaiprompt-engineeringproxypythonragtoken-optimizationtokenstypescript
fix(security): allowlist GitGuardian-flagged test fixtures
chopratejascf5a71571c85
diff --git a/.gitguardian.yaml b/.gitguardian.yamlnew file mode 100644index 000000000..adc4cb33a--- /dev/null+++ b/.gitguardian.yaml@@ -0,0 +1,34 @@+# GitGuardian configuration — secret-detection allowlist+#+# Two entries below are test fixtures, NOT real credentials. They live in+# tests that exercise our own detectors (volatile-content scanner, auth-mode+# classifier) — by definition we have to embed plausible-looking tokens to+# verify the detectors recognise them. The strings are syntactically valid+# but carry no privilege against any real service.+#+# Anything else GitGuardian flags should be treated as a real incident: do+# NOT extend this allowlist without verifying the secret is unauthenticated+# fixture data, and rotate any genuine leaks before adding the row.++version: 2++secret:+ ignored-matches:+ # Canonical fake JWT used across the JS/Python ecosystem to demonstrate+ # JWT-shaped strings. Header `{"alg":"HS256"}`, payload `{"sub":"1"}`.+ # We use it to verify our `detect_volatile_content` recogniser flags JWTs.+ # File: tests/test_cache_aligner_detector_only.py+ - name: "fake JWT in volatile-content detector test"+ match: "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"++ # Anthropic-shaped strings whose payloads literally contain the word+ # "fixture" — used in `test_realignment_live_multi_turn` to assert the+ # auth-mode classifier routes PAYG / OAuth / subscription headers+ # correctly. No live API call is ever made with these tokens.+ # File: tests/test_realignment_live_multi_turn.py+ - name: "Anthropic-shaped fixture token (PAYG via x-api-key)"+ match: "sk-ant-api03-payg-fixture"+ - name: "Anthropic-shaped fixture token (OAuth bearer)"+ match: "sk-ant-oat01-oauth-fixture"+ - name: "Anthropic-shaped fixture token (PAYG via bearer)"+ match: "sk-ant-api03-payg-bearer-fixture"diff --git a/tests/test_cache_aligner_detector_only.py b/tests/test_cache_aligner_detector_only.pyindex 9ea0eba44..5001a5b46 100644--- a/tests/test_cache_aligner_detector_only.py+++ b/tests/test_cache_aligner_detector_only.py@@ -212,7 +212,8 @@ def test_detect_volatile_content_iso_date() -> None:def test_detect_volatile_content_jwt() -> None:- jwt = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"+ # ggignore: canonical fake JWT, payload {"sub":"1"}, no privilege.+ jwt = "eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiIxIn0.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c" # noqa: S105findings = detect_volatile_content(f"Token: {jwt}")labels = [f.label for f in findings]assert "jwt" in labelsdiff --git a/tests/test_realignment_live_multi_turn.py b/tests/test_realignment_live_multi_turn.pyindex a0b2299e9..b3ff95f2e 100644--- a/tests/test_realignment_live_multi_turn.py+++ b/tests/test_realignment_live_multi_turn.py@@ -1085,30 +1085,33 @@ def test_classify_auth_mode_routes_payg_vs_oauth(proxy_client: TestClient) -> No}# 1) PAYG via x-api-key+ # ggignore: synthetic auth-mode classifier fixture (no live API call).proxy_client.post("/v1/messages",headers={- "x-api-key": "sk-ant-api03-payg-fixture",+ "x-api-key": "sk-ant-api03-payg-fixture", # noqa: S105"anthropic-version": LIVE_CONFIG["anthropic_version"],"content-type": "application/json",},json=common_body,)# 2) OAuth via sk-ant-oat01- bearer+ # ggignore: synthetic auth-mode classifier fixture (no live API call).proxy_client.post("/v1/messages",headers={- "authorization": "Bearer sk-ant-oat01-oauth-fixture",+ "authorization": "Bearer sk-ant-oat01-oauth-fixture", # noqa: S105"anthropic-version": LIVE_CONFIG["anthropic_version"],"content-type": "application/json",},json=common_body,)# 3) PAYG via sk-ant-api03- bearer (some clients send it this way)+ # ggignore: synthetic auth-mode classifier fixture (no live API call).proxy_client.post("/v1/messages",headers={- "authorization": "Bearer sk-ant-api03-payg-bearer-fixture",+ "authorization": "Bearer sk-ant-api03-payg-bearer-fixture", # noqa: S105"anthropic-version": LIVE_CONFIG["anthropic_version"],"content-type": "application/json",},