DevSecOps embeds security checks into CI/CD pipelines, enabling early detection of vulnerabilities and compliance enforcement.
stages:
- build
- test
- security_scan
- deploy
security_scan:
stage: security_scan
script:
- snyk test
- bandit -r .
only:
- main
stages:
- build
- test
- security
security_scan:
stage: security
script:
- sonar-scanner -Dsonar.projectKey=myapp
DevSecOps ensures secure, compliant, and resilient deployments, making security an integral part of DevOps pipelines.