From 9c126f02148ed85eff34ccd5341653d01586ea70 Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Fri, 27 Nov 2026 04:12:19 +0000 Subject: [PATCH] fix(lab): roles/base removes Panther\unattend.xml, and verify.yml asserts it SetupComplete.cmd deletes Panther\unattend.xml on a clone (#1103), but roles/base kept it on purpose, so the repository said both. The leviathan audit found it on all four servers. They were cloned on 2026-10-07 from a 912 whose SetupComplete.cmd predates #1103 (byte-identical to be31da31), so the scrub never ran. Each copy is password-scrubbed. roles/base now removes it with the other two answer files, and verify.yml checks it. Refs #1099 Co-Authored-By: Claude Opus 5.5 --- ansible/roles/base/tasks/main.yml | 12 ++++++++---- ansible/verify.yml | 3 +++ docs/changelog.md | 18 ++++++++++++++++++ 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/ansible/roles/base/tasks/main.yml b/ansible/roles/base/tasks/main.yml index 5fb53830..d28002ee 100644 --- a/ansible/roles/base/tasks/main.yml +++ b/ansible/roles/base/tasks/main.yml @@ -171,16 +171,20 @@ # a 911 or 912 built before #1099 inherited it. The password stops opening # the local Administrator once the task above has run, but the template reuses # it, so it is still worth reading on any guest this has not touched yet. -# Panther\unattend.xml stays: Setup scrubbed its password. unattend-oobe.xml, -# the answer sysprep uses on a clone's first boot, carries the build password -# in plaintext too; SetupComplete.cmd deletes it, and this backs that up. -- name: Remove Setup's plaintext copies of the build answer files +# unattend-oobe.xml, the answer sysprep uses on a clone's first boot, carries +# the build password in plaintext too. Panther\unattend.xml has its password +# scrubbed by Setup, but SetupComplete.cmd deletes it with the other two +# (#1103), so this does too. The six cloned on 2026-10-07 came from a 912 built +# before #1103 and still had it on 2026-11-26, with no password in it. This +# task backs up SetupComplete.cmd on all three files. +- name: Remove Setup's copies of the build answer files ansible.windows.win_file: path: "{{ item }}" state: absent loop: - C:\Windows\Panther\unattend-original.xml - C:\Windows\Panther\unattend-oobe.xml + - C:\Windows\Panther\unattend.xml # What the template's build left behind (#846). Packer's WinRM ran over HTTPS on # a self-signed certificate, FriendlyName packer-winrm, made in bootstrap.ps1. diff --git a/ansible/verify.yml b/ansible/verify.yml index 5cb7fd53..a1672016 100644 --- a/ansible/verify.yml +++ b/ansible/verify.yml @@ -104,6 +104,9 @@ # deletes. roles/base removes both; neither may be on any guest. $r['no plaintext answer file in Panther'] = -not ((Test-Path C:\Windows\Panther\unattend-original.xml) -or (Test-Path C:\Windows\Panther\unattend-oobe.xml)) + # Setup's scrubbed unattend.xml: SetupComplete.cmd deletes it on a + # clone (#1103), and roles/base backs that up, as for the two above. + $r['no unattend.xml in Panther'] = -not (Test-Path C:\Windows\Panther\unattend.xml) # The bahamut audit's staging leftovers (2026-11-25): roles/soc_agents, # exporter and sysmon remove their installers once installed, and only # SYSTEM and Administrators may write a metric into the textfile folder. diff --git a/docs/changelog.md b/docs/changelog.md index e05c0c9d..d7c1e29c 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -17,6 +17,24 @@ roadmap as it read that day, and the *Done* entries keep the shape they had there. `check_docs.py` does not check this file, for the reason its module docstring gives: it is a record, not a claim about now. +## 2026-11-27 + +- **Lab domain: `roles/base` now removes `Panther\unattend.xml`, and + `verify.yml` holds every guest to having none.** This corrects the + 2026-10-09 #1099 entry, which says `SetupComplete.cmd` deletes the file. It + does, but only on clones of a template built after #1103. The leviathan audit + (2026-11-13 to 2026-11-26, read-only) found the file on `bahamut`, + `leviathan`, `titan` and `ramuh`, dated 2026-10-07, with no `PlainText=true` + element in it. All four carry a `SetupComplete.cmd` byte-identical to + `be31da31`, the version from the morning of 2026-10-07. It has no Panther + delete and no scrubfail guard. #1103 added both on 2026-10-09, and 912 has + not been rebuilt since, so the scrub never ran on them. `roles/base` had kept + the file on purpose ("Setup scrubbed its password"), so the repository said + both. It now removes the file, as `SetupComplete.cmd` does. The endpoints + (`.54`, `.55`) were not reachable to check. Not yet applied: the next + `--tags base` run removes it, and until then `verify.yml` fails `no + unattend.xml in Panther` on each guest that has it. + ## 2026-11-26 - **`golem` runs the host firewall `build-the-backup-guest.md` ยง2 added