Scan Type | Tools & Techniques | When to Run |
---|---|---|
SAST | SonarQube, Checkmarx, Fortify, GitHub CodeQL | On every PR / commit |
DAST | OWASP ZAP, Burp Suite, Nikto | Against deployed staging |
SCA | Snyk, Dependabot, OWASP Dependency-Check, Trivy | On every build / PR |
IAST | Contrast Security, Seeker | During integration tests |
RASP | Signal Sciences, Waratek | In production live traffic |
pipeline {
agent any
stages {
stage('Static Analysis') {
steps {
// Run SonarQube scanner
withSonarQubeEnv('MySonarServer') {
sh 'mvn clean verify sonar:sonar'
}
}
}
stage('Quality Gate') {
steps {
timeout(time: 2, unit: 'MINUTES') {
waitForQualityGate abortPipeline: true
}
}
}
}
}
stages:
- build
- test
- security
security_scan:
image: owasp/zap2docker-stable
stage: security
script:
- zap-baseline.py -t <http://web-app:8080> -r zap-report.html
artifacts:
paths:
- zap-report.html