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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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-corecloses this for every path at once.What to change
net_guardincompliance-corethat denies loopback, private, link-local, metadata and cluster-internal addresses.handlers/dast.rs:86-95,orchestrator.rs:774-780).Acceptance
169.254.169.254) and cluster-internal addresses, plus a DNS-rebinding case where the hostname resolves to a private address.net_guardbefore a connection is opened.tests/stage/07_isolation.sh).