added trivy scanning
All checks were successful
Tests / Declarative: Post Actions passed: 1
csharp-secdevops-pipeline-pod/pipeline/head This commit looks good

This commit is contained in:
2026-05-05 14:05:39 +02:00
parent cf992d544c
commit d00ad9cddc
10 changed files with 43 additions and 28 deletions

15
Jenkinsfile vendored
View File

@@ -12,6 +12,11 @@ pipeline {
command:
- cat
tty: true
- name: trivy
image: aquasec/trivy:latest
command:
- cat
tty: true
'''
}
}
@@ -34,6 +39,16 @@ pipeline {
}
}
}
stage('Security: Trivy Scan') {
steps {
container('trivy') {
// Scannt das Dateisystem auf Schwachstellen (NuGet) und Secrets
// --exit-code 1 lässt die Pipeline bei kritischen Fehlern abbrechen
sh 'trivy fs --exit-code 1 --severity HIGH,CRITICAL .'
}
}
}
stage('Unit Tests') {
steps {