From DevOps to DevSecOps
Module 4 · DevSecOps I: Pipelines and Scanning

From DevOps to DevSecOps

What DevOps and CI/CD automate, how DevSecOps weaves security tasks into every stage of the lifecycle, why 'shifting left' is cheaper, and the main families of automated security testing: SAST, DAST, SCA, and secret scanning.

The Problem with Manual Releases

The movie app now has a frontend, a backend, and a database. Every change carries risk: a typo can crash the server, an updated package can introduce a vulnerability, a rushed fix can expose data. When testing and checking happen by hand — if they happen — they’re inconsistent, slow, and skipped exactly when people are under pressure.

DevOps is the practice of breaking down the wall between the people who build software (development) and the people who run it (operations), and automating the path from a code change to running software. The automation backbone is CI/CD:

  • Continuous Integration (CI) — every change pushed to the shared repository is automatically built and tested, so problems are caught within minutes of being introduced.
  • Continuous Delivery — every change that passes is automatically prepared for release; a human approves the final step.
  • Continuous Deployment — every change that passes goes to production automatically, with no manual gate.
run tests REST query GitHub repo Codespaces dev env GitHub Actions test · ZAP scan NEW MongoDB Atlas document database User Mobile app React Native · Expo API server Express · Node.js runs in Codespaces
Module 4: a GitHub Actions pipeline runs tests and a security scan whenever code is pushed. Highlighted in red: what's new or changed in this module.

DevSecOps: Security in Every Stage

Traditional security was a gate at the end: build the thing, then hand it to a security team for review. That fails in a world of daily releases — the gate either becomes a bottleneck or gets skipped.

DevSecOps integrates security into each stage of the DevOps lifecycle and automates it wherever possible, making security a shared responsibility rather than one team’s final checkpoint.

Plan threat model Develop secure coding Commit check deps Build test · scan Operate monitor · detect
StageSecurity tasksIn the movie app
PlanThreat modeling, impact analysis”What happens if the database credentials leak?”
DevelopFinding and classifying vulnerabilities, security tools in the editor, automated fixesLinting for injection risks while writing routes
Code commitDependency management, secure CI/CD pipelines, secret scanningFlagging a vulnerable package version or a committed password
Build, test, deployConfiguration validation, infrastructure scanning, application scanningScanning the running API for missing security headers
Operate and monitorLog analysis, anomaly detectionAlerting on a spike of failed requests

Why “Shift Left”?

Picture the lifecycle as a timeline running left to right. Shifting left means moving security checks earlier. The reason is economics: a flaw caught in the editor costs a minute to fix; caught in code review, an hour; caught in production after a breach, potentially millions — plus users’ trust. Early feedback is also better feedback, because the developer still remembers what they were doing.

Shifting left doesn’t mean only left. Some issues only appear in a running system, so monitoring and runtime scanning stay on the right. Good programs check at every stage.


The Families of Automated Security Testing

TypeWhat it examinesFindsBlind spots
SAST — static application security testingSource code, without running itInjection patterns, unsafe functions, hard-coded secretsRuntime configuration, deployment issues; can be noisy
DAST — dynamic application security testingThe running application, from the outsideMissing security headers, exposed endpoints, injectable inputsCode it can’t reach; needs a running target
SCA — software composition analysisThird-party dependenciesPackages with known vulnerabilities (CVEs), license problemsFlaws in your own code
Secret scanningCommits and historyAPI keys, passwords, tokensSecrets that are encoded or split
IaC scanningInfrastructure configurationOpen ports, public storage, overly broad permissionsApplication logic

A modern Node.js app often has hundreds of transitive dependencies, so SCA tends to find the most issues by volume. The next lesson uses a well-known DAST tool, OWASP ZAP, inside the CI pipeline.

OWASP — the Open Worldwide Application Security Project — is a nonprofit community that publishes free security tools and guidance, including the widely used OWASP Top 10 list of the most critical web application risks.

⚠️ Common Pitfall: Treating a Green Pipeline as 'Secure'

Common mistake: concluding that because the scanner passed, the app has no vulnerabilities.

Each tool only sees what it’s designed to see. A DAST scan won’t find a vulnerable dependency that’s never exercised; SAST won’t notice a database left open to the internet; none of them understand your business logic (“can a user see another user’s data?”). Automated checks raise the floor — they don’t replace threat modeling, code review, and testing the things that matter most to your users.

🧠 Knowledge Check

1. What distinguishes continuous deployment from continuous delivery?

2. Which testing type would most likely flag that the API responds without important security headers?

3. A package your API depends on has a newly published CVE. Which practice catches this?

4. Why is 'shifting left' cost-effective?


Up Next

Theory into pipeline: the next lesson reads a real GitHub Actions workflow — triggers, jobs, runners, steps, and secrets — and walks through what an OWASP ZAP scan does and how to read its results.