ci: woechentlicher Trivy-CVE-Scan des Prod-Web-Images (gitops#31)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PKhFj1S3UdD6xL2fbWPeYj
This commit is contained in:
Thore Cimbal
2026-08-01 12:00:00 +00:00
co-authored by Claude Fable 5
parent b656eefdc7
commit a2bfaaec8f
+31
View File
@@ -43,12 +43,43 @@ stop_windows_vm:
script:
- docker stop windows-runner
# CVE-Scan des eigenen Prod-Images (gitops#31): woechentlich per Schedule und
# manuell triggerbar. Bricht bewusst nicht hart ab (allow_failure) - Funde landen
# als Artifact + Job-Log, die Bewertung bleibt menschlich. Lab-interne Images
# (desktop-build, windows-vm) brauchen erst CA-Trust im Trivy-Container - notiert
# in gitops#31 als Ausbaustufe.
trivy_scan:
stage: build
image:
name: aquasec/trivy:0.58.2
entrypoint: [""]
rules:
- if: $CI_PIPELINE_SOURCE == "schedule"
allow_failure: true
- if: $CI_COMMIT_BRANCH == "main"
when: manual
allow_failure: true
variables:
GIT_STRATEGY: none
TRIVY_NO_PROGRESS: "true"
script:
- trivy image --severity HIGH,CRITICAL --format table --output trivy-web.txt rohana.axion1337.de/sorb/threadnet-web:latest-ci
- grep -E "Total|CRITICAL|HIGH" trivy-web.txt | head -20 || true
artifacts:
paths:
- trivy-web.txt
expire_in: 30 days
when: always
web:
stage: build
image: node:24-bullseye
rules:
# Release-Tags bauen immer (docker_web/desktop_* brauchen web als needs)
- if: $CI_COMMIT_TAG =~ /^v/
# Scheduled Pipelines gehoeren dem trivy_scan - kein wochentlicher Leerbuild
- if: $CI_PIPELINE_SOURCE == "schedule"
when: never
# Pushes nur, wenn build-relevante Pfade betroffen sind - Doku-Commits kosten nichts
- if: $CI_COMMIT_BRANCH
changes: