Files
renovate/lib/util/http
Jamie Tanna 0db7cdd91f refactor(util/http): add host guard address classifier
As part of follow-up changes, we're looking to tighten the way that
Renovate handles outgoing HTTP traffic.

Before we do this, we can add helper methods to manage classification of
outgoing traffic to three "trust tiers":

- the public Internet - which is generally OK
- `internal` traffic - which should be carefully configured by a
  self-hosted administrator based on their risk tolerance, and includes
  loopback, RFC1918, link-local, CGNAT, multicast, unique-local and
  unspecified addresses
- `metadata` traffic (i.e. to the AWS EC2 Metadata API) which should
  /NEVER/ be allowed.

By splitting `metadata` out, we can always block access to them, while
allowing `internal` hosts to be accessed.

We use Node's built-in `net.BlockList` rather than adding a dependency,
which also transparently classifies IPv4-mapped IPv6 addresses (in all
their spellings) against the IPv4 rules.

Co-authored-by: Claude Fable 5 <jamie.tanna+claude-code@mend.io>
Co-authored-by: Claude Opus 5 <jamie.tanna+claude-code@mend.io>
2026-09-10 14:52:01 +01:00
..