CI/CD Security: Shifting Left Without Overwhelming Engineers
Shift-left is right; shift-too-far-left is engineer burnout. The four checks that earn their CI place.
What shift-left should mean
Shift-left means catching security issues earlier in the SDLC, not later. The goal is developer feedback in minutes, not security report in months. The trap is piling every scanner into CI; the pipeline slows, developers learn to skip, coverage drops.
- The goal. Developer feedback in minutes; security findings appear in the PR, not a quarterly report.
- The trap. Every scanner shoved into CI; the pipeline becomes the bottleneck; engineers find workarounds.
- The right number. Four scanners; each catches a distinct class; together they cover the high-leverage cases.
- The discipline. Each scanner’s severity policy tuned; block on critical-reachable; warn on the rest; never page on warnings.
Four CI security checks
- 1. Secret detection (gitleaks).
- 2. SBOM + reachable CVE scan (Trivy + reachability).
- 3. IaC misconfig scan (Checkov, KICS).
- 4. Container image scan (Trivy, Grype).
False-positive discipline
Each scanner has a tunable allowlist. Document the allowlist, review quarterly, and never let "block on every finding" be the policy. Engineers learn to ignore alerts that fire too often.
- Tunable allowlist. Each scanner allows specific findings to be suppressed; review the allowlist quarterly to catch drift.
- Block on critical-reachable. Findings that affect production code paths block the merge; the rest stay warnings.
- Warn on others. Lower-severity or unreachable findings appear in the PR but do not block; engineers see them without being blocked.
- Never page on warnings. Pages are reserved for production incidents; CI warnings live in the PR review surface.
Shift-right complement
Runtime tools (Falco, Tetragon) catch what static scans miss: behaviour at runtime that did not exist in the source code at scan time. Both layers are needed; they are complementary, not substitutes.
- Runtime detection. Falco, Tetragon watch syscalls and network behaviour; catches the runtime exploit static scans cannot see.
- Catches the missing class. Vulnerabilities introduced by configuration, not code; the dependency injected at runtime; behaviour shift after deploy.
- Complementary. Shift-left catches what is in the source; shift-right catches what runs in production; both layers fire on different signals.
- Not a substitute. Runtime detection is reactive; shift-left is preventive; the discipline ships both.
Antipatterns
- 10 scanners in CI. Pipeline becomes the bottleneck.
- Every finding blocks the merge. Engineers find workarounds.
- Shift-left only. Misses runtime threats.
What to do this week
Three moves. (1) Apply this to one pipeline first. (2) Measure deploy frequency / MTTR before/after. (3) Document the outcome so the next team starts from data.