Closes#465.
Malware (pipeline/clamav.rs, stage after the secret scan):
- The agent streams each file of the tree (vendor code included, .git
not; up to 64 MiB, larger ones listed under "Nicht ausgeführt") to a
clamd service at CLAMD_ADDRESS (INSTREAM over TCP; the stage sidecar is
orca-platform #66). No signatures in the agent image.
- Clean files are remembered per tenant by SHA-256 and signature version
(malware_clean_files), so rescans stream only what changed or met new
signatures.
- A hit is a High finding (new ScanType::Malware, CWE-506) with signature,
file and SHA-256; heuristic signatures say they need review. The LLM
triage skips them ("skipped: binary").
- No CLAMD_ADDRESS: the stage is listed as not enabled; clamd unreachable
or failing: as not completed (ToolFailed). The scan goes on.
Committed binaries (pipeline/binaries.rs):
- PE (format, CPU, .NET, version resource strings), ELF, Mach-O (told
apart from Java classes) and firmware images (.hex/.srec/.uf2/.dfu/raw
.bin of 1 KiB+) found by their bytes, as Info findings with size and
SHA-256; a changed file is a new finding; many group (#464).
Unchanged scheduled rescans (pipeline/change.rs):
- A scheduled or webhook scan of uploaded files identical to the last
completed scan (ids and content hashes) is skipped
(SkipCode::UploadUnchanged); git targets already skipped unchanged
commits. Both now also compare the Prüfwerk build (LastScan.build), so
a release rescans every target once. Targets with a live URL always run.
- A skipped scan sends no scan.completed usage (it did before, every six
hours, for unchanged git targets).
- A scan a restart interrupted resumes with its own trigger, so a
person's scan still runs in full (#459).
- The CVE monitor keeps matching the stored SBOM independently.
Dashboard texts for the new type, phase, skip codes, stage and tools; docs
(scanning, findings, tools incl. egress); nightly: every baseline lists
the malware stage as not enabled (no clamd in the nightly), and
fw-c-sensor-node gains a prebuilt bootloader image as a committed binary.
Staging test plan: check 15.
YARA is not part of this (optional in the issue).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
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