feat(malware): ClamAV stage, committed-binary inventory, unchanged rescans skipped (#465) (#488)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 4s
CI / Deploy Docs (push) Successful in 1m11s
CI / Deploy MCP (push) Successful in 4m37s
CI / Deploy Dashboard (push) Successful in 6m31s
CI / Deploy Agent (push) Successful in 8m3s

This commit was merged in pull request #488.
This commit is contained in:
sharang committed 2026-10-06 08:49:39 +00:00
1 parent ecc6466a18
commit d960ba658e
62 files changed
+1600 -61

No files matched your search

+28
View File
@@ -138,6 +138,33 @@ Only package URLs (purl), CVE ids and CPE product prefixes are sent. Both source
Licenses of NuGet packages that no `.nuspec` in the tree gives are read from the [nuget.org registration API](https://learn.microsoft.com/nuget/api/registration-base-url-resource) (`api.nuget.org`). Only the package id and version are sent, never for an id a `nuget.config` routes to another feed (see [.NET projects](/guide/dotnet-en)). The lookup is bounded per scan (8 requests at once, 10 s per request, 60 s and 300 uncached packages in total); answers are cached for all tenants. Set `NUGET_LICENSE_LOOKUP=false` to keep the agent from contacting nuget.org.
## ClamAV -- Malware
[ClamAV](https://www.clamav.net/) (GPL-2.0, the official image unchanged) runs
as its own service beside the agent, its signatures updated daily by freshclam
inside it. The agent streams each file of the tree to it (`INSTREAM`, at most
64 MiB per file; larger files are listed under **Nicht ausgeführt**), vendor
code included: a vendored DLL is exactly where malware hides. A file found
clean is remembered by its SHA-256 and the signature version, so a rescan only
streams what changed or met new signatures. Each hit is a finding of high
severity with the signature, the file and its SHA-256 (type **Schadsoftware und
Binärdateien**, tool **Schadsoftware (ClamAV)**). Heuristic signatures
(`Heuristics.*`, `*.Malware.*`, `PUA.*`) also match packers, obfuscators and
protection tools; such a finding says so and needs a person's review. The LLM
triage does not judge these findings (there is no code to read). Without the
service (`CLAMD_ADDRESS` unset) the stage is listed as not enabled; when the
service cannot be reached, as not completed, never as clean.
## Committed binaries
Executables, libraries and firmware images committed as built files (PE, ELF,
Mach-O, and `.hex`/`.srec`/`.uf2`/`.dfu`/raw `.bin` images, recognised by their
first bytes) are listed as informational findings (tool **Eingecheckte
Binärdateien**) with format, architecture (and `.NET` for an assembly), size,
SHA-256 and, for a Windows file, its version resource (product, version,
company, original file name). A changed file is a new finding. Many of them in
one repository become one finding listing them.
## Custom OAuth Scanner
A purpose-built scanner that detects OAuth and OIDC misconfigurations in your code, including:
@@ -241,6 +268,7 @@ These are set by the operator in the agent's environment, not by a tenant, and o
| Identity providers for pentest test-user cleanup (Keycloak, Auth0, Okta) | `pentest/cleanup.rs` | `KEYCLOAK_URL`, `AUTH0_DOMAIN`, `OKTA_DOMAIN` |
| Headless Chrome for PDF reports | `pentest/report/pdf.rs` | `CHROME_WS_URL` |
| MongoDB | `database.rs` | `MONGODB_URI` |
| ClamAV service (clamd, plain TCP; the tree's files are streamed to it) | `pipeline/clamav.rs` | `CLAMD_ADDRESS` |
## Planned integrations (decided 2026-08-31, not yet in the code)