Details
This prevents:
Internal network probing
AWS/GCP/Azure metadata access
localhost abuse
3. Enforce validation before thread creation
The validation must occur before initializing:
ThreadPublicIpAddress(...)
If validation fails:
Disable the plugin
Do not send any request
4. Trust boundary clarification
urlopen_auth() is a low-level utility
It should not be responsible for validation
The caller (IP plugin) must ensure:
Only safe, external URLs are passed
Why This Fix Works
Scheme validation blocks protocol-based attacks
IP validation blocks internal and cloud targets
Combined, they eliminate the SSRF attack surface while preserving legitimate use cases (public IP APIs)