How system-sudo/devsecops-zero-to-hero works
1. This repository is primarily a DevSecOps training and lab repo, not a production application. Its architecture is documentation-led: most of the repo is organized into numbered learning modules (01-Introduction through 07-DevSecOps-Pipeline) that form a staged curriculum.
2. The core content layer is the set of Markdown guides. Each top-level numbered folder maps to one DevSecOps domain:
- Introduction / threat modeling
- Git security
- IaC security
- Container security
- DAST
- Runtime security
- End-to-end pipeline design
These modules are the “source of truth” for the training flow and are intended to be consumed sequentially.
3. The Git security subsystem is represented by repository-level safeguards:
- .pre-commit-config.yaml for local developer checks
- .github/workflows/gitleaks-worflow.yaml for CI secret scanning
- .gitignore for preventing accidental commits of sensitive or generated files
This layer models the “shift left” boundary where secrets are blocked before merge.
4. The IaC security subsystem lives in terraform/ and especially terraform/main.tf. It provides an infrastructure example that can be scanned and reviewed as part of the labs. This is the repository’s main provisioning boundary: code defines infrastructure, then security tools evaluate the configuration before deployment.
5. The container security subsystem is the only visible executable application sample in the repo: 04-Container-Security/app.js plus 04-Container-Security/package.json. This is likely a small Node.js demo app used to illustrate container hardening, image scanning, and secure-by-default packaging rather than serving as a full product backend.
6. The DAST and API security area is documentation-only (05-DAST/*). It frames the runtime testing phase of the pipeline: once an app is deployed, external scanners such as OWASP ZAP are meant to attack the running target from the outside. This creates a clear boundary between build-time controls and post-deploy validation.
7. The runtime security area (06-Runtime-Security/*) focuses on monitoring and policy enforcement after deployment. The docs explicitly point to Falco and compliance-as-code, which implies a runtime detection layer observing containers/Kubernetes activity and alerting on suspicious behavior.
8. The end-to-end pipeline subsystem (07-DevSecOps-Pipeline/*) ties the repo together conceptually. The README describes a “golden pipeline” with ordered gates:
- secret scanning at commit time
- SAST/SCA in build
- IaC scanning during provisioning
- DAST after deployment
- AI-assisted remediation
This is the main data flow model the repo teaches.
9. The automation/integration layer is GitHub-centric. .github/workflows/infra-create.yml suggests infrastructure provisioning automation, while the Gitleaks workflow enforces repository scanning in CI. The repository therefore uses GitHub Actions as the orchestration plane for security checks and infrastructure-related tasks.
10. There is an implicit control flow from developer workstation to CI to runtime:
- developer writes code/docs/IaC
- pre-commit and local git rules catch issues early
- GitHub Actions scans secrets and manages infra tasks
- Terraform defines deployable infrastructure
- container/app artifacts are tested for security
- DAST and runtime tooling validate the live environment
This is the architecture most useful to diagram: a layered DevSecOps lifecycle, not a single application stack.
11. The repo’s main boundary is between educational content and executable examples. Markdown drives the curriculum, while Terraform, GitHub workflows, and the Node sample app provide hands-on artifacts that the training materials reference.
12. In short, the repository is a security training platform built from documentation plus a few concrete lab assets. Its architecture is best drawn as a sequence of security gates around a minimal sample app and Terraform infrastructure, all coordinated through GitHub-based automation.
Main entry points: 01-Introduction.md Pipeline · 02-Git/README.md Git Security · 04-Container-Security/README.md Container Security · 01-Checkov.md IaC Security
Components 16
Curriculum
Numbered learning modules and repository entrypoints.
- README · Top-level orientation for the training repo.
README.md - Introduction · DevSecOps, shift-left, and threat modeling foundations.
01-Introduction/01-DevSecOps.md - Git Security · Repository hygiene and secret-prevention practices.
02-Git/README.md - IaC Security · Infrastructure scanning and secure provisioning concepts.
03-IaC/01-Checkov.md - Container Security · Hardening and scanning for containerized workloads.
04-Container-Security/README.md - DAST · External security testing against a running target.
05-DAST/README.md - Runtime Security · Post-deploy detection, monitoring, and policy enforcement.
06-Runtime-Security/01-what-is-runtime-security.md - Pipeline · End-to-end DevSecOps flow and gate sequencing.
07-DevSecOps-Pipeline/01-Introduction.md
Security Controls
Shift-left, CI, and policy layers that enforce the labs.
- Pre-commit · Local checks that block risky changes before commit.
.pre-commit-config.yaml - Secret Scan · GitHub Actions secret scanning for repository content.
.github/workflows/gitleaks-worflow.yaml - Ignore Rules · Prevents generated or sensitive files from being tracked.
.gitignore
Lab Artifacts
Concrete sample code and infrastructure used by the training material.
- Terraform · Provisioning boundary for deployable infrastructure.
terraform/main.tf - Sample App · Minimal Node.js application used in container labs.
04-Container-Security/app.js - Package · Dependency and runtime metadata for the sample app.
04-Container-Security/package.json
Automation
GitHub-centric orchestration for scans and provisioning.
- Infra Create · GitHub automation for infrastructure-related tasks.
.github/workflows/infra-create.yml - GitHub Actions · CI plane coordinating scans and infra automation.
Connections 22
- README → Introduction: starts · Repository orientation begins with the DevSecOps foundation.
- Introduction → Git Security: next · Moves from concepts to source-control safeguards.
- Git Security → IaC Security: next · Progresses into infrastructure-as-code security.
- IaC Security → Container Security: next · Shifts from provisioning to container hardening.
- Container Security → DAST: next · Transitions from build-time controls to external testing.
- DAST → Runtime Security: next · Moves from pre-release attack simulation to live monitoring.
- Runtime Security → Pipeline: next · Converges the learned controls into an end-to-end pipeline.
- Git Security → Pre-commit: enforces · Local developer checks implement shift-left guardrails.
- Git Security → Secret Scan: enforces · CI secret scanning backs up local repository hygiene.
- Git Security → Ignore Rules: supports · Ignore rules reduce accidental leakage into version control.
- IaC Security → Terraform: reviews · Terraform is the concrete provisioning artifact for scanning.
- Container Security → Sample App: uses · The sample app is the lab target for container security exercises.
- Container Security → Package: packages · Node metadata defines how the sample app is built and run.
- GitHub Actions → Secret Scan: runs · Actions executes secret scanning in CI.
- GitHub Actions → Infra Create: runs · Actions orchestrates infrastructure automation.
- Infra Create → Terraform: applies · Provisioning workflow consumes the Terraform boundary.
- Pipeline → Pre-commit: gates · The golden pipeline starts with commit-time controls.
- Pipeline → Secret Scan: gates · Repository scanning is a central pipeline stage.
- Pipeline → Terraform: gates · IaC scanning sits in the provisioning phase.
- Pipeline → DAST: gates · DAST is positioned after deployment.
- Pipeline → Runtime Security: gates · Runtime security validates the live environment.
- Sample App → GitHub Actions: feeds · The application is built and checked through the CI plane.