Developer
developerGit workflows, conventional commits, pre-commit hooks, fixing failing builds, understanding why security gates block PRs, feature flags.
DevSec Core
Pipeline-first guides for developers, platform engineers, and security architects—why each CI/CD stage exists, what breaks without it, what attackers exploit, and how world-class teams ship software with security built in, not bolted on.
DevOps collapsed the wall between development and operations—automated builds, continuous integration, infrastructure as code. But security often stayed a separate gate at release time: scan in staging, block the deploy, developers bypass checks under deadline pressure, and vulnerabilities ship anyway.
The bolted-on security trap: security as last gate → release blocked → rushed hotfix → insecure workaround merged → audit finding six months later. The pipeline becomes adversarial instead of collaborative.
DevSecOps integrates security into every stage of the delivery lifecycle—IDE, commit, PR, build, test, deploy, operate. Think of a factory assembly line: catching a defective part at the loading dock costs pennies; shipping it to the customer costs millions. Shift-left moves security checks earlier where fixes are cheaper and feedback is faster.
Each leftward move catches defects earlier, cheaper, and with less context switching. Security gates at release alone cannot compensate for missing unit tests, unscanned dependencies, or hardcoded secrets in git history.
Secret detection, linting, format checks—fix in the editor before the commit exists in history.
SAST, SCA, IaC scan, code review—block merge before broken code reaches main.
Unit/integration tests, container scan, SBOM generation—verify artifact integrity at build time.
Signed images, policy admission (Kyverno/Gatekeeper), progressive delivery with metric gates.
Runtime protection, DAST in staging, production feedback loops—close the loop back to Plan.
Shift-left adds pipeline time upfront. The alternative—shift-right-only security—is cheaper per build but exponentially more expensive per incident. Elite teams treat pipeline minutes as insurance premiums, not tax.
Attackers target the weakest link in the chain: leaked CI tokens, dependency confusion, unsigned container images, or Terraform state with plaintext secrets. DevSecOps closes each link systematically.
The infinite loop from planning to monitoring—with security integrated at every stage, not just Release. Orange stages highlight primary security touchpoints.
↺ feedback to Plan — threat intel, incident learnings, dependency CVEs
Trigger
Lint & SAST
Build
Test
Scan & SBOM
Publish
Deploy
flowchart LR
P[Plan] --> C[Code]
C --> B[Build]
B --> T[Test]
T --> R[Release]
R --> D[Deploy]
D --> O[Operate]
O --> M[Monitor]
M --> P
subgraph sec["Security integrated"]
C
T
R
end
Google runs thousands of builds per day with hermetic, reproducible builds and signed provenance. Netflix uses Spinnaker with automated canaries and security gates tied to observability metrics. Financial institutions add CAB approval and segregation of duties—same lifecycle, stricter gates at Release.
The four pillars of software delivery performance—how fast you ship, how reliably, and how quickly you recover. DevSecOps improves all four when security gates are automated, not manual bottlenecks.
Metric 1
How often you deploy to production. Elite: multiple times per day.
Metric 2
Commit to production. Elite: less than one hour.
Metric 3
% of deploys causing failure. Elite: 0–15%.
Metric 4
Time to restore service after incident. Elite: less than one hour.
Elite
All four metrics at elite tier—world-class delivery performance with room to optimize security gate latency.
When asked how DevSecOps affects DORA metrics: automated security gates reduce lead time vs manual review, lower change failure rate via shift-left catches, and fast rollback pipelines improve MTTR. Trade blocking gates vs warning gates explicitly.
From git push to production observability—the toolchain layers every mature delivery pipeline composes. Purple = CI/CD core; orange = security & governance.
Start with one CI platform, one scanner per category (SAST, SCA, container), and OIDC to cloud—no long-lived keys. Add policy engines after baseline scans are green.
SolarWinds (2020), Log4Shell (2021), xz-utils (2024)—attackers target the pipeline itself. SBOM, provenance, and signing are the tamper-evident seals of modern delivery.
SLSA levels — click to explore requirements:
Level 2 — Most teams target here: GitHub Actions OIDC → Sigstore keyless signing → cosign verify in admission controller. Provenance answers: who built this, from which commit, on which platform.
Click a stage to see attack vectors and mitigations:
Generating an SBOM but never scanning it, or signing images without verifying at deploy time, gives compliance theater—not supply chain security. Policy must enforce verify steps in the cluster admission path.
From Agile Infrastructure to supply chain executive orders—the path to security-as-code.
Agile Infrastructure conference—development and operations collaboration, automated delivery foundations.
Jez Humble & David Farley codify deployment pipelines, build once promote everywhere, fast feedback loops.
Security practitioners argue security must be embedded in DevOps workflows—not a separate silo at release.
Regulatory mandates accelerate audit trails, access controls, and automated compliance evidence in pipelines.
Nation-state compromise of build pipeline—18,000 organizations affected. Supply chain security becomes C-level priority.
US EO 14028 mandates SBOM for federal software. Log4j CVE shows dependency visibility crisis at global scale.
Google's SLSA framework matures. Sigstore provides free keyless signing infrastructure for open source and enterprises.
CNCF adopts SLSA. GitHub native build provenance reaches millions of repositories.
Malicious maintainer backdoor in ubiquitous compression library—renewed urgency for maintainer trust and SBOM monitoring.
Every chapter shows GitHub Actions and GitLab CI side-by-side. Toggle persists across the guide via localStorage.
name: CI
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
id-token: write
jobs:
build-test-scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Unit tests
run: npm ci && npm test
- name: SAST
run: semgrep scan --config=auto --sarif > semgrep.sarif
- name: Container scan
run: |
docker build -t app:${{ github.sha }} .
trivy image --exit-code 1 --severity CRITICAL,HIGH app:${{ github.sha }}
stages: [test, scan, build]
unit-tests:
stage: test
script:
- npm ci
- npm test
artifacts:
reports:
junit: junit.xml
sast:
stage: scan
script:
- semgrep scan --config=auto --sarif > gl-sast-report.sarif
artifacts:
reports:
sast: gl-sast-report.sarif
container-scan:
stage: scan
script:
- docker build -t $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA .
- trivy image --exit-code 1 --severity CRITICAL,HIGH $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
GitHub Actions runners are ephemeral VMs that clone your repo, execute steps, then destroy the environment. GitLab runners poll for jobs (shell, Docker, or K8s executor). Both support OIDC for short-lived cloud credentials— no AWS keys stored in CI variables.
Twelve deep-dive chapters plus cheat sheets. Recommended path: Source Control → CI Pipelines → Security Scanning → Secrets, then deployment and IaC as your role requires.
Learning path: Source Control · CI Pipelines · Security Scanning · Secrets · Deployment
Git workflows, conventional commits, pre-commit hooks, fixing failing builds, understanding why security gates block PRs, feature flags.
Pipeline design, runners, caching, reusable templates, OIDC, artifact registries, GitOps promotion, environment management.
Threat modeling pipelines, SLSA/SBOM/signing, policy as code, SAST/DAST/SCA strategy, compliance automation, zero-trust CI access.
TBD, GitFlow, branch protection, signed commits, CODEOWNERS, pre-commit hooks.
Pipeline anatomy, GitHub Actions, GitLab CI, optimization, templates, Jenkins migration.
Test pyramid, Testcontainers, Pact, E2E, performance testing, flaky test management.
SAST, SCA, DAST, container scan, secret scan, IaC scan, SARIF integration.
Vault, cloud secrets, K8s secrets, OIDC in CI, rotation, least privilege.
Registries, promotion, SBOM, SLSA provenance, Cosign signing, immutability.
Blue-green, canary, feature flags, progressive delivery, DB migrations, rollback.
Terraform, Ansible, Pulumi, Terragrunt, plan/apply in CI, drift detection.
OPA, Gatekeeper, Kyverno, Conftest, compliance frameworks, DORA automation.
Dev/staging/prod strategy, review apps, promotion pipelines, config per env.
Build metrics, DevEx, production feedback loops, incident integration, chaos.
Developer, DevOps, and security engineer quick references with copy-to-clipboard.