Add compensating controls framework and date-based report dirs #320

Merged
eblume merged 2 commits from compensating-controls into main 2026-03-30 17:44:12 -07:00
4 changed files with 29 additions and 33 deletions
Showing only changes of commit f6ed751dc2 - Show all commits

Organize scan reports into date-based subdirectories

Change Prowler (k8s, iac, image) and Kingfisher CronJobs to write
reports under YYYY-MM-DD subdirectories instead of a flat directory.
Prevents clutter as weekly scans accumulate.

Before: /reports/prowler/prowler-output-In-Cluster-20260329030006.html
After:  /reports/prowler/2026-03-29/prowler-output-In-Cluster-20260329030006.html

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Erich Blume 2026-03-30 17:39:17 -07:00

View file

@ -23,7 +23,7 @@ spec:
- |
set -e
STAMP=$(date +%Y%m%d-%H%M%S)
OUTDIR=/reports/kingfisher
OUTDIR=/reports/kingfisher/$(date +%Y-%m-%d)
mkdir -p "$OUTDIR"
# Exit codes: 0=clean, 200=findings, 205=validated findings.

View file

@ -18,17 +18,16 @@ spec:
containers:
- name: prowler
image: registry.ops.eblu.me/blumeops/prowler:kustomized
command: ["/bin/sh", "-c"]
args:
- iac
- --scan-repository-url
- https://forge.ops.eblu.me/eblume/blumeops.git
- -z
- --output-formats
- html
- csv
- json-ocsf
- --output-directory
- /reports/prowler-iac
- |
DATEDIR=/reports/prowler-iac/$(date +%Y-%m-%d)
mkdir -p "$DATEDIR"
prowler iac \
--scan-repository-url https://forge.ops.eblu.me/eblume/blumeops.git \
-z \
--output-formats html csv json-ocsf \
--output-directory "$DATEDIR"
volumeMounts:
- name: reports
mountPath: /reports

View file

@ -48,17 +48,16 @@ spec:
containers:
- name: prowler
image: registry.ops.eblu.me/blumeops/prowler:kustomized
command: ["/bin/sh", "-c"]
args:
- image
- --image-list
- /shared/images.txt
- -z
- --output-formats
- html
- csv
- json-ocsf
- --output-directory
- /reports/prowler-images
- |
DATEDIR=/reports/prowler-images/$(date +%Y-%m-%d)
mkdir -p "$DATEDIR"
prowler image \
--image-list /shared/images.txt \
-z \
--output-formats html csv json-ocsf \
--output-directory "$DATEDIR"
volumeMounts:
- name: reports
mountPath: /reports

View file

@ -40,19 +40,17 @@ spec:
containers:
- name: prowler
image: registry.ops.eblu.me/blumeops/prowler:kustomized
command: ["/bin/sh", "-c"]
args:
- kubernetes
- --compliance
- cis_1.11_kubernetes
- --mutelist-file
- /tmp/mutelist/mutelist.yaml
- -z
- --output-formats
- html
- csv
- json-ocsf
- --output-directory
- /reports/prowler
- |
DATEDIR=/reports/prowler/$(date +%Y-%m-%d)
mkdir -p "$DATEDIR"
prowler kubernetes \
--compliance cis_1.11_kubernetes \
--mutelist-file /tmp/mutelist/mutelist.yaml \
-z \
--output-formats html csv json-ocsf \
--output-directory "$DATEDIR"
volumeMounts:
- name: reports
mountPath: /reports