security(soteria): harden pod scan posture
This commit is contained in:
parent
3a1b2781a6
commit
0d8199d90c
6
.trivyignore.yaml
Normal file
6
.trivyignore.yaml
Normal file
@ -0,0 +1,6 @@
|
||||
misconfigurations:
|
||||
- id: KSV-0041
|
||||
paths:
|
||||
- deploy/clusterrole.yaml
|
||||
expired_at: 2026-05-22
|
||||
statement: Soteria copies restic credentials into target namespaces for backup Jobs; replace with a narrower per-namespace secret distribution model.
|
||||
4
Jenkinsfile
vendored
4
Jenkinsfile
vendored
@ -119,7 +119,9 @@ spec:
|
||||
set +e
|
||||
sonar-scanner "${args[@]}" | tee build/sonar-scanner.log
|
||||
sonar_rc=${PIPESTATUS[0]}
|
||||
trivy fs --cache-dir "${TRIVY_CACHE_DIR}" --skip-db-update --timeout 5m --no-progress --format json --output build/trivy-fs.json --scanners vuln,secret,misconfig --severity HIGH,CRITICAL .
|
||||
ignore_args=()
|
||||
[ -f .trivyignore.yaml ] && ignore_args+=(--ignorefile .trivyignore.yaml)
|
||||
trivy fs --cache-dir "${TRIVY_CACHE_DIR}" --skip-db-update --timeout 5m --no-progress --format json --output build/trivy-fs.json --scanners vuln,secret,misconfig --severity HIGH,CRITICAL "${ignore_args[@]}" .
|
||||
trivy_rc=$?
|
||||
set -e
|
||||
printf '%s\n' "${sonar_rc}" > build/sonarqube-analysis.rc
|
||||
|
||||
@ -18,6 +18,9 @@ spec:
|
||||
app.kubernetes.io/component: api
|
||||
spec:
|
||||
serviceAccountName: soteria
|
||||
securityContext:
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: soteria
|
||||
image: registry.bstein.dev/infra/soteria:0.1.0
|
||||
@ -53,5 +56,7 @@ spec:
|
||||
allowPrivilegeEscalation: false
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65532
|
||||
runAsGroup: 65532
|
||||
readOnlyRootFilesystem: true
|
||||
capabilities:
|
||||
drop: ["ALL"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user