tadata
Back to home

Software Supply Chain Security: Trust Nothing You Did Not Build (and Verify What You Did)

#security#devops#ci-cd#supply-chain#compliance

SolarWinds. Log4Shell. Codecov. The last five years have demonstrated that the software supply chain is the most underprotected attack surface in modern engineering. Securing it requires a shift from trusting artifacts by default to verifying provenance at every stage.

Attack Vector Taxonomy

Supply Chain Attack Vectors
├── Source Code
│   ├── Compromised developer account
│   ├── Malicious commit / pull request
│   ├── Dependency confusion (internal vs public package names)
│   └── Typosquatting (similar package names)
├── Build System
│   ├── Compromised CI/CD pipeline
│   ├── Poisoned build cache
│   ├── Malicious build plugin / action
│   └── Secrets exfiltration from build environment
├── Dependencies
│   ├── Malicious upstream package (event-stream, ua-parser-js)
│   ├── Unmaintained dependency with known CVEs
│   ├── Transitive dependency risk
│   └── Package registry compromise
├── Artifacts
│   ├── Tampered container image
│   ├── Unsigned binary
│   ├── Registry compromise
│   └── Man-in-the-middle during pull
└── Deployment
    ├── Compromised IaC / Helm chart
    ├── Unauthorized deployment (missing approval gate)
    ├── Drift from declared state
    └── Insecure runtime configuration

SLSA Framework Levels

LevelRequirementsIntegrity GuaranteeExample
SLSA 0No guaranteesNoneManual builds on developer laptop
SLSA 1Build process documentedProvenance existsCI/CD generates build provenance metadata
SLSA 2Hosted build, signed provenanceTampering after build detectableGitHub Actions with signed attestations
SLSA 3Hardened build platform, non-falsifiable provenanceTampering during build detectableIsolated, ephemeral build environments
SLSA 4 (proposed)Hermetic + reproducible builds, two-person reviewMaximum assuranceFully reproducible, multi-party verified

SBOM Format Comparison

AspectSPDXCycloneDXSWID
Maintained byLinux FoundationOWASPISO/IEC
Primary focusLicense compliance + securitySecurity + operational riskSoftware identification
FormatJSON, RDF, YAML, tag-valueJSON, XML, ProtobufXML
VEX supportYes (SPDX 2.3+)Yes (native)No
Dependency graphYesYesLimited
AdoptionUS government mandate (EO 14028)Strong in AppSec toolingLegacy, declining
Toolingsyft, Trivy, scancodesyft, Trivy, cdxgenLimited
Best forRegulatory complianceDevSecOps automationEnterprise asset management

Tool Comparison

ToolCategoryKey CapabilityLicense
Sigstore / CosignSigning & verificationKeyless signing of containers and artifacts via OIDCOpen source
TrivyVulnerability scanningContainer, filesystem, IaC, SBOM scanningOpen source
SnykVulnerability scanningDeveloper-friendly SCA with fix PRsCommercial
GrypeVulnerability scanningFast SBOM-based vulnerability matchingOpen source
syftSBOM generationSPDX and CycloneDX output from images/reposOpen source
in-totoBuild attestationCryptographic supply chain layout verificationOpen source
GUACGraph analysisAggregates SBOMs, SLSA, VEX into queryable graphOpen source
DependabotDependency updatesAutomated dependency update PRsFree (GitHub)
RenovateDependency updatesHighly configurable, multi-platformOpen source
KyvernoPolicy enforcementVerify image signatures and attestations at admissionOpen source

Secure Pipeline Architecture

┌──────────┐     ┌──────────────┐     ┌──────────────┐
│Developer │────>│ Code Review  │────>│  CI Build    │
│  Commit  │     │  (2+ review) │     │ (ephemeral,  │
│ (signed) │     │  branch prot.│     │  isolated)   │
└──────────┘     └──────────────┘     └──────┬───────┘
                                             │
                    ┌────────────────────────┐│
                    │  SBOM + Provenance     ││
                    │  Generation (syft,     │◄┘
                    │  in-toto, SLSA)        │
                    └───────────┬────────────┘
                                │
                    ┌───────────▼────────────┐
                    │  Signing (Cosign /     │
                    │  Sigstore keyless)     │
                    └───────────┬────────────┘
                                │
                    ┌───────────▼────────────┐
                    │  Artifact Registry     │
                    │  (signed + attested)   │
                    └───────────┬────────────┘
                                │
                    ┌───────────▼────────────┐
                    │  Admission Control     │
                    │  (Kyverno / OPA)       │
                    │  - Verify signature    │
                    │  - Check SBOM          │
                    │  - Enforce SLSA level  │
                    └───────────┬────────────┘
                                │
                    ┌───────────▼────────────┐
                    │  Production Runtime    │
                    │  (continuous scanning) │
                    └────────────────────────┘

Strategic Recommendations

Start with SBOMs. Generating an SBOM for every build is low-effort, high-value. Use syft or Trivy in your CI pipeline. This gives you a baseline inventory before you even start vulnerability scanning.

Sign everything. Cosign with keyless signing (backed by Sigstore's Fulcio and Rekor) eliminates key management overhead. Combine with Kyverno admission policies to enforce "no unsigned images in production."

Pin dependencies aggressively. Lock files are necessary but not sufficient. Pin GitHub Actions to commit SHAs, not tags. Pin base images to digests, not tags.

Adopt SLSA incrementally. Most organizations can reach SLSA 2 within weeks by using GitHub Actions with artifact attestations. SLSA 3 requires more investment in build isolation but dramatically reduces risk.

Resources

:::