GitHub Actions
745b9e3e97
fix(security): complete SSRF remediation with defense-in-depth (CWE-918)
Implement three-layer SSRF protection:
- Layer 1: URL pre-validation (existing)
- Layer 2: network.NewSafeHTTPClient() with connection-time IP validation
- Layer 3: Redirect target validation
New package: internal/network/safeclient.go
- IsPrivateIP(): Blocks RFC 1918, loopback, link-local (169.254.x.x),
reserved ranges, IPv6 private
- safeDialer(): DNS resolve → validate all IPs → dial validated IP
(prevents DNS rebinding/TOCTOU)
- NewSafeHTTPClient(): Functional options (WithTimeout, WithAllowLocalhost,
WithAllowedDomains, WithMaxRedirects)
Updated services:
- notification_service.go
- security_notification_service.go
- update_service.go
- crowdsec/registration.go (WithAllowLocalhost for LAPI)
- crowdsec/hub_sync.go (WithAllowedDomains for CrowdSec domains)
Consolidated duplicate isPrivateIP implementations to use network package.
Test coverage: 90.9% for network package
CodeQL: 0 SSRF findings (CWE-918 mitigated)
Closes #450
2025-12-24 17:34:56 +00:00
..
2025-12-12 19:21:44 +00:00
2025-12-15 07:30:35 +00:00
2025-12-21 04:08:42 +00:00
2025-12-23 16:32:19 +00:00
2025-12-23 16:32:19 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-12 19:21:44 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-12 19:21:44 +00:00
2025-12-12 19:21:44 +00:00
2025-12-12 19:21:44 +00:00
2025-12-23 23:17:49 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-12 00:05:15 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 05:46:03 +00:00
2025-12-20 20:37:16 +00:00
2025-12-24 14:35:33 +00:00
2025-12-20 01:55:52 +00:00
2025-12-14 02:45:24 +00:00
2025-12-15 07:30:35 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-24 03:53:35 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-12 19:21:44 +00:00
2025-12-20 15:19:06 +00:00
2025-12-12 19:21:44 +00:00
2025-12-15 07:30:35 +00:00
2025-12-12 19:21:44 +00:00
2025-12-23 01:59:21 +00:00
2025-12-22 04:03:04 +00:00
2025-12-17 20:00:44 +00:00
2025-12-23 05:46:44 +00:00
2025-12-15 07:30:35 +00:00
2025-12-20 05:46:03 +00:00
2025-12-20 01:55:52 +00:00
2025-12-23 06:52:19 +00:00
2025-12-20 05:46:03 +00:00
2025-12-12 19:21:44 +00:00
2025-12-21 21:04:13 +00:00
2025-12-23 23:17:49 +00:00
2025-12-20 01:55:52 +00:00
2025-12-24 17:34:56 +00:00
2025-12-20 01:55:52 +00:00
2025-12-14 02:03:38 +00:00
2025-12-23 15:09:22 +00:00
2025-12-21 21:04:13 +00:00
2025-12-20 01:55:52 +00:00
2025-12-14 02:45:24 +00:00
2025-12-14 02:45:24 +00:00
2025-12-15 07:30:35 +00:00
2025-12-20 01:55:52 +00:00
2025-12-20 01:55:52 +00:00
2025-12-23 17:10:12 +00:00