From d6aabe7138f13a1f02ff74e736643d9266937b0c Mon Sep 17 00:00:00 2001 From: Simone Date: Sun, 10 May 2026 20:32:06 +0200 Subject: [PATCH] =?UTF-8?q?docs(TODO):=20Remove=20duplicate=20=C2=A71=20it?= =?UTF-8?q?ems,=20consolidate=20to=20Deferred=20section?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove original §1.2, §1.3, §1.5 entries from main security section since they are now consolidated in "Deferred (Home Lab)" section with better organization and context about when to revisit. Also removed original §1.7, §1.8 entries (was done in previous commit). Final §1 structure: 1.1, 1.4, 1.6 (done) — 3 items. All deferred items in separate section with clear criteria for re-enablement. Co-Authored-By: Claude Sonnet 4.6 --- TODO.md | 50 +------------------------------------------------- 1 file changed, 1 insertion(+), 49 deletions(-) diff --git a/TODO.md b/TODO.md index 0e7a1f7..b5833cf 100644 --- a/TODO.md +++ b/TODO.md @@ -31,7 +31,7 @@ _Last updated: 2026-05-10 (post Sprint 7: §1.6/§3.2 done, test plan created)_ | Gitea Workflow Integration | 4 | 1 | manca solo §P3 generalizzazione workflow | | §1 Sicurezza & hardening | 3 | 0 | 1.1, 1.4, 1.6 done; 1.2/1.3/1.5/1.7/1.8 deferred (home lab) | | §2 Affidabilità & resilienza | 7 | 0 | tutto done | -| §3 Performance & throughput | 3 | 3 | 3.1/3.2/3.6 done; 3.3/3.4/3.5 backlog | +| §3 Performance & throughput | 3 | 3 | 3.1/3.2/3.6 done; 3.3/3.4/3.5 backlog | | §4 Osservabilità & manutenzione | 3 | 1 | 4.1/4.3/4.4 done; 4.5 backlog (4.2 Prometheus rimosso) | | §5 Qualità codice & test | 4 | 1 | 5.1/5.2/5.3/5.4 done; 5.5 (type hints) backlog | | §6 Scalabilità & estensioni | 0 | 6 | Linux VM, composite action, toolchain Tier-1 | @@ -190,34 +190,6 @@ _Last updated: 2026-05-10 (post Sprint 7: §1.6/§3.2 done, test plan created)_ - [x] `Prepare-WinBuild2025.ps1`: preflight TCP/5986, host non imposta più `AllowUnencrypted`; solo `TrustedHosts` viene salvato/ripristinato. - [x] `Validate-DeployState.ps1`, `Validate-SetupState.ps1`: connessione HTTPS/5986, check `AllowUnencrypted=false`. -### 1.2 [P0] [ ] Restringere `TrustedHosts` lato host (audit-only — residuo: audit host pre-esistenti) -File: nessuno script imposta `*` sull'host. Stato corrente: -- `Setup-Host.ps1` non tocca TrustedHosts (verificato 2026-05-10) -- [template/Prepare-WinBuild2025.ps1](template/Prepare-WinBuild2025.ps1) appende `$VMIPAddress` ai `TrustedHosts` e ripristina nel `finally` (post-§1.1: solo TrustedHosts, no AllowUnencrypted) -- [docs/HOST-SETUP.md:121-126](docs/HOST-SETUP.md:121) raccomanda `'192.168.79.*'` in setup manuale - -**Azione residua**: audit eventuali host già configurati con `*` (eredità manuale) e -sostituire con la subnet build: -```powershell -Set-Item WSMan:\localhost\Client\TrustedHosts -Value '192.168.79.*' -Force -Concatenate -``` - -### 1.3 [P0] [ ] Pinning hash SHA256 degli installer — STRUTTURA AGGIUNTA 2026-05-10 (valori da riempire) - -`$script:Hashes` + `Assert-Hash` aggiunti a [template/Setup-WinBuild2025.ps1](template/Setup-WinBuild2025.ps1). -`Assert-Hash` viene chiamato dopo ogni download (dotnet-install.ps1, python installer, vs_buildtools.exe). -Se l'hash è `''` viene emesso un warning ma l'esecuzione continua (non-breaking). - -**Azione residua — OBBLIGATORIA prima del prossimo refresh snapshot**: -- [ ] Scaricare i tre file, calcolare hash, riempire `$script:Hashes` in Setup-WinBuild2025.ps1: - ```powershell - # Inside or outside VM — qualsiasi PowerShell: - (Get-FileHash 'python-3.13.3-amd64.exe' -Algorithm SHA256).Hash # → $script:Hashes['Python'] - (Get-FileHash 'dotnet-install.ps1' -Algorithm SHA256).Hash # → $script:Hashes['DotNetInstallScript'] - (Get-FileHash 'vs_buildtools.exe' -Algorithm SHA256).Hash # → $script:Hashes['VSBuildToolsBootstrapper'] - ``` -- [ ] Verificare che `Assert-Hash` throwi correttamente su hash errato (test con hash fake). - ### 1.4 [P1] [x] Validazione IP per-ottetto — COMPLETATO 2026-05-10 Regex per-ottetto sostituita in tutti e 4 i file: @@ -225,18 +197,6 @@ Regex per-ottetto sostituita in tutti e 4 i file: Estrazione in `scripts/_Common.psm1` — vedi §5.2 (P2, backlog). -### 1.5 [P1] [ ] PAT mai persistito quando si abilita `-UseGitClone` -Requisiti di sicurezza per l'implementazione del clone in-VM. La sequenza operativa -(quando, dove, come) è dettagliata nella sezione "In-VM Git Clone (Ottimizzazione) — riferimento §3.3". - -Vincoli da rispettare in qualsiasi implementazione di `-UseGitClone`: -- [ ] PAT recuperato da Credential Manager **subito prima** della WinRM session, mai prima. -- [ ] Iniettato via `$using:cred` o env var di sessione, mai in argv né in log/transcript. -- [ ] Cancellato in `finally` interno alla scriptblock guest. -- [ ] **Grep automatico post-job sui log**: se il PAT compare grezzo in `$jobLog` o - `transcript.txt`, marcare la build come fallita e ruotare il PAT (regola di safety net, - non sostituisce le precedenti). - ### 1.6 [P2] [x] Defender + Firewall + UAC tutti disattivati nel template — documentare il modello di minaccia — COMPLETATO 2026-05-10 File: [docs/BEST-PRACTICES.md:§2.1 Threat Model](docs/BEST-PRACTICES.md). @@ -249,14 +209,6 @@ Documenta: Future modifiche di sicurezza vanno documentate nello stesso posto. -### 1.7 [P2] [ ] Rotazione password guest VM -- [ ] Trimestrale. Aggiornare credenziale `BuildVMGuest` in Credential Manager + password - effettiva nel template (richiede refresh snapshot — coordinare con §2.5). - -### 1.8 [P2] [ ] Verifica Get-StoredCredential -- [ ] Confermare che `Get-StoredCredential` funzioni correttamente in tutti gli script che - lo usano (post-migrazione HTTPS). - --- ## 2. Affidabilità & resilienza