Skip to content

feat: add lab config integrity validation and fix overlay vuln drops - #399

Merged
mwendigg merged 1 commit into
dreadnode:mainfrom
l50:upstream/lab-config-integrity
Aug 3, 2026
Merged

feat: add lab config integrity validation and fix overlay vuln drops#399
mwendigg merged 1 commit into
dreadnode:mainfrom
l50:upstream/lab-config-integrity

Conversation

@l50

@l50 l50 commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Key Changes:

  • Introduced a new labconfig package that validates referential integrity of merged lab configs and detects silently dropped vulns in per-env overlays
  • Fixed silent capability loss in GOAD overlays where adcs_esc10_case1 was added to dc03 in base config but omitted from dev/staging/test overlay redeclarations
  • Corrected managed_by references from the non-existent goadmin account to Administrator across GOAD and GOAD-variant-1 configs
  • Removed stale greatmaster group and orphaned local_groups entries that overlays were silently dropping

Added:

  • Config integrity checker - New cli/internal/labconfig/integrity.go implementing CheckIntegrity, which validates that every referenced principal, group, DC, trust partner, and vulns_vars entity in a merged lab config actually exists, accounting for AD built-ins, cross-domain forest-trust references, machine/gMSA accounts, and distinguished names
  • Overlay-drop detection - CheckOverlayDrops catches the RFC 7386 array-replacement class of bug that CheckIntegrity cannot see, reporting any vulns, scripts, or vulns_adcs_templates entry the base grants a host but the merged overlay silently omits
  • Comprehensive test suite - New integrity_test.go with a regression gate (TestLabConfigIntegrity) that runs every lab across every environment, plus targeted tests pinning the three shipped overlay defects and guarding against false positives on built-ins and cross-domain references; VulnsRequiringVars is derived from actual role sources so the pairing check cannot drift
  • Findings baseline - New testdata/known_findings.txt documenting the two deliberately-deferred findings (GOAD dev share rehoming and GOAD-variant-1 dev missing vulns_vars) with reasons and intended fixes, structured so the accepted set can only shrink
  • Overlay documentation - Added guidance in docs/mkdocs/docs/developers/add_lab.md explaining that arrays replace rather than merge, and that adding a vuln to config.json requires updating every overlay that redeclares that host

Changed:

  • ESC10 provisioning fixed - Added adcs_esc10_case1 to dc03.vulns in GOAD's dev, staging, and test overlays so ESC6/ESC9 are actually exploitable in those environments, matching the base config
  • Group ownership references - Replaced goadmin with Administrator as managed_by for the Dragons, QueenProtector, Domain Admins, AdministrationGroup, and Services groups in GOAD and GOAD-variant-1 configs
  • Dev overlay shares handling - Moved the shares vuln from srv02 to dc02 in GOAD's dev overlay, carrying its vulns_vars.thewall definition along and nulling the srv02 entry to state the intent explicitly

Removed:

  • Dropped the shares vuln from vulns lists in GOAD-Light and GOAD-variant-1 configs
  • Removed the orphaned greatmaster universal group and redundant group managed_by overrides from GOAD's dev, staging, and test overlays
  • Removed stale local_groups Administrators entries for dc03 that overlays were carrying but that were no longer needed

**Added:**

- Cross-file integrity checker for merged lab configs (`cli/internal/labconfig/integrity.go`) that validates every referenced principal, group, domain, host, and vulns_vars entry resolves after RFC 7386 overlay merges, accounting for AD builtins, well-known SIDs, cross-domain forest trusts, and distinguished names
- `CheckOverlayDrops` to catch capability silently lost when an overlay redeclares a host array (`vulns`, `scripts`, `vulns_adcs_templates`) without a base entry, a class of defect invisible to referential checks since the merged document stays internally consistent
- `adcs_esc10_case1` vuln to dc03 across GOAD base config, dev, staging, and test overlays so ESC6/ESC9 become exploitable in every environment
- Regression test suite (`integrity_test.go`) covering all lab configs per environment against a shrink-only baseline, the three shipped GOAD overlay defects, silent-drop detection, deleted-host tolerance, and false-positive guards for builtins and cross-domain refs
- Accepted-findings baseline (`testdata/known_findings.txt`) documenting the deliberately rehomed GOAD dev share and the deferred GOAD-variant-1 missing vulns_vars defect
- Developer docs explaining that overlay arrays replace rather than merge and that new vulns must be added to every redeclaring overlay (`docs/mkdocs/docs/developers/add_lab.md`)

**Changed:**

- Reassigned `managed_by` from the nonexistent `goadmin` account to `Administrator` across GOAD and GOAD-variant-1 domain groups to fix dangling principal references

**Removed:**

- Stale `shares` vuln from GOAD-Light and GOAD-variant-1 host vulns lists
- Redundant `greatmaster` group, `Domain Admins`/`Dragons`/`QueenProtector` managed_by, and dc03 `local_groups` overrides from GOAD dev, staging, and test overlays
@dreadnode-renovate-bot dreadnode-renovate-bot Bot added lab/GOAD Changes made to GOAD lab area/ad-labs Changes made to AD lab definitions area/docs Changes made to documentation lab/GOAD-Light Changes made to GOAD-Light lab labels Aug 3, 2026
@mwendigg
mwendigg added this pull request to the merge queue Aug 3, 2026
Merged via the queue into dreadnode:main with commit a18eb3a Aug 3, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/ad-labs Changes made to AD lab definitions area/docs Changes made to documentation lab/GOAD Changes made to GOAD lab lab/GOAD-Light Changes made to GOAD-Light lab

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants