Use lightweight cluster topology in CI
Kube-bench CIS scan / Scan ephemeral K3s cluster (push) Failing after 3m11s

This commit is contained in:
2026-08-09 22:01:11 -04:00
parent 8955ba6873
commit 8934ea95a4
3 changed files with 31 additions and 5 deletions
+6 -3
View File
@@ -6,8 +6,12 @@ read-only host mounts because the CIS checks inspect processes, permissions,
and node configuration. The job is intentionally separate from the ArgoCD
application tree so the scanner cannot become part of the workload baseline.
GitHub Actions creates the local cluster, runs the job, stores the JSON report,
and prints pass, warn, and fail totals in the workflow summary. The workflow
GitHub Actions creates a disposable one-server K3s cluster, runs the job,
stores the JSON report, and prints pass, warn, and fail totals in the workflow
summary. The CI topology is intentionally smaller than the developer
quick-start topology so it remains reliable on shared runners.
The workflow
fails if the scanner job or report generation fails. It does not yet fail on
CIS findings because a vanilla K3d cluster is expected to produce findings;
later hardening phases can turn selected controls into merge gates.
@@ -55,4 +59,3 @@ docker run -d \
Mounting the Docker socket gives workflow jobs substantial control over the
runner host. Use a dedicated disposable runner, restrict its repository scope,
and avoid placing unrelated credentials on that host.