MCPcopy Index your code
hub / github.com/codeaashu/claude-code / isBlockedAddress

Function isBlockedAddress

src/utils/hooks/ssrfGuard.ts:42–53  ·  view source on GitHub ↗
(address: string)

Source from the content-addressed store, hash-verified

40 * everything else
41 */
42export function isBlockedAddress(address: string): boolean {
43 const v = isIP(address)
44 if (v === 4) {
45 return isBlockedV4(address)
46 }
47 if (v === 6) {
48 return isBlockedV6(address)
49 }
50 // Not a valid IP literal — let the real DNS path handle it (this function
51 // is only called on results from dns.lookup, which always returns valid IPs)
52 return false
53}
54
55function isBlockedV4(address: string): boolean {
56 const parts = address.split('.').map(Number)

Callers 1

ssrfGuardedLookupFunction · 0.85

Calls 2

isBlockedV4Function · 0.85
isBlockedV6Function · 0.85

Tested by

no test coverage detected