In simple words
- DevSecOps: building security into every step of development and delivery, instead of checking it only at the end.
- Shift left: finding security problems earlier (while coding and in CI), when they are cheaper and easier to fix.
- Shift right: watching for security problems in production as well.
- Guardrail: an automatic safety check that guides people without slowing them down.
Big picture
DevSecOps means security is part of every step of building software, not a gate at the end. "Shift left" means moving security checks earlier on the timeline, toward the developer.
Think of building a house. It is cheap to move a wall on the drawing. It is expensive to move it after the house is built. A security bug is the same: the later you find it, the more it costs.
Plan -> Code -> Build -> Test -> Release -> Deploy -> Run ^ ^ ^ ^ ^ | | | | |threat IDE + SAST + DAST sign + scan runtimemodel secrets SCA API tests admission monitoringOld way and new way
| Old way | DevSecOps | |
|---|---|---|
| When security looks | Once, before release | At every commit and every stage |
| Who is responsible | A separate security team | Everyone; security teams give tools and advice |
| Feedback | A long report weeks later | A message in the pull request within minutes |
| Fixing | A big, risky rush | Small fixes while the code is fresh |
What "left" and "right" mean
- Left is early: design, coding, pull requests. Checks here are cheap and fast.
- Right is late: running in production. Checks here see real attacks but fix things slowly.
- You need both. Shifting left does not mean dropping runtime protection. It means adding checks earlier.
The checks you will learn
| Stage | Check | Lesson |
|---|---|---|
| Design | Threat modeling | 03 |
| Code | Secret scanning | 04 |
| Code | SAST (reads your source code) | 05 |
| Build | SCA (checks libraries you use) | 06 |
| Build | Container image scanning | 07 |
| Build | Infrastructure as code scanning | 08 |
| Pipeline | Secure the CI/CD system itself | 10 |
| Deploy | Policy and admission control | 12 |
| Release | Signing and supply chain | 13 |
| Test | DAST (attacks a running app) | 14 |
| Run | Runtime detection | 16 |
A first small step
A tiny change gives you a real result. This pipeline job scans the repository for leaked secrets on every push:
secret-scan: stage: test image: zricethezav/gitleaks:latest script: - gitleaks detect --source . --verboseFinding: AWS_SECRET_ACCESS_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCY...RuleID: aws-access-tokenFile: config/dev.envLine: 4Commit: 9f1c2ab1 leaks foundThe job fails, the developer sees the file and line, and the secret is removed before it reaches production. Pin a real version tag instead of latest in your own pipeline.
Make security easy
Developers skip checks that are slow or noisy. Good DevSecOps teams follow a few rules:
| Rule | Why |
|---|---|
| Keep fast checks in the pull request (under 5 minutes) | Slow checks get skipped |
| Run slow checks (full DAST) on a schedule or before release | Keeps the feedback loop quick |
| Start in "report only" mode, then turn on blocking | Avoids surprise failures on day one |
| Only block on high and critical findings at first | Cuts noise |
| Show results in the pull request, with a fix hint | Developers act on what they can see |
The three layers of defense
- Prevent: make mistakes hard (templates, safe defaults, secure libraries).
- Detect: find problems fast (scanners, logs, alerts).
- Respond: fix and learn (incident process, post-incident review).
A mature program has all three. Most beginners only build detect.
Common mistakes
- Buying a scanner and calling it done. A scanner nobody reads is only noise.
- Turning on every rule at once. The team drowns in findings and ignores all of them.
- Making security a blocker with no help. Give fix guidance, not only "failed".
- Forgetting the pipeline itself. Attackers target CI/CD systems too (lesson 10).
- Measuring only the number of findings. Measure time to fix (lesson 18).
Summary
- DevSecOps puts security into every step, owned by everyone.
- Shift left to find problems early, when they are cheap to fix.
- Keep checks fast, clear and gradual so people accept them.
- Prevent, detect and respond. You need all three.
- The rest of this course walks left to right through the pipeline.
CHECK YOUR UNDERSTANDING
3 quick questions
1. What does "shift left" mean in DevSecOps?
2. A new scanner finds hundreds of issues on day one. What is a good first step?
3. Which set describes the three layers of defense?