ci(security): misconfig informativt i stallet for blockerande (kanoniskt) #39
@@ -87,7 +87,7 @@ jobs:
|
||||
run: |
|
||||
set +e
|
||||
docker run --rm -v "$SCAN_VOLUME:/repo" -w /repo \
|
||||
aquasec/trivy:0.76.2 fs --scanners vuln,secret,misconfig --severity HIGH,CRITICAL --exit-code 1 --no-progress /repo > /tmp/scan.log 2>&1
|
||||
aquasec/trivy:0.76.2 fs --scanners vuln,secret --severity HIGH,CRITICAL --exit-code 1 --no-progress /repo > /tmp/scan.log 2>&1
|
||||
rc=$?
|
||||
set -e
|
||||
tail -n 120 /tmp/scan.log
|
||||
@@ -95,6 +95,15 @@ jobs:
|
||||
if [ $rc -eq 1 ]; then echo "::error::Trivy filesystem scan hittade fynd"; exit 1; fi
|
||||
echo "::warning::Trivy filesystem scan kunde inte köras (rc=$rc) - verktygsfel, inte fynd"; exit 0
|
||||
|
||||
# Dockerfile- och IaC-misconfig är informativt: DS-0002 (root-USER)
|
||||
# kräver ändrade runtime-användare och hanteras per repo, inte i grinden.
|
||||
- name: Trivy config informational
|
||||
continue-on-error: true
|
||||
run: |
|
||||
docker run --rm -v "$SCAN_VOLUME:/repo" -w /repo \
|
||||
aquasec/trivy:0.76.2 fs --scanners misconfig --severity HIGH,CRITICAL \
|
||||
--exit-code 1 --no-progress /repo || echo "::notice::misconfig loggas informativt"
|
||||
|
||||
# Kanda sarbarheter i lasfilen. osv-scanner 2.x hittar inte alltid
|
||||
# osv-scanner.toml sjalv, sa den skickas explicit nar den finns.
|
||||
# Lasfilsvakten och config-kollen kors i en container som monterar
|
||||
|
||||
Reference in New Issue
Block a user