After Log4Shell (2021), the SolarWinds compromise (2020), and the xz-utils backdoor (2024), the industry stopped pretending security could be bolted on at the end. DevSecOps embeds checks into every stage — SAST in the IDE, SCA on every PR, container scans at build, signed attestations at release, policy-as-code at admission. This chapter maps the toolchain in 2026 and the frameworks the auditors will ask about.
16.1 · Shift-left security
Definition.Shift-left is the practice of moving security checks as early in the SDLC as possible — IDE → commit → PR → build → deploy → run — so issues are found when they are cheap to fix, not in production.
Studies dating back to NIST SP 500-204 (1980s) and updated by Capers Jones / IBM Systems Sciences place the production-fix cost at roughly two orders of magnitude above the IDE-fix cost. Shift-left is the structural response.
16.2 · SAST — Static Application Security Testing
Definition. SAST analyses source code (or compiled bytecode) for vulnerability patterns without executing it.
Tool
Owner
Notes
Semgrep
Semgrep Inc. (OSS + Pro)
Pattern rules in YAML; very fast; 2k+ community rules.
CodeQL
GitHub (GitHub Advanced Security)
Datalog-style query; deep dataflow; the engine behind Default Setup.
Definition. DAST attacks a running application from the outside (HTTP/API) to find runtime vulnerabilities the source view can't see (auth, session, misconfigurations).
Tool
Notes
OWASP ZAP / Burp Suite
OSS de-facto (zap-baseline.py); PortSwigger pen-tester standard with Enterprise CI mode.
Invicti / Nuclei / AppCheck
Enterprise proof-based · OSS template scanner · UK commercial DAST.
16.4 · IAST & RASP
IAST (Interactive AST) instruments the running app like an APM agent and observes vulnerabilities during functional tests. RASP (Runtime Application Self-Protection) stays in production and blocks attacks live.
Definition. SCA inspects your declared dependencies (manifests + lockfiles) and matches them against vulnerability databases (NVD, GHSA, OSV) and licence catalogues.
Tool
Notes
GitHub Dependabot
Free on GitHub; alerts + auto-PRs (GHSA).
Snyk OSS / Renovate / OSV-Scanner
Broad ecosystem; group/schedule rules; OSV.dev DB + GH Action.
Built-in to host; blocks pushes containing known token formats.
If it ever hit Git, rotate it. Even after rewriting history, you must assume the secret leaked. Push-protection is the only way to stop the bleed at source.
Definition. A software supply chain is every input that becomes part of (or builds) your artefact: source, dependencies, base images, compilers, build runners. Securing it means generating evidence at build time and verifying it at deploy time.
L1: provenance exists. L2: signed by hosted build platform. L3: hardened, isolated builder; tamper-resistant provenance.
# Sign and verify a container image, keyless (OIDC)cosign sign ghcr.io/acme/api:v1.4.2
cosign verify ghcr.io/acme/api:v1.4.2 --certificate-identity-regexp 'https://github.com/acme/.+' --certificate-oidc-issuer https://token.actions.githubusercontent.com
16.10 · Policy-as-code
Tool
Language
Scope
OPA / Conftest (CNCF graduated)
Rego
Universal policy engine; Conftest evaluates config files in CI.
Kyverno (CNCF graduated 2024)
YAML
Kubernetes-native; easier than Rego for K8s.
Cedar (AWS, OSS 2023)
Cedar
AWS Verified Permissions; fine-grained authz.
16.11 · Admission control on Kubernetes
Definition. An admission controller is a webhook K8s calls before persisting an API object. It can validate (allow/deny) or mutate (rewrite). It's the choke point where policy-as-code lives.
Generate at build — syft packages dir:. -o spdx-json > sbom.spdx.json or trivy sbom; attach as an OCI artefact (cosign attach sbom) or a GitHub artifact attestation.
Scan continuously — grype sbom:./sbom.spdx.json against fresh vuln DBs; rescan even when nothing rebuilds (new CVEs match yesterday's artefacts).
16.13 · Compliance frameworks the pipeline maps to
Framework
What & year
Pipeline mapping
SOC 2 Type II
AICPA Trust Services Criteria, attestation report over 6–12 months.
SBOMs, vuln-handling, 24h disclosure for actively exploited.
NIST SSDF SP 800-218
Secure SDF; required for US-gov suppliers.
Maps directly to CI/CD practices.
16.14 · Anti-patterns
Security as a gate at the end. Pen-test the week before launch is too late and too political.
Vulnerability fatigue. 10 000 open Highs ≈ zero open Highs. Rank by exploitability + reachability (EPSS, runtime presence).
The xz-utils lesson (CVE-2024-3094). A multi-year social-engineering campaign placed a backdoor in a near-ubiquitous OSS library via a trusted maintainer hand-off. SBOMs, SLSA provenance, and reproducible builds turned weeks of incident response into a quick blast-radius assessment.
16.15 · Self-check
Q1 · Which Sigstore component issues short-lived signing certificates bound to an OIDC identity?
Cosign
Fulcio
Rekor
Gitsign
Q2 · Which scan type instruments a running application and observes vulnerabilities during functional tests?
SAST
SCA
IAST
DAST
Q3 · You want to block any pod in your K8s cluster whose image is not signed by your GitHub org's OIDC identity. The simplest 2026 path is:
A PodSecurityPolicy (PSP) rule
A Kyverno ClusterPolicy with verifyImages + Cosign keyless