End-to-End Security for Modern Software Delivery
Introduction: The Longest Attack Surface
- Why Traditional Security Fails
- What This Book Covers
- Who Should Read This Book
- How to Use the Code Examples
- The Security Mindset
Chapter 1: The Software Supply Chain Under Attack
- Anatomy of a Modern Build Pipeline
- High-Profile Breaches That Changed Everything
- The Trust Model We Inherited
- Attack Surfaces Across the Lifecycle
- Why Traditional Security Fails Supply Chains
- What Comes Next
Chapter 2: Threat Models and Adversary Playbooks
- Threat Actor Profiles
- The Software Supply Chain Kill Chain
- Dependency Confusion and Typosquatting Attacks
- Build System Compromise Scenarios
- Modeling Your Own Risk
- What Comes Next
Chapter 3: Securing Dependencies and Package Ecosystems
- How Package Ecosystems Work
- Dependency Confusion Explained and Defended
- Typosquatting and Malicious Packages
- Lock Files, Version Pinning, and Reproducible Resolutions
- Private Registries and Proxy Caching Strategies
- Software Composition Analysis (SCA) Tools in Practice
- What Comes Next
Chapter 4: Secure Source Code and Repository Hygiene
- Branch Protection Rules That Actually Work
- Code Review as a Security Control
- Secrets Detection in Source
- Signed Commits and Tags with GPG/SSH Keys
- Repository Permissions and Least Privilege
- Pre-Commit Hooks for Security Checks
- What Comes Next
Chapter 5: Reproducible and Hermetic Builds
- What Makes a Build Reproducible (and Why It Matters)
- Hermeticity: Eliminating Hidden Dependencies
- Bazel for Reproducible Builds
- Nix as a Build System and Package Manager
- BuildKit and Docker Build Reproducibility
- Testing Your Build Reproducibility
- Trade-offs and Practical Considerations
- What Comes Next
Chapter 6: Artifact Signing and Cryptographic Identity
- The Math Behind Artifact Signing
- Key Management Strategies for Organizations
- Cosign: Signing Containers and OCI Artifacts
- Fulcio: Certificate Authority for Software Supply Chains
- Rekor: Transparency Log for Artifact Signatures
- Policy Decisions: Long-Lived Keys vs Short-Lived Certificates
- What Comes Next
Chapter 7: Provenance, SLSA, and in-toto Attestations
- What Is Build Provenance and Why You Need It
- The SLSA Framework Explained
- in-toto Attestation Format Deep Dive
- Generating SLSA Provenance in CI/CD
- Verifying Provenance Before Deployment
- Mapping Your Current Pipeline to SLSA Levels
- What Comes Next
Chapter 8: SBOM Generation, Consumption, and Policy
- What an SBOM Is (and Is Not)
- SPDX vs CycloneDX Format Comparison
- Generating SBOMs Across Ecosystems
- Consuming SBOMs for Vulnerability Scanning
- SBOM in Regulatory Context
- Integrating SBOM Generation into CI/CD
- What Comes Next
Chapter 9: Secure CI/CD Pipeline Architecture
- Security Principles for CI/CD Design
- GitHub Actions Security
- GitLab CI Security Configuration
- Jenkins Security Best Practices
- Azure DevOps Pipeline Security
- Tekton Pipelines for Kubernetes-Native CI/CD
- Common Mistakes Across Platforms
- What Comes Next
Chapter 10: Secrets Management in the Supply Chain
- Why Hardcoded Secrets Destroy Supply Chain Security
- OIDC-Based Authentication for Cloud Providers
- Vault Integration in CI/CD Pipelines
- Kubernetes Secrets and External Secrets Operator
- Short-Lived Credentials vs Long-Lived Keys
- Secrets Scanning and Rotation Automation
- What Comes Next
Chapter 11: Container Image and OCI Artifact Security
- Dockerfile Security Best Practices
- Image Scanning in the Build Pipeline
- Registry Security
- OCI Artifacts Beyond Containers
- Cosign Policies for Image Verification
- Immutable Tags and Content Addressing
- What Comes Next
Chapter 12: Kubernetes Supply Chain Security
- Admission Controllers as Gatekeepers
- Image Verification with Cosign Admissions
- Pod Security Standards and Policies
- Network Policies for Supply Chain Isolation
- Runtime Security Monitoring (Falco)
- GitOps Supply Chain Security (Argo CD, Flux)
- What Comes Next
Chapter 13: Infrastructure as Code Security
- Threat Model for IaC
- Terraform Security Best Practices
- Policy as Code with OPA/Conftest
- Cloud Configuration Scanning
- State File Security
- Drift Detection and Compliance Monitoring
- What Comes Next
Chapter 14: Vulnerability Management and CVE Response
- How the CVE Ecosystem Works
- Scanning Strategies: SAST, DAST, SCA, Container Scanning
- Prioritizing Vulnerabilities Beyond CVSS Scores
- Automated Patching and Dependency Updates
- Incident Response for Supply Chain Compromises
- Building a Vulnerability Management Program
- What Comes Next
Chapter 15: End-to-End Secure Pipeline Implementation
- Architecture Overview and Design Decisions
- Setting Up the Development Environment
- Implementing the GitHub Actions Pipeline
- Signing and Attesting Artifacts with Sigstore
- Generating SBOMs and Verifying Provenance
- Deploying to Kubernetes with Admission Control Enforcement
- Monitoring, Auditing, and Alerting Configuration
- Troubleshooting Common Issues
- What You Have Built