Merge pull request 'ci(security): misconfig informativt i stallet for blockerande (kanoniskt)' (#39) from fix/security-misconfig-informational-20261111 into main
masterplan-lock / check (push) Successful in 7s
ci / sonar (push) Successful in 8m20s
security / scan (push) Failing after 1m53s

This commit was merged in pull request #39.
This commit is contained in:
2026-11-11 17:04:43 +00:00
+10 -1
View File
@@ -155,7 +155,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
@@ -163,6 +163,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