Reconcile discovery against your own CMDB
Task
Compare what you recorded against what is actually there, and classify every difference. The gap between the two is the lesson.
Steps
- Run at least two independent discovery sources and write their output to
lab/discovered.csvwith headerid,type,source. - Produce
lab/recon.csvwith headerid,type,in_cmdb,in_discovery,classjoining the two on identifier. - Set
classto one ofobserved-not-recorded,recorded-not-observedorattributes-disagree, leaving matching rows blank. - For every
observed-not-recordedrow, add it tolab/cmdb.csvwith an owner -- this is the remediation, not the finding. - Write
lab/recon-finding.mdstating your coverage: assets recorded, assets observed, and the count of each class. Include the sentence 'coverage is N of M' with real numbers.
Verify
awk -F, 'NR>1 {print $5}' lab/recon.csv | grep -v '^$' | sort | uniq -c
awk -F, 'NR>1 {n++} END {print n" reconciled row(s)"}' lab/recon.csv
grep -Ec 'coverage is [0-9]+ of [0-9]+' lab/recon-finding.md
awk -F, 'NR>1 {print $3}' lab/cmdb.csv | grep -c .
At least one row in each of two classes, and the coverage sentence present with real numbers. A reconciliation with no differences means the discovery sources share a blind spot -- add one that does not, such as the identity provider.
This is an independent study companion for CompTIA SecurityX CAS-005 and is not produced by or endorsed by CompTIA.