MVP-0.3 · SSRF guard (net_guard) for git, LiveUrl, DAST and ICS #256

Closed
opened 2026-09-20 20:16:02 +00:00 by sharang · 0 comments
Owner

Goal

There is no SSRF guard anywhere in the product. A customer can point a git URL, a LiveUrl, a DAST target or an ICS endpoint at loopback, the private network, link-local, a cloud metadata service or a cluster-internal name, and the agent will connect from inside our infrastructure. A single shared guard in compliance-core closes this for every path at once.

What to change

  • Add a shared net_guard in compliance-core that denies loopback, private, link-local, metadata and cluster-internal addresses.
  • Resolve DNS before connecting and validate the resolved address, so a rebinding name cannot slip through.
  • Apply it to git URLs, LiveUrl, DAST targets and ICS endpoints (handlers/dast.rs:86-95, orchestrator.rs:774-780).

Acceptance

  • Unit tests cover private, loopback, link-local, metadata (169.254.169.254) and cluster-internal addresses, plus a DNS-rebinding case where the hostname resolves to a private address.
  • Every outbound target the user controls (git clone, LiveUrl, DAST, ICS) passes through net_guard before a connection is opened.
  • A rejected target produces a clear user-visible error, not a silent scan failure.
  • Included in the manual isolation/SSRF test pass against stage (MVP-5.1, extending tests/stage/07_isolation.sh).
## Goal There is no SSRF guard anywhere in the product. A customer can point a git URL, a LiveUrl, a DAST target or an ICS endpoint at loopback, the private network, link-local, a cloud metadata service or a cluster-internal name, and the agent will connect from inside our infrastructure. A single shared guard in `compliance-core` closes this for every path at once. ## What to change - Add a shared `net_guard` in `compliance-core` that denies loopback, private, link-local, metadata and cluster-internal addresses. - Resolve DNS before connecting and validate the resolved address, so a rebinding name cannot slip through. - Apply it to git URLs, LiveUrl, DAST targets and ICS endpoints (`handlers/dast.rs:86-95`, `orchestrator.rs:774-780`). ## Acceptance - [ ] Unit tests cover private, loopback, link-local, metadata (`169.254.169.254`) and cluster-internal addresses, plus a DNS-rebinding case where the hostname resolves to a private address. - [ ] Every outbound target the user controls (git clone, LiveUrl, DAST, ICS) passes through `net_guard` before a connection is opened. - [ ] A rejected target produces a clear user-visible error, not a silent scan failure. - [ ] Included in the manual isolation/SSRF test pass against stage (MVP-5.1, extending `tests/stage/07_isolation.sh`).
sharang added this to the Production MVP milestone 2026-09-20 20:16:02 +00:00
sharang added the criticalsecurity labels 2026-09-20 20:16:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: platform/pruefwerk#256