feat(report): resource categories, DSE/ASP split, CVE links, SSH evidence, trivy agreement and patch posture #4
Loading…
Reference in a new issue
No description provided.
Delete branch "fm/dse-security-reports-cve-overview"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
PR 2 (the real-data leg) was merged mid-flight, so this follow-up carries the five additions the captain requested on top of it, rebased onto current main (including the polars data layer from #3).
Each Defender finding now carries a cli-cloud-bi-style resource categorization, a DSE-vs-ASP domain split, a cached Red Hat/AlmaLinux CVE link, an SSH-evidence installed-version ground truth, a trivy scanner-agreement dimension, and each scanned unit gains a patch-management posture summary.
What changed
config/systems.csv-- category (Compute / On-Prem), subcategory (Persistente VMs, CI-Runner-VMs for crowci*, On-Prem Systeme), domain (DSE vs ASP) and SSH alias columns; exact rows for the three DSE Alma machines map to their dse-ansible aliases (dse_dev_misc, dse_dev_workbench, dse_prod_workbench), all other units are SSH-unreachable.scripts/derive_findings.py-- resolves category/subcategory/domain/sshAlias per finding and system; derives per-category (with subcategories and severity split) and per-domain aggregations; resolves CVE links from the raw cache (Red Hat CVE page preferred, best-matching AlmaLinux erratum as fallback); compares claimed versions against the SSH evidence cache; joins trivy detections into the scanner-agreement dimension (trivy-confirms / trivy-silent with matching installed version / defender-only) with scan metadata and counts; computes patch posture incl. lifecycle position against the EOL table; merges optional az-refresh rows field-wise over the committed baseline.scripts/fetch_cve_links.sh+just cve-links-- fetches the raw link cache once, live (Alma errata indexes 8-10, HTTP status per Red Hat CVE page, snapshot date) into gitignored.local/cve-cache/.scripts/ssh_evidence.sh+just evidence-- connects once, live, per SSH-reachable unit (dse-ansible ssh.cfg alias, admin account philipp_baumann, publickey) and runs a fixed read-only command sequence: sorted rpm -qa, openssl/glibc versions, rpm matches for the Defender software tokens, and the patch posture (dnf-automatic timer states, last dnf transaction, Alma release, pending security updates with an explicit check status so a failed repo-metadata fetch is not reported as zero) -- one stable-sorted JSON per unit under gitignored.local/evidence/.scripts/scan_trivy.sh+just scan-- runs trivy once, live, over the evidence inventories: the vulnerability DB is cached once under.local/trivy/(then --skip-db-update), each inventory becomes a minimal CycloneDX SBOM (distro family alma plus pkg:rpm/alma purls, which trivy needs for the advisory lookup) and the raw report is normalized into one stable-sorted JSON per unit under gitignored.local/scans/with trivy version and DB date.scripts/az_refresh_systems.sh-- az runs under the dse-ansible prod environment convention (direnv exec over the prod envrc pulling pipeline credentials from Azure Key Vault via the authenticated az session).config/alma-eol.csv-- committed static EOL date table (8: 2029-05-31, 9: 2032-05-31, 10: 2035-05-31) so lifecycle positions stay offline-deterministic.reports/defender-findings.typ-- CVE-Uebersicht gains the Link column (RH/ALMA badge, hyperlinked CVE id) and the Trivy column (compact T+ / T- / D markers next to the false-positive column, with legend and trivy/DB versions); new sections Befunde nach Ressourcen-Kategorie, Befunde nach Domaene and Patch-Management pro System; per-system table shows category and domain; Evidence section compares claimed versions against installed RPMs.AGENTS.md-- records the live caches, mapping columns, patch/EOL rules, the Azure direnv convention and the vulnix availability note.Behaviour change
The committed fixture pipeline stays byte-identical (
just all,just reproverified). With the real exports under.local/real/the report renders: 203 Critical / 157 CVSS>9.5 findings with machine and resource group per row, 27 Red Hat CVE links (Alma fallback verified), On-Prem 163 vs Compute 40 and ASP 183 vs DSE 20 splits, SSH evidence from all three DSE Alma machines, trivy agreement for every DSE finding (all 14 currently defender-only -- the Defender claims are pip packages with no RPM counterpart), and patch posture: Alma 9.8 (supported until 2032-05-31), dnf-automatic enabled everywhere, last automatic runs on 2026-10-25/26, and the security-update check currently failing on repo metadata (Microsoft repo GPG signature) -- explicit context for the queued dse-ansible/opentofu challenge.All live inputs and caches stay under gitignored
.local/and renders remain offline and deterministic.Notes:
just py-crosschecknow fails by design --src/dse_security_reportsstill mirrors the pre-categorization payload shape while the stdlib pipeline (this lane, per the ownership split in the Justfile) extended it. The polars layer needs a resync; this PR deliberately does not touchsrc/.Validation:
just reprobyte-identical on fixture and real data; live CVE fetch (85 CVEs), live SSH evidence (3 units), live trivy scans (1595/1850/1850 detections, DB 2026-10-26) and patch posture collected; az-override field-merge and baseline restoration tested; ingest error path tested.Instructions-PR: none
feat(report): resource categories, DSE/ASP domain split, CVE links and SSH evidenceto feat(report): resource categories, DSE/ASP split, CVE links, SSH evidence, trivy agreement and patch posture