Case study · Security & compliance

DevSecOps CI/CD Pipeline

A delivery pipeline for a FastAPI service that scans code, dependencies, images and infrastructure, signs the image, and lets only signed images run on EKS.

Source on GitHub ↗

How it fits together

  1. Commit
    • flake8, black, isort
    • unit tests + coverage
  2. Scan
    • Semgrep (SAST, SARIF)
    • Trivy (Dockerfile + image)
    • Checkov (Terraform + K8s)
  3. Build
    • multi-arch image
    • push to ECR
    • Cosign keyless signature
    • SLSA provenance
  4. Deploy (EKS)
    • OPA Gatekeeper policies
    • rollout + health check
    • Prometheus alerts

The problem

Security reviews done by hand at the end of a release are slow and miss things. The goal was a pipeline where each check runs on every change and the cluster refuses anything that did not pass.

What I built

Decisions

What went wrong: Where the gates are soft

A review of the workflows found that Checkov runs with --soft-fail, so a Terraform or Kubernetes misconfiguration is reported but does not stop the build. The PRD targets (for example 95% fewer vulnerabilities in production) are goals, not measured results, so they are not quoted as results here.

What I would improve next

GitHub ActionsSemgrepTrivyCheckovCosignOPA GatekeeperTerraformAWS EKS

← All projects