From b7eb5f579b9e9599e5f431bfa3df06a005a76163 Mon Sep 17 00:00:00 2001 From: Jayson Grace Date: Sun, 28 Jun 2026 16:35:19 -0600 Subject: [PATCH] feat: add security_logging playbook to all environments and simplify panel detail rendering **Added:** - `security_logging.yml` to all environment playbook lists (NHA, SCCM, GOAD-Mini, DRACARYS, default) in `playbooks.yml` **Changed:** - Simplified category detail cell rendering in `panel.go` to only show the combined fail/warn breakdown (e.g. `x3 !2`) when both are present, since the row icon and pass/total count already convey the state when only one condition exists --- cli/internal/validate/panel.go | 19 +++++-------------- playbooks.yml | 5 +++++ 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/cli/internal/validate/panel.go b/cli/internal/validate/panel.go index 66fb9fd7..1ff6cb1c 100644 --- a/cli/internal/validate/panel.go +++ b/cli/internal/validate/panel.go @@ -194,21 +194,12 @@ func renderCategoryColumn(cats []categoryStats, width int) string { counts := fmt.Sprintf("%d/%d", c.pass, c.total) countsCell := padRight(styleMuted.Render(counts), countsWidth) - var detail string - switch { - case c.fail > 0 && c.warn > 0: - detail = fmt.Sprintf("x%d !%d", c.fail, c.warn) - case c.fail > 0: - detail = fmt.Sprintf("x%d", c.fail) - case c.warn > 0: - detail = fmt.Sprintf("!%d", c.warn) - } + // Only show the fail/warn breakdown when both are present; otherwise + // pass/total + the row icon already convey it (e.g. `[x] 3/6` is 3 + // fails, `[!] 3/6` is 3 warns). var detailCell string - switch { - case c.fail > 0: - detailCell = styleErr.Render(detail) - case c.warn > 0: - detailCell = styleWarn.Render(detail) + if c.fail > 0 && c.warn > 0 { + detailCell = styleErr.Render(fmt.Sprintf("x%d !%d", c.fail, c.warn)) } detailCell = padRight(detailCell, detailWidth) diff --git a/playbooks.yml b/playbooks.yml index 85a4b3ad..27c52259 100644 --- a/playbooks.yml +++ b/playbooks.yml @@ -13,6 +13,7 @@ NHA: - ad-acl.yml - servers.yml - security.yml + - security_logging.yml - vulnerabilities.yml SCCM: @@ -30,6 +31,7 @@ SCCM: - ad-acl.yml - servers.yml - security.yml + - security_logging.yml - vulnerabilities.yml - sccm-install.yml # Waiting 10 minutes for the install to complete @@ -54,6 +56,7 @@ GOAD-Mini: - adcs.yml - ad-acl.yml - security.yml + - security_logging.yml - vulnerabilities.yml DRACARYS: @@ -68,6 +71,7 @@ DRACARYS: - klink.yml - keepass.yml - security.yml + - security_logging.yml - vulnerabilities.yml - reboot.yml - glpi.yml @@ -91,4 +95,5 @@ default: - ad-acl.yml - servers.yml - security.yml + - security_logging.yml - vulnerabilities.yml