ssrf
diapason.security.ssrf
¶
SSRF protection — block requests to private IPs and cloud metadata endpoints.
check_ssrf(url)
¶
Check a URL for SSRF vulnerabilities.
Prefers the Rust backend, but falls back to the pure-Python
implementation when the compiled extension is unavailable. The SSRF
guard is security-critical, so it must never be silently skipped — or
crash with ImportError — merely because Rust was not built.
is_private_ip(ip_str)
¶
Check if an IP address is private/reserved.