Skip to content

Latest commit

History

64 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

DevSecOps Intro β€” Security as Code, From SDLC to Runtime

labsbonusexamfocusduration

A hands-on elective course that teaches how to build a working DevSecOps program. You operate the same target β€” OWASP Juice Shop β€” across 10 weeks, applying a different defensive practice each lab: pre-commit secrets, signed commits, SBOM, SAST, DAST, IaC scanning, container hardening, supply-chain signing, runtime detection, and full-program triage in DefectDojo.

"Security is not a product, but a process." β€” Bruce Schneier, Secrets and Lies (2000)


Course Roadmap

The course follows a map β†’ discover β†’ write β†’ ship β†’ scan β†’ harden β†’ sign β†’ detect β†’ triage progression. Each week adds one defensive layer to the same Juice Shop target.

WeekLabModuleKey Topics & Technologies
1Lab 1Foundations & SDLCOWASP Top 10:2025, Juice Shop deploy, PR workflow
2Lab 2Threat ModelingSTRIDE, DFDs, trust boundaries, Threagile YAML
3Lab 3Secure GitSSH commit signing, pre-commit gitleaks, history rewrite with git filter-repo
4Lab 4SBOM + SCASyft (CycloneDX 1.7 + SPDX), Grype, Trivy, sign-ready attestations
5Lab 5SAST + DASTSemgrep (p/owasp-top-ten), ZAP baseline + authenticated, cross-tool correlation
6Lab 6IaC SecurityCheckov 3.x on Terraform, KICS on Ansible + Pulumi, custom Checkov policies
7Lab 7Container/K8sTrivy image and Dockerfile scan, Pod Security Standards (restricted), securityContext, NetworkPolicy, read-only root filesystem
8Lab 8Supply ChainCosign 3.0 sign + verify + tag-overwrite demo, CycloneDX and SLSA attestations, cosign sign-blob
9Lab 9Runtime + PaCFalco (modern eBPF), custom rules, Conftest/Rego policies at CI time
10Lab 10Vulnerability ManagementDefectDojo capstone β€” import labs 4-7, dedup, SLA configuration, finding age and SLA compliance, 5-min walkthrough
β€”Lab 11Edge Hardening (bonus)Nginx TLS 1.3, security headers, rate limiting, cert rotation; bonus: Coraza WAF + OWASP CRS
β€”Lab 12VM Sandboxing (bonus)Kata Containers, runc-vs-VM isolation, perf benchmark; bonus: a privileged-container escape stopped by the guest kernel

The Project: OWASP Juice Shop

A vulnerable-by-design web application created by BjΓΆrn Kimminich in 2014, an OWASP Flagship project. The course pins v20.0.0 (May 2026 release, Node 24, 112 challenges including chatbot prompt injection).

graph LR
L1["πŸ“‚ Lab 1<br/>Deploy + Triage"] --> J[(OWASP Juice Shop<br/>v20.0.0)]
L3["πŸ” Lab 3<br/>Signed commits"] --> J
L4["πŸ“‹ Lab 4<br/>SBOM (3069 components)"] --> J
L5["πŸ§ͺ Lab 5<br/>SAST + DAST"] --> J
L7["πŸ“¦ Lab 7<br/>Container scan + harden"] --> J
L8["πŸ” Lab 8<br/>Cosign sign"] --> J
L9["🐝 Lab 9<br/>Falco runtime"] --> J
L10["🎯 Lab 10<br/>DefectDojo triage"] --> J
style J fill:#FF9800,color:#fff
Loading

You don't build the app; you make it secure. Labs 2 (Threat Modeling), 6 (IaC), 11 (reverse proxy), and 12 (VM sandboxing) operate on adjacent scopes β€” playgrounds, model files, and infra β€” but Juice Shop is the thread connecting the others.


Lectures + Readings

10 lectures, 17-25 slides each. Two readings replace lectures for the bonus labs.

#TitleFile
1DevSecOps Foundations: From "Add Security Later" to "Security Everywhere"lec1.md
2Threat Modeling: STRIDE, DFDs, and Threagilelec2.md
3Secure Git: Signed Commits, Secret Scanning, and History Hygienelec3.md
4CI/CD Security: Treating the Pipeline as an Attackable Systemlec4.md
5SAST + DAST: Reading the Code, Then Watching It Runlec5.md
6IaC Security: Scanning Your Cloud Before It Burnslec6.md
7Container & Kubernetes Security: Scanning the Artifact, Hardening the Clusterlec7.md
8Supply Chain Security: Signing, Attestation, and the xz Backdoorlec8.md
9Monitoring, Compliance & Maturity: From Findings to a Programlec9.md
10Vulnerability Management: From 1 000 Findings to a Working Programlec10.md
R11Reading β€” Web Edge Hardeningreading11.md
R12Reading β€” VM-Backed Containers + Confidential Computingreading12.md

Technology Stack

All tools free and open-source (or have a meaningful free tier). tools/versions.yaml is the source of truth for every pin; a weekly job reports when one falls behind upstream. Pins are refreshed before each cohort, not mid-semester.

CategoryToolVersionIntroduced
Target appOWASP Juice Shopv20.0.0Week 1 (provided)
ContainersDocker / Docker Compose28.xWeek 1
Threat modelingThreagile0.9.1 (Jul 2024, latest release)Week 2
Pre-commit frameworkpre-commitlatestWeek 3
Secret scanninggitleaks8.30.xWeek 3
History rewritegit-filter-repo2.45+Week 3
SBOMSyft1.51.xWeek 4
SCAGrype0.118.xWeek 4
Multi-purpose scannerTrivy0.74.xWeek 4, 6, 7
SASTSemgrep CE1.176.xWeek 5
DASTZAP (ex-OWASP, now Checkmarx)2.17.x via the stable tagWeek 5
IaC scanning (Terraform)Checkov3.3.xWeek 6
IaC scanning (Ansible/Pulumi)KICSlatestWeek 6
Kubernetesk3d (k3s in Docker)v5.9.0 / k3s v1.33.xWeek 7
Policy-as-CodeConftest + OPA Rego0.69.x / 1.15.xWeek 7, 9
Supply chainCosignv3.0.x (not 3.1: see versions.yaml)Week 8
Local registryDistributionv3Week 8
Runtime detectionFalco0.43.1Week 9
Vulnerability mgmtDefectDojov2.58.xWeek 10
Bonus: EdgeNginxstable-alpineLab 11
Bonus: VM sandboxKata Containers4.1.xLab 12

What Ships vs What Students Produce

The course repo ships only lab specs, lecture notes, and plumbing files. Students produce all their artifacts in their fork.

PathShips in repoStudents produce
lectures/βœ…
labs/labN.mdβœ…
labs/lab2/threagile-model.yaml β€” Threagile baselineβœ…
labs/lab5/scripts/ β€” ZAP auth config + helper scriptsβœ…
labs/lab6/vulnerable-iac/ β€” TF/Pulumi/Ansible samplesβœ…
labs/lab9/manifests/, labs/lab9/policies/ β€” K8s + Rego startersβœ…
labs/lab10/imports/ β€” DefectDojo importerβœ…
labs/lab11/docker-compose.yml, labs/lab11/reverse-proxy/nginx.confβœ…
labs/lab12/scripts/ β€” Kata install/configureβœ…
tools/ β€” version manifest + drift and lab checkersβœ…
.github/workflows/course-health.yml, .github/ISSUE_TEMPLATE/βœ…
.github/PULL_REQUEST_TEMPLATE.md β€” students write in Lab 1βœ…
.github/workflows/*.yml β€” students add from Lab 1 bonus onwardβœ…
.pre-commit-config.yaml β€” students write in Lab 3βœ…
labs/lab4/juice-shop.cdx.json β€” SBOM regenerated each runβœ… (gitignored)
labs/lab6/policies/my-custom-policy.yaml β€” Lab 6 bonusβœ…
labs/lab7/k8s/*.yaml β€” hardened deploymentβœ…
labs/lab8/keys/cosign.pub β€” public key (private gitignored)βœ…
labs/lab9/falco/rules/custom-rules.yamlβœ…
submissions/labN.md β€” lab reports, one per weekβœ…

The .gitignore keeps student-produced artifacts (submissions/, .github/workflows/, generated SBOMs, private keys, scan outputs) out of the course repo. Instructor-only reference submissions live in refs/ and are also gitignored.


Lab Structure

Each main lab (Labs 1-10) caps at 12 pts = 10 main + 2 bonus.

TaskPointsDescription
Task 16 ptsCore practice β€” advances the project; future labs depend on it. Required.
Task 24 pts (3 in Lab 1)Deeper dive into the week's topic. Skippable; project still works without it.
Task 31 ptLab 1 only β€” GitHub community engagement.
Bonus Task2 ptsExtension for motivated students (flat 2 pts, not difficulty-weighted).

A student who only completes Task 1 across all 10 labs ends with a working DevSecOps pipeline β€” just not all the deeper-dive controls.

Bonus labs (11 + 12) have a tighter shape: Task 1 (4 pts) + Task 2 (4 pts) + Bonus Task (2 pts) = 10 pts total (vs main labs' 12). The labs are bonus-track in the sense that they're not on the critical path; the Bonus Task inside each lab is still the harder extension. Bonus labs count toward a separate 20% weight (see grading below).

Submission Workflow

graph LR
A["Fork Repo"] --> B["Create Branch<br/>feature/labN"]
B --> C["Complete Tasks"]
C --> D["Write<br/>submissions/labN.md"]
D --> E["Push & Open PR"]
E --> F["Submit PR URL<br/>via Moodle"]
F --> G["Receive Feedback"]
style A fill:#4CAF50,color:#fff
style E fill:#F44336,color:#fff
style F fill:#00BCD4,color:#fff
Loading

Submissions are CLI output + brief analysis, not source code. Paste the commands you ran and what they printed; answer the questions at the end of each task in 2-3 sentences.


Grading

Five components. Their max contributions sum to 139% but the grade is capped at 100% β€” multiple paths to A; no single mandatory path.

ComponentRaw PointsWeightWhat it rewards
Main labs 1-10 (Task 1 + Task 2 + Task 3 where applicable)10070%Diligent project work β€” the floor for any serious student
Bonus tasks 1-10 (2 pts each, flat β€” no difficulty weighting)2014%Going above and beyond on weekly topics
Quiz leaderboards (5 rolling per-2-labs leaderboards, top-10 share 1% pool each)β€”up to 5%Engagement + excellence; rewards late-joining students too
Bonus labs 11 + 12 (Task 1 + Task 2 + Bonus = 10 pts each)2020%Edge hardening + VM-backed isolation
Final examβ€”30%Optional path β€” written, comprehensive
Sum (capped at 100%)139%

Paths to A

Two real paths to A (β‰₯90%):

  • Practice path: all main labs + bonuses + both bonus labs β†’ β‰₯90%. No exam required.
  • Exam path: all main labs + bonuses + decent exam β†’ β‰₯90%. No bonus labs required.

Sample scores:

ProfileMainBonusesBonus labsExamQuizTotal
All Task 1 only42%0%0%0%0%42%
All Task 1+2, no bonuses70%0%0%0%0%70%
Add all weekly bonuses70%14%0%0%0%84%
+ good quiz70%14%0%0%5%89% ← just short of A
+ finish one bonus lab70%14%10%0%5%99% ← A territory
+ both bonus labs70%14%20%0%5%100% (capped)
Take the exam instead70%14%0%25%5%100% (capped)

The deliberate design:Main + lab-bonuses + quiz alone tops out at 89% β†’ just short of A. To earn A you must do at least one bonus lab OR the exam. Stops "easy A from quiz padding."

Quiz leaderboards (the 5%)

Five rolling windows, one per pair of labs:

WindowLabs covered
1labs 1-2
2labs 3-4
3labs 5-6
4labs 7-8
5labs 9-10

Each window allocates a 1% pool to its top 10 students. Late-joiners can still rank in later windows without being structurally disadvantaged.

Performance tiers

GradeRangeRequired to reach
A90-100All main labs + at least one of: bonus labs / exam
B75-89Main labs + most bonuses, no extension work
C60-74Main lab Task 1 across most labs
D0-59Below expectations

Late submissions

Max 6/12 per lab if submitted within 1 week of deadline. No credit after 1 week.


Required Software

Core (all weeks)
  • Git β‰₯ 2.34, Docker β‰₯ 26, Docker Compose
  • A terminal (bash/zsh)
  • Text editor with Markdown support
  • curl, jq
Per-week additions
WeekAdd
3gitleaks (v8.21+), Python 3.10+ with pre-commit + git-filter-repo
4syft, grype, trivy
5semgrep (pip install), ~3 GB free disk for Juice Shop source clone
6checkov (pip install --break-system-packages if PEP-668), Docker for KICS
7k3d v5.8+, kubectl v1.33+, conftest v0.68+
8cosign v3.x, optional: GitHub account for OIDC keyless signing
9Linux kernel β‰₯ 5.8 (for modern eBPF); Falco runs in Docker but needs the host kernel
10~4 GB RAM headroom for DefectDojo
11 (bonus)openssl, testssl.sh (optional)
12 (bonus)Linux host with KVM (/dev/kvm), containerd. Not WSL2 by default (unless KVM enabled).

Repository Structure

DevSecOps-Intro/
β”œβ”€β”€ README.md # This file
β”œβ”€β”€ .gitignore # Keeps student artifacts + refs/ out
β”‚
β”œβ”€β”€ lectures/ # 10 lectures + 2 readings (ships)
β”‚ β”œβ”€β”€ lec1.md ... lec10.md
β”‚ └── reading11.md, reading12.md
β”‚
β”œβ”€β”€ labs/ # Lab specs + plumbing (ships)
β”‚ β”œβ”€β”€ lab1.md ... lab12.md
β”‚ β”œβ”€β”€ lab2/threagile-model.yaml # Threat model baseline
β”‚ β”œβ”€β”€ lab5/scripts/ # ZAP auth config + helpers
β”‚ β”œβ”€β”€ lab6/vulnerable-iac/ # TF/Pulumi/Ansible samples
β”‚ β”œβ”€β”€ lab9/manifests/, lab9/policies/ # K8s + Rego starters
β”‚ β”œβ”€β”€ lab10/imports/ # DefectDojo importer
β”‚ β”œβ”€β”€ lab11/docker-compose.yml, lab11/reverse-proxy/ # Nginx stack
β”‚ └── lab12/scripts/, lab12/setup/ # Kata install
β”‚
β”œβ”€β”€ tools/ # Course maintenance (ships)
β”‚ β”œβ”€β”€ versions.yaml # every pinned tool version, one source of truth
β”‚ β”œβ”€β”€ check-versions.py # compares the pins with upstream releases
β”‚ └── verify-lab.sh # runs every shell block of a lab spec
β”‚
β”œβ”€β”€ refs/ # Instructor reference submissions (gitignored)
β”‚ └── labN.md # model answers per lab, captured from dry-runs
β”‚
└── submissions/ # (students write one report per lab, in their fork)

Key Books & Resources

πŸ“– BookAuthor(s)Why
Threat Modeling: A Practical Guide for Development TeamsTarandach & Coles (O'Reilly, 2021)Best modern primer; pairs with Threagile
Web Application SecurityAndrew Hoffman (O'Reilly, 2020)Companion to Juice Shop; explains what DAST is testing for
Container SecurityLiz Rice (O'Reilly, 2020)Ch. 11 on runtime security is the strongest book chapter on Falco's terrain
Software Supply Chain SecurityCassie Crossley (Manning, 2024)Best single book on the L8 material
Securing DevOpsJulien Vehent (Manning, 2018)Real Mozilla pipeline walkthrough; ch. 9-10 cover the L10 metrics + program loop
Application Security Program HandbookDerek Fisher (Manning, 2023)Best single book on program metrics + SLAs
Standards & specs (bookmark these)
Talks
  • "What Happens When Falco Detects?" β€” Loris Degioanni, KubeCon EU 2024
  • "The xz Backdoor β€” Engineering Postmortem" β€” Andres Freund, BSDCan 2024
  • "Sigstore: Software Signing for Everybody" β€” Luke Hinds, KubeCon 2022

Course Completion

By Week 10 you'll have:

  • A working DevSecOps pipeline operating against OWASP Juice Shop with controls at pre-commit, build, deploy, and runtime
  • A DefectDojo instance with all prior labs' findings deduped + triaged under an SLA matrix
  • A 5-minute interview walkthrough script you can use in DevSecOps job interviews
  • If you did the bonus labs: a production-grade Nginx reverse-proxy config + first-hand experience with VM-backed container sandboxing

This is exactly the portfolio you'd walk through in a DevSecOps interview β€” see the 5-minute walkthrough script in submissions/lab10-walkthrough.md (produced in Lab 10 bonus).

About

πŸš€ DevSecOps intro elective β€” 10 hands-on labs + 2 bonus hardening OWASP Juice Shop: threat modeling (STRIDE/Threagile), signed commits & secret scanning, SBOM/SCA, SAST + DAST, IaC security (Checkov/KICS), container & supply-chain hardening (Trivy, Cosign), runtime detection with Falco, and DefectDojo vuln management.

Topics

Resources

Stars

80 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages