Update Jenkinsfile

This commit is contained in:
2026-03-25 22:14:03 +01:00
parent bf21ccdccd
commit 16c636dc94

58
Jenkinsfile vendored
View File

@@ -30,35 +30,35 @@ pipeline {
} }
} }
stage('SAST - Semgrep') { # stage('SAST - Semgrep') {
steps { # steps {
sh """ # sh """
docker run --rm -v "\$(pwd):/src" \ # docker run --rm -v "\$(pwd):/src" \
returntocorp/semgrep:latest \ # returntocorp/semgrep:latest \
semgrep scan --config=auto --debug \ # semgrep scan --config=auto --debug \
--json --output /src/semgrep.json \ # --json --output /src/semgrep.json \
/src/internal /src/cmd || true # /src/internal /src/cmd || true
#
echo "After semgrep:" # echo "After semgrep:"
ls -la # ls -la
""" # """
} # }
} # }
#
stage('Upload to DefectDojo') { # stage('Upload to DefectDojo') {
steps { # steps {
sh """ # sh """
curl -X POST "${DD_URL}/api/v2/import-scan/" \ # curl -X POST "${DD_URL}/api/v2/import-scan/" \
-H "Authorization: Token ${DD_API_KEY}" \ # -H "Authorization: Token ${DD_API_KEY}" \
-F "scan_type=Semgrep JSON Report" \ # -F "scan_type=Semgrep JSON Report" \
-F "file=@\$(pwd)/semgrep.json" \ # -F "file=@\$(pwd)/semgrep.json" \
-F "product_name=Sendit" \ # -F "product_name=Sendit" \
-F "engagement_name=Jenkins-CI" \ # -F "engagement_name=Jenkins-CI" \
-F "auto_create_context=true" \ # -F "auto_create_context=true" \
-F "close_old_findings=true" # -F "close_old_findings=true"
""" # """
} # }
} # }
stage('Build image') { stage('Build image') {
steps { steps {