Skip to content

Commit ddc51ae

Browse files
bokelleyclaude
andcommitted
test(auth): replace base64 placeholder in non-bearer-scheme test
GitGuardian flagged the "Basic Z29vZDpnb29k" (base64 of "good:good") test fixture as a Base64 Basic Authentication secret. It's a test-only placeholder but valid base64 trips the generic-secret detector. Replaces with "Basic <placeholder>" — the test asserts only that non-Bearer schemes return 401, so the payload shape is irrelevant. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 19c57c0 commit ddc51ae

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/test_auth_middleware.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,10 +316,14 @@ def validator(token: str) -> Principal | None:
316316
async with httpx.AsyncClient(
317317
transport=httpx.ASGITransport(app=app), base_url="http://test"
318318
) as client:
319+
# Placeholder non-bearer header — specific value is irrelevant,
320+
# we only check the scheme gate rejects anything that isn't
321+
# "Bearer". Kept as obvious placeholder text so secret scanners
322+
# don't flag a real-looking base64 payload.
319323
resp = await client.post(
320324
"/",
321325
json={"method": "tools/call", "params": {"name": "get_products"}},
322-
headers={"Authorization": "Basic Z29vZDpnb29k"},
326+
headers={"Authorization": "Basic <placeholder>"},
323327
)
324328
assert resp.status_code == 401
325329

0 commit comments

Comments
 (0)