The Backend of LuckTrainingRoadmaps

DevSecOps Pipeline: Commit to Blue/Green Production (Chapter 23b)

DevSecOps Pipeline: Commit to Blue/Green Production (Chapter 23b) A workflow diagram generated by Archify. 01 / Developer 02 / CI plane 03 / Production EX / Exceptions Verify Gate Promote Parallel scanners (never on critical path) Push to Main · GitLab · Developer Push to Main GitLab Validate + Test · ruff, ty, pytest · CI plane › Verify Validate + Test ruff, ty, pytest SAST + Secrets · Semgrep, Bandit, Gitleaks · CI plane › Parallel scanners (never on critical path) › Verify SAST + Secrets Semgrep, Bandit, Gitleaks SBOM + Deps · Syft, Grype · CI plane › Parallel scanners (never on critical path) › Verify SBOM + Deps Syft, Grype Build + Image Scan · docker build, Trivy scan · CI plane › Gate Build + Image Scan docker build, Trivy scan Gate + Approval · 0/5/20 caps; human gate · CI plane › Promote Gate + Approval 0/5/20 caps; human gate Falco + Kubescape · syslog to Wazuh · Production › Gate Falco + Kubescape syslog to Wazuh Staging + Blue/Green · ArgoCD sync, 5% preview · Production › Promote Staging + Blue/Green ArgoCD sync, 5% preview Auto Rollback · abort, drain 300s · Exceptions › Gate Auto Rollback abort, drain 300s Gate Failed · merge blocked · Exceptions › Promote Gate Failed merge blocked SARIF + Trivy (DefectDojo import) push triggers pipeline analysis fail runtime events gate passed, approved threshold exceeded restore blue SBOM + deps docker build parallel fan-out (needs: []) Legend Developer CI job Security control Recovery action Deployment

Parallel by Design

  • • Validate runs ruff, ty, and shellcheck before pytest
  • • SAST, secrets, and SBOM/deps scan with no upstream dependency

One Enforcement Point

  • • Scanners allow_failure: true; Grype fails on any high-severity finding
  • • Thresholds: 0 critical, 5 high, 20 medium; then a human approves

Safe Production Promotion

  • • Blue/green preview starts at 5% traffic before promotion
  • • Analysis failure scales preview to zero and rolls back automatically