feat(report): non-DSE Windows entity section and per-unit physical location #17
Loading…
Reference in a new issue
No description provided.
Delete branch "fm/dse-security-reports-non-dse-entity-section"
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
The three Windows units the report labeled "On-Prem" are Azure VMs in a VoeV environment the DSE side does not control, and the coarse Azure/On-Prem location label carried no physical meaning (nine Linux VMs rendered identically as "Azure" although eight run in westeurope and one in switzerlandnorth). This change records the hosting and ownership facts in the committed baseline, renders a dedicated deterministic section for the non-DSE Windows entity with each machine's role, adds a bounded instance-metadata probe (with a VM-vs-physical fallback) to the evidence stage, derives and renders each unit's real physical location, and makes the published 2026-10-27 round restorable by adding the missing baseline entry for ASP-DSE-PROD-MISC plus a deliberate loud failure for unknown override match keys.
What changed
config/systems.json: newhosting/environment/organisation/role/regionfields on every entry. The three Windows units are corrected tohosting: Azure, category Compute, subcategory "Azure-VMs in fremder Umgebung",environment: not-DSE,organisation: unknown(stated unknown, never a guess) and a per-machine role from the Defender software inventory (dor01 = SQL Server database server, ent01 = Tomcat/Java web server, cop01 = ASP.NET Core application server). Added the exact baseline entry for ASP-DSE-PROD-MISC (RG-DSE-PROD, emptysshAlias, zero Defender rows naturally).scripts/ssh_evidence.sh: bounded, read-only physical-location probe in the fixed sequence -- onecurl -s -m 5 -H Metadata:true http://169.254.169.254/metadata/instance/compute?api-version=2021-02-01per unit (region, availability zone, platform fault domain, VM id, resource group), and where that call failssystemd-detect-virtplus the readable/sys/class/dmi/idfiles (VM vs physical hardware, vendor/product/board); a host answering neither is recorded unknown, never guessed. Caches predating the probe get a bounded metadata-only refresh merged in (a failed probe leaves the file untouched).scripts/az_refresh_systems.sh: writes the real Azure region per VM (regionfield fromaz vm list) as the cloud-side fallback for units whose in-machine probe is missing or failed.scripts/derive_findings.py+src/dse_security_reports/derive.py(mirrored byte-for-byte,just py-crosscheckgreen): extended mapping schema;physical_locationprecedence IMDS -> az region -> host facts -> explicit unknown (regions normalized to the az lowercase spelling); a payload-levellocationsaggregate over export machines, evidence units and (real data only, the fixture lane stays fixture-only) cloud-side units; the merged mapping now fails loudly on an unknown override match key.reports/defender-triage.typ: new section "Die Windows-Entitaet: Azure-VMs in einer nicht-DSE-Umgebung" (evidence prose + deterministic table: role, hosting, environment, organisation, service and URL as explicit stated gaps) and new section "Physischer Standort der Einheiten" (per-unit region/zone/source/detail, explicit unknown for the three Windows units); On-Prem wording corrected throughout (map headings, method bullets, P1/P5 prose).reports/defender-findings.typ: the RG-cell fallback renders the foreign Azure hosting instead of "On-Prem"; prose corrected.tests/test_derive.py: schema/order assertions updated; new tests for the location precedence, the cloud-side unit join, the fixture gate and the loud unknown-override-key failure in both lanes (31 tests green).Behaviour change
KeyErrordeep in resolution. Rationale: a machine live in Azure but absent from the baseline would flow into the report without its committed facts (alias, hosting, ownership), so mapping drift fails fast rather than silently passing. With the ASP-DSE-PROD-MISC baseline entry in place, the archived published override restores cleanly (verified: derived aggregates match the published round and the derive no longer crashes with the override in place).artifacts/superseded/; the 2026-10-26 PDFs untouched); the datedevidence-2026-10-27/andderived-2026-10-27/caches were refreshed so the round stays restorable.Validation:
just all,just repro,just test(31),just lint,just py-crosscheck,just py-reproall green on the fixture; the real-data leg re-derived and rendered both reports withjust reprobyte-identical.Instructions-PR: none