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