Add compensating controls framework and date-based report dirs #320
4 changed files with 29 additions and 33 deletions
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>
commit
f6ed751dc2
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue