The CVE scanner asked api.osv.dev (querybatch, vulns/{id}) and NVD (per
CVE, per CPE product) with the agent's plain HTTP client. Every other
outbound call to an address the agent does not fully control is already
guarded, and since #468 the nuget.org license lookup is too.
New pipeline/public_http.rs (PublicHttp), the nuget_license pattern:
a guarded_client_builder client (approved addresses only, redirects
re-checked, no proxy), NetGuard::check_url before every request, 10 s
per request, 5 s connect, bodies capped at 16 MiB. CveScanner and
nvd_cpe::product_cves use it. NVD requests keep 30 s, as on the old
shared client (a product query returns up to 2,000 CVEs). A URL the
guard refuses is not retried.
CveScanner::new takes the agent's NetGuard instead of a client. The
dead search_context (SearXNG) is removed: it was never called, and an
internal SearXNG would be refused by the guard anyway. The orchestrator's
http field had no other user and is gone.
Audited every other reqwest client in compliance-agent. The LLM gateway,
tenant registry, OSCAL backend, GitLab/Jira trackers, identity providers
(pentest cleanup) and headless Chrome are operator-configured and often
internal, so they stay on plain clients. docs/reference/tools.md now
lists all egress in one place.
Tests: the OSV stand-in on loopback is refused with a public-only guard
(no request reaches it) and answers with allow_private. An NVD product
query to loopback is refused and not retried. check_url refuses
loopback, RFC 1918, link-local and metadata addresses, and a name that
resolves to loopback is refused when connecting.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB
NuGet SBOM entries carried no license: none of the files they come from
names one. Fill it in after the NuGet components are merged (#467):
- local first: the .nuspec of a restored package; <license
type="expression"> as SPDX, type="file" as LicenseRef-file, an old
<licenseUrl> mapped to SPDX for well-known license pages, else kept
- then nuget.org: registration leaf (gzip) -> catalogEntry (inline or
linked on api.nuget.org) -> licenseExpression / licenseFile / licenseUrl
- only real ids at exact versions (no ranges, no DLL-metadata names);
versions normalised as nuget.org files them (6.2.0.0 -> 6.2.0, 2.0 ->
2.0.0)
- ids a nuget.config maps to another feed are never sent; a tree whose
nuget.config lists another feed without a mapping is not looked up
- through guarded_net, 8 at once, 10 s per request, 60 s and 300
uncached packages per scan; failures stay empty, one warning per scan
- cached across tenants in the admin database (nuget_licenses, TTL: a
year for a license, a week for none)
- NUGET_LICENSE_LOOKUP=false turns the nuget.org step off
Closes#467
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DmXxNULoSNPvjF7buKipsB