What Is DevSecOps?
In the old model, security teams reviewed software at the end, found problems late and slowed releases. DevSecOps adds security to every step of the pipeline and makes it everyone's job. Problems found early are cheaper to fix. This is called shifting left.
Types of Security Testing
| Type | What it checks | When | Tools |
|---|---|---|---|
| SAST (static analysis) | Your source code for vulnerabilities (injection, weak crypto) | Every commit and pull request | Semgrep, CodeQL, SonarQube, Bandit |
| SCA (software composition analysis) | Known vulnerabilities and licenses in dependencies | Every build | Dependabot, Renovate, Trivy, Snyk, OWASP Dependency-Check |
| Secret scanning | Passwords, tokens and keys in code and history | Pre-commit and CI | Gitleaks, TruffleHog, GitHub secret scanning |
| Container scanning | OS packages and libraries in images | After image build, and on registry | Trivy, Grype, Docker Scout |
| IaC scanning | Misconfigurations in Terraform, Kubernetes YAML, Dockerfiles | Pull request | Checkov, Trivy config, KICS, tfsec |
| DAST (dynamic) | The running application from the outside | Against staging | OWASP ZAP, Nuclei |
| Runtime security | Suspicious behavior in production | Always | Falco, cloud threat detection, EDR |
The OWASP Top 10 (Know the Themes)
- Broken access control: users can reach data or actions they should not
- Cryptographic failures: sensitive data not encrypted, weak algorithms
- Injection: SQL, command, template injection from untrusted input
- Insecure design, security misconfiguration: missing controls, default passwords, open buckets
- Vulnerable and outdated components: old libraries
- Authentication failures, integrity failures, logging and monitoring failures, SSRF
Check the OWASP website for the current edition of the list. The themes stay similar from version to version.
Secret Scanning
SAST with Semgrep
CodeQL and Dependabot on GitHub
Dependency and Image Scanning
--ignore-unfixed), keep an ignore file with reasons and expiry dates, and report everything else as tickets.
IaC and Kubernetes Policy Scanning
DAST with OWASP ZAP
A Secure Pipeline Example
Secrets Management
| Approach | Notes |
|---|---|
| Environment variables from CI secret store | Simple, but static and broadly visible to jobs |
| Cloud secret managers (AWS Secrets Manager, Azure Key Vault, Google Secret Manager) | Central, audited, rotation support |
| HashiCorp Vault | Dynamic short-lived database and cloud credentials, PKI, encryption as a service |
| Workload identity / OIDC | No stored secrets at all for cloud access |
| SOPS / Sealed Secrets | Encrypted secrets in Git for GitOps |
Vulnerability Management Process
- Inventory: know what you run (SBOMs)
- Detect: continuous scanning in CI and on running images
- Prioritize: by severity, exploitability (is it reachable? is there a known exploit?), exposure and business impact
- Fix: upgrade, patch or mitigate within agreed deadlines (SLA by severity)
- Verify and report: track time to fix as a metric
Culture
- Security champions inside development teams
- Threat modeling for new features: STRIDE (spoofing, tampering, repudiation, information disclosure, denial of service, elevation of privilege)
- Make the secure path the easy path: templates, base images and libraries that are already hardened
- Teach by showing real findings, not by blocking without explanation
Practice Tasks
- Run Gitleaks against one of your repositories, including history
- Add Semgrep and Trivy to a pull request workflow and fix one finding
- Scan a Terraform folder with Checkov and fix an open security group
- Run ZAP baseline against a local test app you created
- Store a secret in Vault dev mode and read it from a script
Conclusion
DevSecOps puts automated security checks (secrets, SAST, dependency, image, IaC and DAST) into the pipeline, uses short-lived credentials and manages vulnerabilities by risk. Start small and make findings actionable.

