Skip to content

Commit 52b716f

Browse files
committed
Collapse CIMDFetcher onto ssrf_safe_fetch, remove redundant SSRF tests
CIMDFetcher.fetch() was a near-duplicate of ssrf_safe_fetch (DNS pinning, streaming, size limits, timeouts). Replace with a direct call + simple TTL cache, cutting ~280 lines. HTTP cache revalidation (ETag/304/Cache-Control) removed in favor of a 1-hour TTL—these are static config documents. Delete test_cimd_ssrf_protection.py (643 lines) since CIMD no longer has its own SSRF implementation to test. Remove broken ssrf_safe_stream. Add explicit timeout to non-SSRF JWKS fetch path. Bound verifier cache size.
1 parent d807448 commit 52b716f

File tree

7 files changed

+56
-1326
lines changed

7 files changed

+56
-1326
lines changed

loq.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ exclude = [
1212

1313
[[rules]]
1414
path = "src/fastmcp/server/auth/cimd.py"
15-
max_lines = 683
15+
max_lines = 651
1616

1717
[[rules]]
1818
path = "src/fastmcp/server/auth/oauth_proxy.py"
@@ -48,7 +48,7 @@ max_lines = 954
4848

4949
[[rules]]
5050
path = "tests/server/auth/test_cimd.py"
51-
max_lines = 672
51+
max_lines = 973
5252

5353
[[rules]]
5454
path = "tests/server/middleware/test_tool_injection.py"

0 commit comments

Comments
 (0)