diff --git a/Jenkinsfile b/Jenkinsfile index 4e0e1f3..b0326d4 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -73,6 +73,27 @@ pipeline { ''' } } + + stage('Security scan') { + agent { + docker { + image 'fast_reader-ci:latest' + reuseNode true + } + } + steps { + sh ''' + echo "=== Generate SBOM ===" + syft dir:. -o cyclonedx-json=flashread-sbom.json + + echo "=== Scan SBOM for vulnerabilities ===" + grype sbom:flashread-sbom.json -o table + ''' + + archiveArtifacts artifacts: 'flashread-sbom.json', + fingerprint: true + } + } } post {