Security is not the last step — it belongs in every step. DevSecOps weaves automated security checks into the delivery pipeline so problems are caught on the commit that introduced them, not by a separate team days before launch. This guide is the map: what "shift left" really means, the SAST/DAST/SCA scan types, a secure CI/CD pipeline that fails fast, secrets and policy-as-code, and the metrics that tell you it's working. It links out to hands-on tutorials for each tool.
The journey:
| You need | Why |
|---|---|
| A CI/CD pipeline | DevSecOps is checks wired into delivery |
| Familiarity with Git & containers | Most gates run on commits and images |
| The individual tool tutorials | This guide links to hands-on practice for each |
No install for this one — it's the conceptual spine. Each section points to a tool tutorial where you actually run the commands.
The old model put security at the end: developers wrote code, then a separate team reviewed a release candidate shortly before go-live. Findings arrived when they were most expensive to fix and when schedule pressure to ship anyway was highest.
DevSecOps keeps the same checks but automates them and moves them earlier — onto every commit, owned by the developers who wrote the code. Security specialists shift from being the gate to building the guardrails: writing rules, tuning thresholds, and handling the genuinely hard findings.
Shift left = move security checks earlier in the pipeline. Fixing a bug in development costs a fraction of fixing it in production.
The tradeoff is honest: automation catches known classes fast and cheaply, but it does not replace human judgment for business-logic flaws and threat modeling. Mature programs do both.
These three acronyms are the core of every DevSecOps conversation. Know exactly what each does:
| Type | Full name | What it does | Runs on |
|---|---|---|---|
| SAST | Static Application Security Testing | Scans your source code without running it | Code / build |
| DAST | Dynamic Application Security Testing | Attacks a running app to find runtime vulns | Test env |
| SCA | Software Composition Analysis | Scans your dependencies and open-source libraries | Build |
They're complementary, not redundant:
Add container image scanning (Trivy, Grype) as a fourth check on the built artifact — most CVEs in an image come from the base OS, not your code.
Committed credentials are their own category, because the moment a secret hits a shared remote it must be treated as public — forks, clones, and CI logs may already have it. So secrets scanning runs at every stage: pre-commit (best), CI, and against history.
The golden rule: never commit keys. And when one leaks, rotate first, then worry about scrubbing history — deleting the commit does not un-leak a key that already reached a remote.
The last gate before something runs is policy as code: machine-checked rules about what's allowed to deploy. Instead of a human remembering "pods must not run as root," a policy engine enforces it automatically at admission.
Both follow the same discipline: roll out in audit mode first to see what would be blocked, then switch to enforce.
Put it together. Each stage gets the check that fits it, and secrets scanning runs throughout:
┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐ ┌────────┐
│ CODE │──▶│ BUILD │──▶│ TEST │──▶│ IMAGE │──▶│ DEPLOY │
│ SAST │ │ SCA │ │ DAST │ │ image │ │ policy │
│ scan │ │ scan │ │ scan │ │ scan │ │ gate │
└────────┘ └────────┘ └────────┘ └────────┘ └────────┘
▲ ▲ ▲ ▲
└──── secrets scanning at every stage ────┘
If ANY scan fails on a critical finding -> pipeline stops -> no deploy
A gate is only real if it can stop the build: a check that warns but never blocks is documentation, not a control. But a gate that's too slow or too noisy gets bypassed. The balance:
Golden rule: fail the pipeline fast on critical vulnerabilities. Never let them reach production.
The metric that predicts collapse is false-positive rate. Once developers assume a red build is noise, they route around every gate and the whole program rots. Treat scanner precision as a first-class reliability concern:
Rolling gates onto an existing codebase in warn-only mode first, then enforcing one band at a time, is what makes adoption survivable.
Counting scans proves activity, not security. Measure outcomes and flow:
Put these on a dashboard next to remediation SLAs, so security posture is visible to the people who own it.
A working map of the space, by job:
| Job | Common tools |
|---|---|
| SAST | Semgrep, SonarQube, CodeQL, Checkmarx |
| DAST | OWASP ZAP, Burp Suite |
| SCA | Trivy, Grype, Snyk, OWASP Dependency-Check |
| Container / image | Trivy, Grype, AWS ECR / Inspector |
| Secrets | GitLeaks, TruffleHog |
| Policy as code | OPA, Kyverno |
| Cloud-native (AWS) | Inspector, GuardDuty, Security Hub, CodeGuru |
You don't need all of them — you need one per job that fits your stack, integrates with your pipeline, and is quiet enough that developers trust it.
Self-check:
You now have the map: shift left → SAST/DAST/SCA → secrets everywhere → policy at deploy → fail fast → measure. That's DevSecOps as a thread running through everything, not a gate at the end.