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:
co-authored by
Claude Fable 5
parent
b656eefdc7
commit
a2bfaaec8f
@@ -43,12 +43,43 @@ stop_windows_vm:
|
|||||||
script:
|
script:
|
||||||
- docker stop windows-runner
|
- 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:
|
web:
|
||||||
stage: build
|
stage: build
|
||||||
image: node:24-bullseye
|
image: node:24-bullseye
|
||||||
rules:
|
rules:
|
||||||
# Release-Tags bauen immer (docker_web/desktop_* brauchen web als needs)
|
# Release-Tags bauen immer (docker_web/desktop_* brauchen web als needs)
|
||||||
- if: $CI_COMMIT_TAG =~ /^v/
|
- 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
|
# Pushes nur, wenn build-relevante Pfade betroffen sind - Doku-Commits kosten nichts
|
||||||
- if: $CI_COMMIT_BRANCH
|
- if: $CI_COMMIT_BRANCH
|
||||||
changes:
|
changes:
|
||||||
|
|||||||
Reference in New Issue
Block a user