DevSecOps Roadmap 2026: How to Become a DevSecOps Engineer
Step-by-step DevSecOps roadmap from a working DevSecOps engineer: SAST, secrets, SCA, container, IaC and cloud security, with projects, certs and timelines.
Level: Intermediate · Time: 5–6 months at ~8 h/week · Updated October 2026 by Ali Bashir
Who this roadmap is for
DevOps engineers who want to own security, and security people (SOC, pentest, GRC) moving into cloud-native work. You should already be comfortable with Linux, Git, Docker and a CI tool.
By the end you can
- Build a pipeline that blocks vulnerable code, secrets and images
- Scan and fix Terraform before it reaches the cloud
- Replace long-lived keys with short-lived credentials
- Sign artifacts and prove where they came from
- Harden Kubernetes and detect attacks at runtime
Step 1: Security foundations
Tools only find what they're told to look for. Knowing how applications actually get attacked lets you choose the right controls and explain risk to developers in their language.
Time: 2–3 weeks. Skip if you can explain the OWASP Top 10 with examples and have run a threat-modelling session.
Topics
- What is DevSecOps?
- DevSecOps means building security into every step of making software, instead of checking it only at the end. Developers, operations and security people share the job, and automated checks run in the pipeline on every change. OWASP DevSecOps Guideline NIST glossary: DevSecOps Course: DevSecOps Tutorial for Beginners | CI Pipeline with GitHub Actions and Docker Scout (What is DevSecOps) Video: What is DevSecOps? DevSecOps explained in 8 Mins
- CIA triad
- The CIA triad is the three goals of security: Confidentiality (only the right people can see data), Integrity (data is not changed by mistake or by attackers) and Availability (systems work when people need them). Almost every security control protects at least one of these three. NIST glossary: Confidentiality NIST glossary: Integrity Course: The Complete CompTIA Security+ SY0 701 Crash Course (Confidentiality and CIA) Video: The CIA Triad - CompTIA Security+ SY0-701 - 1.2
- Authentication vs authorization
- Authentication (AuthN) checks who you are, for example with a password or a security key. Authorisation (AuthZ) decides what you are allowed to do after that. Many real attacks happen because an app checks the first and forgets the second. OWASP Authentication Cheat Sheet OWASP Authorization Cheat Sheet Course: The Complete CompTIA Security+ SY0 701 Crash Course (IAAA and gap analysis) Video: Authentication, Authorization, and Accounting - CompTIA Security+ SY0-701 - 1.2
- Encryption basics
- Encryption scrambles data so only someone with the right key can read it. Symmetric encryption uses one shared key and is fast; asymmetric encryption uses a public key and a private key, which solves the problem of sharing keys safely. Real systems use both together. NIST glossary: Symmetric key algorithm OWASP Cryptographic Storage Cheat Sheet Course: Harvard CS50’s Intro to Cybersecurity – Full University Course (Securing Data) Video: Encrypting Data - CompTIA Security+ SY0-701 - 1.4
- Hashing
- A hash function, such as SHA-256, turns any data into a short fixed-length fingerprint, and you cannot turn the fingerprint back into the data. Hashes check that files were not changed, and slow password hashes (bcrypt, Argon2) store passwords safely. OWASP Password Storage Cheat Sheet NIST Hash Functions project Course: The Complete CompTIA Security+ SY0 701 Crash Course (Integrity and hashing) Video: Hashing and Digital Signatures - CompTIA Security+ SY0-701 - 1.4
- TLS & certificates
- TLS (Transport Layer Security) is the encryption behind HTTPS. A certificate proves a server really is who it claims to be, and it is signed by a trusted Certificate Authority (CA); this system is called PKI (Public Key Infrastructure). Expired or wrong certificates are a common cause of outages. MDN: Transport Layer Security Let's Encrypt: How it works Video: SSL, TLS, HTTPS Explained
- Firewalls & segmentation
- A firewall allows or blocks network traffic based on rules such as port and IP address. Segmentation splits a network into smaller zones (for example web, app and database) so an attacker who gets into one part cannot easily reach the rest. In the cloud, security groups and subnets do this job. OWASP Network Segmentation Cheat Sheet AWS: Security groups for your VPC Video: What is a Firewall?
- Zero trust
- Zero trust means never trusting a request just because it comes from inside the network. Every user, device and service must prove who it is and get only the access it needs, every time. It builds on least privilege and strong authentication. NIST SP 800-207: Zero Trust Architecture NIST glossary: Zero trust Course: The Complete CompTIA Security+ SY0 701 Crash Course (Zero trust philosophy) Video: Zero Trust - CompTIA Security+ SY0-701 - 1.2
- OWASP Top 10
- The OWASP Top 10 is a regularly updated list of the most critical web application security risks, such as broken access control, injection and software supply chain failures. Learn the current 2025 edition, because many videos still teach the 2021 list. It gives you a shared vocabulary with developers and a checklist for what your scanners and reviews should catch first. OWASP Top 10 project OWASP Top 10: Full list and details Video: OWASP Top 10 2025: Your complete guide to securing your applications
- Threat modelling (STRIDE)
- Threat modelling is the habit of asking "what could go wrong?" about a system before attackers do. STRIDE (Spoofing, Tampering, Repudiation, Information disclosure, Denial of service, Elevation of privilege) gives you a structured way to walk through each component and decide which controls are actually needed. OWASP: Threat Modeling Microsoft: STRIDE threat categories Course: DevOps to DevSecOps in 9 Hours | Practical Learning (Threat Modeling Demo) Video: STRIDE Threat Modeling for Beginners - In 20 Minutes
- Least privilege
- Least privilege means every user, service and pipeline gets only the permissions it needs, and nothing more. When something is compromised, tight permissions limit how far the damage spreads, which makes this the most valuable habit in IAM and Kubernetes RBAC work. AWS IAM: Security best practices NIST glossary: Least privilege Video: What is the Principle of Least Privilege? My short: One Character That Breaks AWS Security
- Defence in depth
- Defence in depth is layering several independent controls so a single failure does not lead to a breach. For example, a private subnet, a tight security group, IAM limits and encryption each cover for the others. As a DevSecOps engineer you design pipelines and platforms with these layers in mind. NIST glossary: Defense in depth Course: The Complete CompTIA Security+ SY0 701 Crash Course (Defense in depth) Video: Cybersecurity Architecture: Five Principles to Follow (and One to Avoid) My short: A Private Subnet Doesn't Make It Secure
- CVE & CVSS basics
- A CVE is a unique ID for a publicly known vulnerability, and CVSS is the standard 0 to 10 score describing how severe it is. Every scanner you run reports findings in these terms, so you need to read a CVSS vector and judge whether a "critical" really matters in your environment. CVE Program: Overview FIRST: CVSS v4.0 user guide Video: CVE and CVSS explained | Security Detail
Project: Hack, then threat-model, Juice Shop
Run OWASP Juice Shop locally and exploit three challenges (for example an injection, broken access control and a sensitive-data leak). Then draw a data-flow diagram and write a STRIDE threat model with one mitigation per threat.
Common mistakes
- Checking that users log in but not what they may access. Check authorisation on every request on the server, such as "does this user own order 42". Broken access control is the top OWASP Top 10 risk.
- Storing passwords with fast hashes like MD5 or SHA-256. Use a slow password hash such as Argon2id or bcrypt, which is built to resist guessing attacks. Fast hashes can be cracked in bulk.
- Treating the CVSS score as the full risk picture. CVSS rates severity in general, not in your system. Also consider whether the bug is reachable, exposed to the internet and being exploited.
You're ready to move on when you can
- Explain SQL injection and how to prevent it
- Read a CVSS score and say why it's high or low
- Run a 30-minute STRIDE session on a simple app
- Explain least privilege with an example from your own work
Step 2: Shift-left: SAST and secrets scanning
A bug found in a pull request costs minutes; the same bug in production costs an incident. Leaked keys are one of the most common ways cloud accounts get breached, and they're easy to catch before merge.
Time: 2–3 weeks. Skip if you run SAST and secret scanning on every pull request and tune their rules.
Topics
- SAST with Semgrep
- Static application security testing (SAST) scans source code for insecure patterns without running it. Semgrep Community Edition is a fast, open-source SAST tool with readable rules you can write yourself, which makes it easy to run on every pull request and tune to your codebase. In late 2024 Semgrep put its own rules under a stricter licence, and a group of vendors forked the engine as Opengrep; either works for learning. Semgrep docs: Quickstart Semgrep docs: Writing rules Course: DevSecOps Tutorial for Beginners | CI Pipeline with GitHub Actions and Docker Scout (Configure SAST Scan) Video: Semgrep Quick Start Tutorial
- Pre-commit hooks
- Pre-commit hooks run checks on a developer's machine before code is committed, such as linters, formatters and secret scanners. They catch problems in seconds, before anything reaches the shared repository or CI, which is the cheapest place to fix them. pre-commit framework docs Video: The easy way to keep your repos tidy.
- Secret scanning (Gitleaks)
- Secret scanning looks for API keys, passwords and tokens accidentally committed to Git, including in old history. Gitleaks is a popular open source scanner you can run in pre-commit hooks and CI. A leaked secret must be revoked and rotated, not just deleted from the code. Gitleaks on GitHub GitHub docs: About secret scanning Course: DevOps to DevSecOps in 9 Hours | Practical Learning (Securing Git Repositories) Video: So, you've committed a secret, what next? My short: Delete These Secrets From GitHub Actions
- Fail-the-build policies
- A fail-the-build policy decides which findings block a merge or deploy, for example new high severity issues or any leaked secret. Getting the threshold right matters: too strict and teams bypass the tooling, too loose and the scans become noise nobody reads. Semgrep docs: Running Semgrep in CI GitHub docs: About rulesets Course: DevSecOps Tutorial for Beginners | CI Pipeline with GitHub Actions and Docker Scout (Ignore Low Severity Issues) Video: Scanning code with Semgrep using GitHub Actions
- Triaging false positives
- Every scanner reports findings that are not real risks in your context. Triage means reviewing them, suppressing true false positives with a documented reason, and tuning rules so developers keep trusting the results. A DevSecOps engineer owns this signal-to-noise ratio. Semgrep docs: Triage and remediation Semgrep docs: Ignoring files, folders and code Course: DevSecOps Tutorial for Beginners | CI Pipeline with GitHub Actions and Docker Scout (Analyze scan results) Video: The False Positives That SAST Tools Always Flag
- CodeQL (alternative)
- CodeQL is GitHub's code analysis engine that finds security bugs by treating code like data you can query. It is free for public repositories and runs as GitHub code scanning. An alternative to Semgrep for SAST (Static Application Security Testing); pick one. GitHub Docs: About code scanning with CodeQL CodeQL documentation Video: Perform Security Code Analysis in GitHub with CodeQL and GitHub actions
- SonarQube (alternative)
- SonarQube scans code for bugs, security issues and code quality problems, and shows the results on a dashboard with a pass or fail "quality gate". The free Community Build runs in Docker. An alternative to Semgrep for SAST; pick one. SonarQube Community Build docs SonarQube Server docs Video: SonarQube Tutorial: Everything You Need to Know for Beginners
- TruffleHog (alternative)
- TruffleHog finds leaked passwords and API keys in Git history, files and other places. It can also check whether a found key still works, which helps you fix the dangerous ones first. An alternative to Gitleaks; pick one. TruffleHog on GitHub TruffleHog documentation Video: Introducing TruffleHog v3
Project: Security gates on every pull request
Add Semgrep and Gitleaks to a GitHub Actions workflow for Juice Shop. Fail the build only on high-severity findings, add a Gitleaks pre-commit hook, and write one custom Semgrep rule for a pattern you care about.
Common mistakes
- Deleting a leaked secret from Git and calling it fixed. Rotate or revoke the secret first, because it stays in Git history, forks and clones. Then remove it from history and check logs for misuse.
- Failing the build on every finding from day one. Block only new high-severity issues and leaked secrets at first. If every build fails, teams learn to bypass the tools.
- Disabling a whole scanner rule because of one false positive. Suppress that single finding inline with a written reason, like a nosemgrep comment. The rule keeps protecting the rest of the code.
You're ready to move on when you can
- Block a PR that contains an AWS key
- Write a custom Semgrep rule
- Mark a false positive without disabling the whole rule
- Explain what to do when a secret is already pushed (rotate first)
Step 3: Secure coding and app security testing
Scanners catch a lot, but you also need to know how common bugs like SQL injection and XSS work and how developers prevent them. DAST (Dynamic Application Security Testing) then attacks the running app the way a real attacker would, finding problems that code scanning misses.
Time: 2–3 weeks. Skip if you can explain how SQL injection and XSS work, show the code fix for each, and run a ZAP scan in a CI pipeline.
Topics
- Input validation
- Input validation means checking that data coming into your app has the expected type, length and format before you use it, for example "age must be a number from 0 to 120". Use allow-lists (what is allowed) rather than block-lists, and always validate on the server. OWASP Input Validation Cheat Sheet OWASP REST Security Cheat Sheet Course: Harvard CS50’s Intro to Cybersecurity – Full University Course (Securing Software) Video: Application Security - CompTIA Security+ SY0-701 - 4.1
- SQL injection
- SQL injection happens when user input is pasted straight into a database query, so an attacker can change the query and read or delete data. The fix is parameterised queries (prepared statements), which keep data separate from the SQL code. OWASP SQL Injection Prevention Cheat Sheet OWASP Query Parameterization Cheat Sheet Course: Harvard CS50’s Intro to Cybersecurity – Full University Course (Securing Software) Video: SQL Injection - CompTIA Security+ SY0-701 - 2.3
- Cross-site scripting (XSS)
- XSS (cross-site scripting) lets an attacker run their own JavaScript in other users' browsers, for example to steal login sessions. You prevent it by encoding output, using frameworks that escape by default, and adding a Content Security Policy (CSP) header. OWASP XSS Prevention Cheat Sheet MDN: Content Security Policy Course: Harvard CS50’s Intro to Cybersecurity – Full University Course (Securing Software) Video: Cross-Site Scripting (XSS) Explained
- DAST with OWASP ZAP
- ZAP (Zed Attack Proxy, now called ZAP by Checkmarx) is a free, open-source tool that tests a running website by sending it attack-like requests and reporting what breaks. The baseline scan only watches traffic passively, so it is safe to run in CI. The full scan actively attacks the app, so run it only against your own test environment. Both run in Docker. ZAP getting started ZAP baseline scan (Docker) Course: DevOps to DevSecOps in 9 Hours | Practical Learning (DAST Implementation) Video: OWASP Zap Tutorial
- Burp Suite (optional)
- Burp Suite is a tool security testers use to catch, read and change the requests between a browser and a website. The free Community Edition is great for learning manual web testing. Only test apps you own or have permission to test. Burp Suite: Getting started Burp Suite Community Edition Video: Burpsuite Basics (FREE Community Edition)
- Nmap (optional)
- Nmap is a free tool that scans a network to find which hosts are up and which ports and services are open. Defenders use it to check that only the expected ports are exposed. Only scan networks you own or have permission to scan. Nmap reference guide Nmap documentation Video: Nmap Tutorial to find Network Vulnerabilities
- OpenVAS (optional)
- OpenVAS, part of Greenbone Community Edition, is a free vulnerability scanner that checks servers for missing patches and weak settings across the network. It is useful for a home lab or for servers that container scanners do not cover. Greenbone Community documentation OpenVAS project Video: Vulnerability Analysis With OpenVAS
- Nessus (optional)
- Nessus from Tenable is one of the most widely used commercial vulnerability scanners for servers and networks. Nessus Essentials is free for up to 16 IP addresses, which is enough for learning. You will see it in many job adverts. Nessus: Getting started Nessus Essentials Video: Nessus Vulnerability Scanner Tutorial (Cyber Security Tools)
Project: Break and fix a vulnerable app
Run OWASP Juice Shop in Docker on your laptop and find one SQL injection and one XSS bug by hand. Then add a GitHub Actions job that runs the ZAP baseline scan against it on every push and uploads the report as an artifact.
Common mistakes
- Building SQL queries by joining strings with user input. Use parameterised queries or prepared statements every time. Escaping input by hand misses edge cases that attackers find.
- Relying on browser-side validation to stop bad input. Attackers send requests directly with tools like curl or Burp, skipping the browser. Repeat every validation check on the server.
- Running ZAP or Nmap against systems without permission. Only test apps and networks you own or have written permission to test. Unauthorized scanning can break laws and production systems.
You're ready to move on when you can
- Explain SQL injection and fix it with parameterised queries
- Explain the three types of XSS and how output encoding stops them
- Run a ZAP baseline scan and read its report
- Explain the difference between SAST, DAST and SCA
Step 4: Dependency and container scanning
Most of your code is other people's code, and so is most of your container image. One outdated library or base image can expose everything, so scan both on every build.
Time: 2 weeks. Skip if you generate SBOMs and gate images on vulnerability severity in CI.
Topics
- SCA & SBOMs
- Software composition analysis (SCA) checks your open source dependencies for known vulnerabilities and licence issues. An SBOM (software bill of materials) is a machine-readable list of every component in a build, so when the next big CVE drops you can answer "are we affected?" in minutes. OWASP: Component Analysis CycloneDX: Specification overview Course: DevOps to DevSecOps in 9 Hours | Practical Learning (SAST and SCA Implementation) Video: Episode 1 - Introduction to CycloneDX SBOM Standard
- Image scanning with Trivy
- Trivy is an open source scanner that finds known vulnerabilities in container image OS packages and application dependencies. Running it in CI and against your registry stops images with critical, fixable CVEs from reaching production. Trivy docs: Container image scanning Trivy docs: SBOM generation Course: Kubernetes CKS Full Course Theory + Practice + Browser Scenarios (Supply Chain Security - Image Vulnerability Scanning) Video: Container Image Scanning with Trivy -- Ep. 1 Trivy Overview
- Minimal & distroless base images
- Minimal and distroless images ship only your app and its runtime, with no shell or package manager. Fewer packages mean fewer CVEs to patch and fewer tools for an attacker to use, so choosing the base image is one of the highest leverage container security decisions. Google distroless images Docker docs: Building best practices Course: DevOps to DevSecOps in 9 Hours | Practical Learning (Distroless Images and Runtime) Video: How Chainguard Creates Container Images with Low-to-No CVEs
- Dependabot/Renovate
- Dependabot and Renovate automatically open pull requests to update outdated or vulnerable dependencies. Combined with good tests, they keep patching continuous and small instead of a painful yearly upgrade project. GitHub docs: About Dependabot version updates Renovate docs Video: Meet Renovate - Your Update Automation Bot for Kubernetes and More!
- Vulnerability SLAs
- A vulnerability SLA sets how quickly each severity must be fixed, for example critical in 7 days and high in 30. Good SLAs factor in exploitability (EPSS, known exploited lists) and exposure, not just the CVSS score, so teams spend effort where real risk is. NIST SP 800-40r4: Enterprise patch management FIRST: EPSS Video: How is Exploit Prediction Scoring System (EPSS) used for vulnerability management?
- Snyk (alternative)
- Snyk is a commercial platform with a free tier that scans your dependencies, container images and code for known vulnerabilities and suggests fixes. It plugs into GitHub, your editor and your CI pipeline. An alternative to Trivy; pick one. Snyk documentation Snyk CLI Course: Web App Vulnerabilities - DevSecOps Course for Beginners (Finding and Fixing Vulnerabilities with Snyk Code) Video: Snyk Demo in 20 Minutes | 2022
- Grype (alternative)
- Grype is a free open-source scanner from Anchore that finds known vulnerabilities in container images and folders. It pairs with Syft, which creates the SBOM (Software Bill of Materials) that Grype then scans. An alternative to Trivy; pick one. Grype on GitHub Anchore OSS: Vulnerability scanning guide Video: Easy SBOM & Vuln Scanning with Syft & Grype (Getting Started Tutorial)
Project: Cut an image's CVEs by 90%
Scan an app built on an old full-size base image with Trivy and record the CVE count. Switch to a slim or distroless base with a multi-stage build, rescan and compare. Generate an SBOM and enable Dependabot or Renovate.
Common mistakes
- Using a full-size base image with hundreds of unused packages. Use a slim or distroless base with a multi-stage build. Fewer packages means fewer CVEs to patch and fewer tools for an attacker.
- Treating every critical CVE as an emergency. Check whether a fix exists, whether the vulnerable code is actually used, its EPSS score (the chance it will be exploited in the next 30 days) and whether it is on CISA's KEV list (vulnerabilities known to be exploited in real attacks). Fix exploitable ones first.
- Scanning images once at build and never again. New CVEs are published daily for images that haven't changed. Rescan images in your registry on a schedule and keep an SBOM to check quickly.
You're ready to move on when you can
- Generate an SBOM for an image
- Explain why distroless images have fewer CVEs
- Decide whether a 'critical' CVE is actually exploitable in your app
- Set severity thresholds that don't block every build
Step 5: Infrastructure-as-code security
Many cloud breaches come from misconfiguration, not zero-days: a public bucket, an open security group. Scanning Terraform catches these before they exist.
Time: 2 weeks. Skip if you scan Terraform in CI and have written custom policy-as-code rules.
Topics
- Checkov / Trivy config rules
- Checkov and Trivy scan Terraform, CloudFormation, Kubernetes manifests and Dockerfiles for misconfigurations, such as public S3 buckets or unencrypted databases. Running them on pull requests catches cloud security issues before anything is deployed. Checkov docs: What is Checkov Trivy docs: Misconfiguration scanning Course: DevOps to DevSecOps in 9 Hours | Practical Learning (Using Checkov for Scanning) Video: What is Checkov? Benefits, Key Features, and Examples
- Policy as code (OPA)
- Policy as code means writing security and compliance rules as versioned, testable code instead of wiki pages. Open Policy Agent (OPA) and its Rego language can evaluate Terraform plans, Kubernetes objects and API requests against the same policies. OPA docs: Introduction OPA docs: Policy language (Rego) Course: Kubernetes CKS Full Course Theory + Practice + Browser Scenarios (Open Policy Agent (OPA)) Video: What is Open Policy Agent (OPA)?
- Secure Terraform modules
- Secure modules bake good defaults into reusable Terraform code: encryption on, public access off, least privilege IAM, and tagged resources. Teams that consume a secure module get safe infrastructure without being security experts, and state files holding secrets must be protected too. Terraform docs: Creating modules Terraform docs: Sensitive data in state Course: DevOps to DevSecOps in 9 Hours | Practical Learning (Terraform Security Best Practices) Video: 8 Terraform Best Practices that will improve your TF workflow immediately
- Drift detection
- Drift is when real infrastructure no longer matches your code, often because someone changed it by hand in the console. Detecting drift with scheduled plans or tooling matters because a manual "quick fix" can silently remove a security control your code enforces. Terraform tutorial: Manage resource drift Video: How to Detect and Manage Terraform Drift My short: Deploy Passed, But Production Drifted
- CIS Benchmarks
- CIS Benchmarks are consensus hardening guides for operating systems, Kubernetes and cloud accounts. They are a common baseline for audits, and most scanners and AWS Security Hub CSPM can check your setup against them automatically. CIS Benchmarks AWS Security Hub: CIS AWS Foundations Benchmark Course: Kubernetes CKS Full Course Theory + Practice + Browser Scenarios (Cluster Setup - CIS Benchmarks) Video: CIS Benchmark on AWS Explained with Examples
- tfsec (optional)
- tfsec scans Terraform code for risky settings, such as open security groups or unencrypted storage. It is no longer developed on its own because its checks moved into Trivy. You will still see it in older projects and tutorials, but use Checkov or Trivy for new work. tfsec on GitHub tfsec documentation Video: What is tfsec? Benefits, Key Features, and Examples
- KICS (alternative)
- KICS (Keeping Infrastructure as Code Secure) is a free open-source scanner from Checkmarx. It checks Terraform, Kubernetes YAML, Dockerfiles, CloudFormation and more for security mistakes. An alternative to Checkov; pick one. KICS documentation KICS on GitHub Video: KICS (Keeping Infrastructure as Code Secure) by Checkmarx.
Project: Fix TerraGoat
Run Checkov against TerraGoat, fix the ten most serious findings, and add a CI job that fails on new high-severity issues. Write one OPA/Rego policy, such as 'every S3 bucket must block public access'.
Common mistakes
- Running Checkov but ignoring findings in shared modules. Fix issues in the module itself so every team that uses it gets the safe default. Patching each copy separately does not scale.
- Fixing a misconfiguration in the console instead of in code. Make the fix in Terraform and apply it. A console fix creates drift and can be reverted silently on the next apply.
- Suppressing scanner checks without a recorded reason. Add a skip comment with a clear reason and owner, such as an intentional public website bucket. Review suppressions regularly.
You're ready to move on when you can
- Fix a public S3 bucket and an open security group in code
- Suppress a finding with a documented reason
- Write a simple Rego policy
- Explain how drift happens and how to detect it
Step 6: Secrets management
Long-lived keys in CI variables are the keys attackers look for first. Short-lived, automatically issued credentials remove the thing worth stealing.
Time: 2 weeks. Skip if your pipelines use OIDC to reach the cloud and your apps read secrets from a manager, not env files.
Topics
- AWS KMS
- AWS KMS (Key Management Service) creates and protects the encryption keys that services like S3, EBS and Secrets Manager use. You control who can use each key with key policies, and every use is logged in CloudTrail. AWS KMS Developer Guide AWS KMS cryptography essentials Video: AWS Key Management Service (AWS KMS)
- HashiCorp Vault
- Vault is a secrets manager that stores, encrypts and audits access to secrets, and can generate short-lived dynamic credentials for databases and clouds. It is a common choice when you need one secrets platform across many clouds and on-prem systems. Like Terraform, Vault moved to the Business Source Licence in 2023; OpenBao is the open-source fork, run under the Linux Foundation. Vault docs: What is Vault Vault tutorial: Static vs dynamic secrets Course: DevOps to DevSecOps in 9 Hours | Practical Learning (Secret Management with Vault) Video: HashiCorp Vault Tutorial for Beginners - What, Why and How
- AWS Secrets Manager
- AWS Secrets Manager stores secrets such as database passwords and API keys, controls access with IAM, and can rotate them automatically. Apps fetch secrets at runtime using their IAM role, so nothing sensitive lives in code, images or environment files. AWS docs: What is Secrets Manager Video: AWS Secrets Manager Service Overview with Demo My short: Your App Doesn't Need AWS Access Keys
- OIDC from CI to cloud
- With OpenID Connect, your CI job (for example GitHub Actions) proves its identity to AWS and receives temporary credentials for one run. This removes long-lived cloud access keys from CI secrets, which are a frequent cause of real breaches. GitHub docs: About security hardening with OpenID Connect GitHub docs: Configuring OIDC in AWS Video: Securely deploy to AWS with GitHub Actions and OIDC My short: Delete These Secrets From GitHub Actions
- Short-lived credentials
- Short-lived credentials expire after minutes or hours, so a leaked token quickly becomes useless. Prefer IAM roles, STS sessions, OIDC and dynamic secrets over static keys wherever possible. AWS IAM: Temporary security credentials Vault docs: Leases and renewal Video: Rotated vs. dynamic secrets: Which should you use? My short: Stop Using AWS Access Keys in Your App
- Rotation
- Rotation regularly replaces secrets with new values so a stolen one has a limited useful life. Automated rotation, with apps that reload secrets without downtime, is far more reliable than manual rotation that teams postpone. AWS docs: Rotate Secrets Manager secrets Video: AWS Secrets Manager - Rotate secrets up to every four hours
- SOPS (optional)
- SOPS encrypts only the values inside YAML, JSON or .env files, so you can store secrets safely in Git and still see which keys changed. It works with AWS KMS, age and other key sources, and is popular with GitOps tools. SOPS documentation SOPS on GitHub Video: Encrypt Your Sensitive Information Before Storing It - Encrypting with Mozilla SOPS and AGE
Project: Delete every stored cloud key
Switch your pipeline from stored AWS access keys to GitHub OIDC with a role scoped to one repo and branch. Move app secrets into AWS Secrets Manager with automatic rotation, then delete the old keys.
Common mistakes
- Keeping long-lived AWS access keys in CI secrets. Use OIDC so the pipeline assumes an IAM role and gets credentials for one run only. Then delete the old access keys.
- Trusting any repo or branch in the OIDC role. Limit the trust policy's sub condition to one repo and branch or environment. A loose condition lets other workflows deploy to your account.
- Turning on rotation without testing the app's reload. Make the app fetch secrets at runtime and handle a changed password. Then trigger a rotation in test and confirm nothing breaks.
You're ready to move on when you can
- Deploy to AWS from CI with no stored keys
- Restrict an OIDC role to one repo and branch
- Rotate a database password without downtime
- Explain static vs dynamic secrets
Step 7: Software supply chain
Attackers now target the build itself (compromised actions, packages and CI runners). Signing and provenance prove that what runs in production is what you built.
Time: 2 weeks. Skip if you sign images, verify signatures at deploy time and pin third-party actions by SHA.
Topics
- SLSA levels
- SLSA (Supply-chain Levels for Software Artifacts) is a framework that describes how trustworthy your build is. Its Build track has three levels: at L1 the build produces provenance (a record of how it was built), at L2 a hosted build platform signs that provenance, and at L3 the build platform is hardened so builds cannot tamper with each other or with the signing keys. SLSA: Security levels SLSA: About Video: An Overview on SLSA - Tom Hennen, Google & Joshua Lock, VMware
- Signing images with Cosign
- Cosign, part of Sigstore, signs container images so you can prove they came from your pipeline and were not tampered with. Keyless signing uses your CI identity through OIDC, so there are no long-lived signing keys to protect. Sigstore docs: Signing containers Sigstore docs: Verifying signatures Video: Sigstore demo with cosign
- Provenance attestations
- A provenance attestation is signed metadata stating how an artifact was built: which source commit, which workflow and which builder. Verifying provenance before deploy helps stop artifacts that were built outside your trusted pipeline. SLSA: Provenance spec GitHub docs: Artifact attestations for build provenance Video: Secure your cloud-native deployments with Artifact Attestations
- Pinning actions by SHA
- Referencing a third-party GitHub Action by tag (like @v4) means its owner, or an attacker who compromises it, can change the code your pipeline runs. Pinning to a full commit SHA makes the reference immutable, and tools like Dependabot can still keep it updated. GitHub docs: Security hardening for GitHub Actions Video: Securing Your GitHub Actions - Jaroslav Lobacevski, GitHub
- Protected branches
- Protected branches enforce rules on important branches like main: required reviews, passing status checks and no force pushes. They make sure security scans and human review cannot be skipped on the way to production. GitHub docs: About protected branches GitHub docs: About rulesets Course: DevOps to DevSecOps in 9 Hours | Practical Learning (Branch Protection and RBAC) Video: GitHub branch rules (protect your git branches)
- OpenSSF Scorecard (optional)
- OpenSSF Scorecard gives an open-source project a security score by checking things like branch protection, code review and pinned dependencies. Use it to judge a library before you add it, or to improve your own repository. OpenSSF Scorecard Scorecard on GitHub Video: OpenSSF Tech Talk: Building a Stronger Open Source Ecosystem - OpenSSF Scorecard
Project: Attack, then sign, your pipeline
Complete two CI/CD Goat challenges to see how pipelines get compromised. Then sign your images keylessly with Cosign in CI, attach an SBOM attestation, and pin every third-party action by commit SHA.
Common mistakes
- Referencing third-party GitHub Actions by tag like @v4. Pin each action to a full commit SHA, with the version in a comment, and let Dependabot or Renovate update it. Tags can be moved to malicious code.
- Giving workflows broad GITHUB_TOKEN write permissions. Set permissions: contents: read at the top of the workflow and grant write permissions only in the jobs that need them. A compromised step can only do what the token allows.
- Signing images but never verifying signatures before deploy. Verify signatures and provenance at deploy time, for example with a Kyverno or Gatekeeper admission policy. Unchecked signatures stop nothing.
You're ready to move on when you can
- Sign and verify an image with Cosign
- Explain the SLSA Build levels in one sentence each
- Explain why @v4 is riskier than a pinned SHA
- Describe a real supply-chain attack and what would have stopped it
Step 8: Kubernetes and runtime security
Some attacks get past every pipeline check. Hardened clusters limit how far an attacker can move, and runtime detection tells you they're there.
Time: 3 weeks. Skip if you've enforced Pod Security Standards, network policies and admission control, and tuned Falco rules.
Topics
- Pod Security Standards
- Pod Security Standards define three profiles (privileged, baseline, restricted) for what pods may do, such as running as root or mounting host paths. The built-in Pod Security Admission controller enforces them per namespace, giving you a quick, safe default. Kubernetes docs: Pod Security Standards Kubernetes docs: Pod Security Admission Course: Kubernetes CKS Full Course Theory + Practice + Browser Scenarios (Microservice Vulnerabilities - OS Level Security Domains) Video: Kubernetes Security - Pod Security Standards | How to use them to enforce security contexts
- RBAC
- Kubernetes RBAC controls who and what (users, groups, service accounts) can perform which actions on which resources. Tight Roles and RoleBindings, and avoiding cluster-admin for apps and people, keep a compromised pod or account from taking over the cluster. Kubernetes docs: Using RBAC authorization Kubernetes docs: RBAC good practices Course: Kubernetes CKS Full Course Theory + Practice + Browser Scenarios (Cluster Hardening - RBAC) Video: Kubernetes RBAC Explained My short: Why I Don't Give Developers Admin Access
- Network policies
- By default every pod can talk to every other pod. NetworkPolicies let you restrict traffic to only what each workload needs, which limits lateral movement if one service is compromised. They need a CNI plugin that enforces them. Kubernetes docs: Network Policies Course: Kubernetes CKS Full Course Theory + Practice + Browser Scenarios (Cluster Setup - Network Policies) Video: Kubernetes Network Policy Tutorial - yaml explained + Demo Calico
- Admission control
- Admission controllers inspect and can reject or modify objects before they are stored in the cluster. Policy engines like Kyverno and OPA Gatekeeper use this to block things like privileged pods, unsigned images or images from untrusted registries. Kubernetes docs: Admission controllers Kyverno docs: Introduction Course: Kubernetes CKS Full Course Theory + Practice + Browser Scenarios (Open Policy Agent (OPA)) Video: Customizing and Extending the Kubernetes API with Admission Controllers
- Runtime detection with Falco
- Falco is a CNCF runtime security tool that watches system calls and Kubernetes events and alerts on suspicious behaviour, such as a shell spawning inside a container. It covers what scanning cannot: attacks happening in running workloads. Falco docs Falco docs: Rules Course: Kubernetes CKS Full Course Theory + Practice + Browser Scenarios (Runtime Security - Behavioral Analytics at host and container level) Video: Falco for Kubernetes runtime security (eBPF, Rules, Tuning & Alerts)
- Kyverno (optional)
- Kyverno is a Kubernetes policy engine where policies are written in normal Kubernetes YAML, so there is no new language to learn. It can block, change or create resources when they are applied. It is the easiest way to try the admission control ideas above; OPA Gatekeeper does the same job using the Rego language. Kyverno introduction Kyverno documentation Course: DevOps to DevSecOps in 9 Hours | Practical Learning (Policy Enforcement with Kyverno) Video: Kyverno for Beginners: Secure Your Kubernetes Clusters Like a Pro (Free Labs!)
- kube-bench (optional)
- kube-bench checks your Kubernetes nodes and control plane against the CIS (Center for Internet Security) Kubernetes Benchmark and prints a pass or fail list. It is a quick way to find weak cluster settings. kube-bench on GitHub CIS Kubernetes Benchmark Course: Kubernetes CKS Full Course Theory + Practice + Browser Scenarios (Cluster Setup - CIS Benchmarks) Video: Kubernetes Security Testing : CIS Benchmarking with Kube-bench
Project: Break into, then lock down, a cluster
Work through five Kubernetes Goat scenarios. Then lock down the cluster: enforce the restricted Pod Security Standard, default-deny network policies, least-privilege RBAC, and only signed images at admission. Trigger a Falco alert with a shell in a container.
Common mistakes
- Giving app service accounts cluster-admin to avoid permission errors. Create a namespaced Role with only the verbs and resources the app needs. Turn off automountServiceAccountToken for pods that never call the API.
- Applying NetworkPolicies on a CNI that ignores them. Check that your CNI plugin, such as Calico or Cilium, enforces policies. Test that blocked traffic is actually blocked.
- Writing default-deny egress and breaking DNS for every pod. After a default-deny policy, explicitly allow egress to kube-dns on port 53 UDP and TCP. Otherwise name lookups fail everywhere.
You're ready to move on when you can
- Escape-proof a Pod spec (non-root, read-only FS, no privileges)
- Write a default-deny NetworkPolicy
- Find an over-permissive RoleBinding
- Get a Falco alert for a shell spawned in a container
Step 9: Cloud security posture and compliance
Cloud accounts drift away from secure settings every day. Continuous checks and automatic fixes keep many accounts compliant without an army of reviewers.
Time: 2–3 weeks. Skip if you've run Security Hub/GuardDuty across accounts and built at least one auto-remediation.
Topics
- AWS CloudTrail
- CloudTrail records API calls in your AWS account: who did what, when and from where. Management events (changes to resources and settings) are recorded by default, but data events, such as reading objects in S3, are opt-in and cost extra. It is the first place you look during an investigation, so create a trail that covers all Regions and store the logs in a protected S3 bucket. AWS CloudTrail User Guide CloudTrail concepts Video: AWS CloudTrail Basics | Step-by-Step Tutorial for Beginners
- AWS Security Hub
- AWS Security Hub collects findings from GuardDuty, Inspector and other tools in one place and ranks them by risk. Since December 2025 the posture checks against standards like CIS and AWS Foundational Security Best Practices are a separate service, AWS Security Hub CSPM (Cloud Security Posture Management), which the new Security Hub builds on. Together they are the central dashboard for cloud security across many accounts. AWS docs: What is Security Hub Video: AWS Security Hub Demo | Amazon Web Services
- GuardDuty
- Amazon GuardDuty is a managed threat detection service that analyses CloudTrail, VPC flow logs, DNS and runtime activity for signs of compromise, such as crypto mining or credential misuse. Enable it in every account and Region, and route its findings to someone who will act on them. AWS docs: What is GuardDuty AWS docs: GuardDuty finding types Video: Amazon GuardDuty Deep Dive
- AWS Config rules
- AWS Config records how your resources are configured over time, and Config rules continuously evaluate them, for example "S3 buckets must block public access". It gives you both a compliance view and a history of who changed what. AWS docs: Evaluating resources with Config rules AWS docs: Managed Config rules list Video: AWS Config Tutorial
- Auto-remediation
- Auto-remediation fixes common findings automatically, for example re-enabling S3 public access blocks, using Config remediation actions or EventBridge with Lambda. Start with low-risk, well-understood fixes, because a bad automated change can break production. AWS docs: Remediating noncompliant resources with Config AWS docs: Security Hub and EventBridge Video: Create AWS Config Rule and apply an automatic remediation
- Compliance as code
- Compliance as code expresses audit requirements (CIS, SOC 2, PCI and so on) as automated checks and policies that run continuously. Instead of collecting screenshots once a year, you can show auditors live evidence and catch violations the day they happen. AWS docs: Config conformance packs AWS docs: What is Audit Manager Video: Compliance as Code: Automate Compliance Using Open Source Technology
- Prowler (optional)
- Prowler is a free open-source tool that runs hundreds of security checks against your AWS, Azure or Google Cloud account and maps the results to standards like CIS. It is a good way to audit a personal or lab account. Prowler documentation Prowler on GitHub Video: Prowler AWS Tutorial with Toni De La Fuente
- NIST CSF (optional)
- The NIST CSF (Cybersecurity Framework) is a free guide that groups security work into six functions: Govern, Identify, Protect, Detect, Respond and Recover. Many companies use it to plan and explain their security program. NIST Cybersecurity Framework NIST CSF 2.0 (PDF) Course: The Complete CompTIA Security+ SY0 701 Crash Course (NIST framework overview) Video: CertMike Explains NIST Cybersecurity Framework
- SOC 2 (optional)
- SOC 2 is an audit report, common for software companies in the US, that shows a company has working controls. Security is the one required criterion; availability, processing integrity, confidentiality and privacy are optional extras the company chooses. DevSecOps engineers often collect the evidence, such as logs and access reviews. AICPA: SOC 2 AWS: SOC FAQs Video: SOC 2 Compliance: Everything You Need to Know | Secureframe
- ISO 27001 (optional)
- ISO 27001 is an international standard for running an ISMS (Information Security Management System), which means a repeatable way to find risks and manage them. Companies get certified by an outside auditor, and it is widely asked for outside the US. BSI: ISO/IEC 27001 overview AWS: ISO 27001 FAQs Video: What is ISO 27001? Simple Explanation with Examples
Project: Auto-fix a public S3 bucket
Play through flAWS to see real AWS misconfigurations. Then enable Security Hub (with Security Hub CSPM) and GuardDuty, and build an EventBridge + Lambda remediation that blocks public access on any bucket within a minute of it being opened.
Common mistakes
- Enabling CloudTrail, GuardDuty or Config in one Region only. Turn them on in every Region and every account, ideally through an organisation-wide setup. Attackers often use Regions nobody is watching.
- Auto-remediating risky changes before testing them. Start with safe fixes like re-enabling S3 Block Public Access, run them in report-only mode first, and log every action taken.
- Treating a passing compliance score as being secure. Frameworks like CIS and SOC 2 are a minimum baseline. Combine Security Hub CSPM checks with threat detection and real attack testing.
You're ready to move on when you can
- Read a GuardDuty finding and decide if it's real
- Map a Security Hub CSPM control to a CIS benchmark item
- Build one automatic remediation
- Explain the shared responsibility model
Step 10: Logging, detection and incident response
No setup is perfectly secure, so you need good logs to notice when something goes wrong and a plan for what to do next. This step teaches you to collect the right logs, turn them into useful alerts, and respond calmly when there is an incident.
Time: 2 weeks. Skip if you can say which events your app and cloud account should log, build an alert from those logs, and walk through the steps of an incident response plan.
Topics
- Security logging
- Security logging means recording important events, such as logins, failed logins, permission changes and admin actions, with who, what, when and where. Never log passwords or secrets, and send logs to a central place attackers cannot easily delete them from. OWASP Logging Cheat Sheet OWASP Top 10:2025: Security Logging and Alerting Failures Course: Cybersecurity IDR: Incident Detection & Response | Google Cybersecurity Certificate (Overview of logs) Video: Log Data - CompTIA Security+ SY0-701 - 4.9
- SIEM basics
- A SIEM (Security Information and Event Management) system collects logs from many places, searches them, and raises alerts when it sees suspicious patterns. Splunk, Microsoft Sentinel, Elastic Security and Wazuh are common examples. NIST glossary: SIEM tool Elastic Security docs Course: Cybersecurity IDR: Incident Detection & Response | Google Cybersecurity Certificate (Overview of security information event management (SIEM) tools) Video: What Is SIEM?
- Alert triage
- Triage means quickly deciding whether an alert is real, how serious it is and who should handle it. Too many noisy alerts make people ignore them, so tune rules, add context and send findings like GuardDuty alerts to the right team. AWS: GuardDuty findings with EventBridge AWS: Security Hub and EventBridge Course: Cybersecurity IDR: Incident Detection & Response | Google Cybersecurity Certificate (Incident detection and verification) Video: SOC Alert Triage Explained: What Most Beginners Get Wrong
- Incident response
- Incident response is the plan for handling a security problem: prepare, detect and analyse, contain, remove the cause, recover and learn from it. NIST's latest guide (SP 800-61r3) groups this work under the CSF functions Govern, Identify, Protect, Detect, Respond and Recover. Writing the plan and practising it before an incident makes a real one far less chaotic. NIST SP 800-61r3: Incident Response Recommendations Course: Cybersecurity IDR: Incident Detection & Response | Google Cybersecurity Certificate (The incident response lifecycle) Video: Incident Response - CompTIA Security+ SY0-701 - 4.8
- Postmortems
- A postmortem is a short written review after an incident: what happened, the timeline, the root cause and the fixes. Keep it blameless, which means focusing on how the system allowed the mistake rather than on who made it, so people share the full story. Google SRE book: Postmortem culture Google SRE workbook: Postmortem culture Course: Cybersecurity IDR: Incident Detection & Response | Google Cybersecurity Certificate (Post-incident actions) Video: Postmortem Culture at Google: How do we learn from failures and how can you too? -Vasileios Souleles
- Wazuh (optional)
- Wazuh is a free open-source security platform that works as a SIEM and also watches servers for file changes, weak settings and known vulnerabilities. It is a good choice for a home lab to practise detection. Wazuh getting started Wazuh quickstart Video: you need this FREE CyberSecurity tool
- Splunk (optional)
- Splunk is one of the most widely used commercial SIEM and log search tools in large companies. Learning its search language (SPL) is a useful skill for security jobs, and there is a free trial for practice. Splunk: What is SIEM? Video: Splunk Tutorial for Beginners (Cyber Security Tools)
- SOAR (optional)
- SOAR (Security Orchestration, Automation and Response) tools run playbooks automatically when an alert fires, for example blocking an IP or disabling a user. They save time on repeated tasks, but start with simple scripts or Lambda functions first. NIST glossary: SOAR Shuffle (open-source SOAR) docs Video: What is SOAR (Security, Orchestration, Automation & Response)
- OWASP Logging Cheat Sheet
- NIST SP 800-61r3: Incident Response
- Google SRE book: Postmortem culture
- Wazuh quickstart
Project: Detect and respond to a fake attack
Install Wazuh on a local VM with at least 4 GB of RAM and connect one Linux machine to it. Trigger a few failed SSH logins and a suspicious file change, confirm the alerts show up, then write a one-page incident report with a timeline, root cause and fixes.
Common mistakes
- Writing passwords, tokens or session IDs into logs. Mask or drop sensitive fields before logging, and limit who can read logs. Logs are often copied to many systems with weaker access controls.
- Alerting on everything until the team ignores alerts. Start with a few high-value alerts, such as root logins and disabled CloudTrail, and tune noisy rules. Every alert should have an owner and a next step.
- Writing the incident response plan during the incident. Write a short runbook with contacts, access steps and containment actions in advance. Practise it with a tabletop exercise.
You're ready to move on when you can
- List the security events an app and a cloud account should log
- Explain what a SIEM does and show an alert in one
- Name the phases of incident response and what happens in each
- Write a blameless postmortem with a timeline and action items
Capstone project: A secure-by-default delivery pipeline
Build one GitHub Actions pipeline for a vulnerable app (such as OWASP Juice Shop) that runs Semgrep, Gitleaks, Trivy and Checkov, deploys with OIDC instead of stored keys, signs the image with Cosign, and only admits signed images to the cluster. Document every finding you fixed and every one you accepted, and why. That write-up is your best interview story.
Certifications
- CompTIA Security+ (SY0-701): Optional, good if you're new to security. Check the cert page for the current exam code before booking.
- AWS Certified Security – Specialty (SCS-C03): SCS-C03 replaced SCS-C02 in December 2025. Take it after step 10.
- Certified Kubernetes Security Specialist (CKS): Hands-on exam. Requires an active CKA first.
Frequently asked questions
How long does it take to become a DevSecOps engineer?
About 5–6 months at 8 hours a week if you already know DevOps basics. Coming from zero, add the 6–9 months of the DevOps roadmap first. Coming from security, you can move faster through the foundations and app security steps.
What's the difference between DevOps and DevSecOps?
DevOps automates how software is built and shipped. DevSecOps adds security checks into that same automation (code scanning, dependency and image scanning, secrets, policy and runtime detection) so security happens on every change instead of in a review at the end.
Is DevSecOps hard to learn?
It's broad rather than deep at the start: you need DevOps skills plus a security mindset. The tools are free and straightforward. The hard part, judging which findings matter, comes from practice, which is why most steps here use a vulnerable app.
Do I need to be a developer for DevSecOps?
No, but you need to read code well enough to understand a finding and explain the fix to a developer. Basic Python and comfort reading JavaScript or Java go a long way.
Which DevSecOps tools should I learn first?
One per category, all free: Semgrep (code), Gitleaks (secrets), Trivy (dependencies, images and IaC), Checkov (Terraform), Cosign (signing) and Falco (runtime). Learn the category; the tool can change.
Which certification is best for DevSecOps?
There's no single DevSecOps certification employers agree on. The strongest combination is AWS Security Specialty (cloud) plus CKS (Kubernetes), backed by a public pipeline project like the capstone here.