Commit c282017
committed
feat: add SSRF protection for df.http()
Add compile-time dataplane protection that blocks HTTP requests to
private/reserved IP ranges from the background worker. This prevents
malicious users from using df.http() to probe internal network services,
cloud metadata endpoints, or localhost services.
Implementation:
- New src/ssrf.rs module with IP blocklist (RFC 1918, loopback,
link-local, ULA) and custom DNS resolver (SsrfSafeResolver)
- Scheme validation: only http:// and https:// allowed
- IPv4-mapped IPv6 handling (::ffff:A.B.C.D)
- DNS rebinding protection via inline IP check before connect
- Cargo feature 'ssrf-protection' (default=on), no runtime bypass
- Audit logging: submitted_by and login_role on all HTTP requests
- New spec: docs/spec-ssrf-protection.md
Addresses threat T8 in spec-security-model.md.1 parent 9fde5f7 commit c282017
7 files changed
Lines changed: 766 additions & 7 deletions
File tree
- docs
- src
- activities
- orchestrations
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
0 commit comments