HackCert
Intermediate 10 min read February 2, 2025

A Practical Guide to Supply Chain Security

Defend the software supply chain with SBOMs, signing, SLSA, dependency hygiene, build provenance, and vendor risk practices.

Ibrahim Nooruddin Khan
Red Team Operator
share
A Practical Guide to Supply Chain Security
Overview

The most damaging breaches of the past decade increasingly trace back to the software supply chain. SolarWinds, Codecov, Kaseya, MOVEit, 3CX, and XZ Utils each demonstrated that attackers compromising components used by many organizations can cause cascading impact dwarfing any single target. Modern software is a deep stack of dependencies: operating systems, runtimes, languages, frameworks, libraries, container images, build tools, CI services, and SaaS integrations. Securing what your team writes is not enough. You must secure what you consume and what you produce.

This guide walks intermediate practitioners through software supply chain security: the threats, the frameworks, the tools, and the operational practices that hold real defense together.

Core Concepts

Software supply chain security covers the integrity of every component, tool, and process involved in producing and delivering software. Threat actors target supply chains because compromising one supplier can yield access to many downstream consumers.

Supply chain attacks come in several flavors. Source compromise modifies code in upstream repositories. Build compromise tampers with the build process, as in SolarWinds. Distribution compromise modifies artifacts in transit or in registries. Dependency confusion tricks builds into pulling malicious packages with names matching internal packages. Typosquatting publishes packages with names similar to popular ones. Maintainer takeover hijacks credentials or social-engineers maintainers. Insider threats produce malicious commits or releases.

Several frameworks structure defense. SLSA (Supply chain Levels for Software Artifacts) defines progressive levels of build integrity. NIST SP 800-218 Secure Software Development Framework (SSDF) provides practice guidance. CISA Secure by Design pushes vendors to ship secure defaults. OpenSSF Best Practices, Scorecard, and Sigstore provide community tools and standards.

SBOMs (Software Bills of Materials) are the foundational visibility primitive. You cannot defend what you do not know you depend on.

Dependency Hygiene

Inventory dependencies through SBOMs. Generate SBOMs at build time using Syft, CycloneDX tools, language-specific package managers, or cloud-native build features. Use SPDX or CycloneDX as standardized formats. Store SBOMs alongside artifacts and propagate them through the pipeline.

Scan dependencies continuously. Snyk, GitHub Dependabot, Mend, JFrog Xray, OWASP Dependency-Check, and language-specific tools identify known vulnerabilities. Re-scan stored artifacts on schedule; new CVEs are disclosed daily.

Update dependencies regularly. Dependabot, Renovate, and similar tools automate version bumps. Combine with automated tests and progressive rollout to keep pace without breaking changes. Stale dependencies accumulate vulnerabilities and become harder to update over time.

Pin precisely. Use lockfiles (package-lock.json, yarn.lock, poetry.lock, Cargo.lock, Gemfile.lock, go.sum) so builds are reproducible. For OCI artifacts, pin by digest, not tag. Pinning reduces the risk of malicious or accidental version substitution.

Reduce dependencies. Each direct and transitive dependency expands attack surface. Periodically audit and remove unused libraries. Prefer standard library or in-house implementations for trivial functionality.

Vet new dependencies. Before adding a library, check: maintainer reputation, recent activity, open security issues, breadth of usage, license, and whether it solves a problem you cannot solve more simply. The cost of removing a bad dependency later is much higher than not adding it.

Watch for dependency confusion and typosquatting. Configure package managers to prefer internal registries. Pin scoped names where supported (npm scoped packages, Maven groupId). Use tools like the npm "package-confusion" detectors. Internal packages should never share name patterns with public registries.

Build Integrity (SLSA)

SLSA defines four levels of increasing build integrity. Aim for SLSA 3 or above for production-critical workloads.

SLSA 1 requires that the build process be documented and the resulting artifact include provenance metadata.

SLSA 2 adds version-controlled source, a hosted build service, and authenticated provenance, raising the bar against forged provenance.

SLSA 3 requires hardened build platforms with non-falsifiable provenance and isolated builds. Each build runs in a fresh environment, and provenance is generated by the build service itself, not the calling pipeline.

SLSA 4 adds requirements like two-party review and hermetic builds. Few organizations reach SLSA 4 universally; reaching it for high-impact components is a worthy goal.

Reach for SLSA-compliant builders. GitHub Actions reusable workflows with the Sigstore-based SLSA generator, Google Cloud Build, and HashiCorp HCP Vault Secrets all provide capabilities that map to higher SLSA levels. Use them rather than building your own provenance from scratch.

Generate provenance for every build. Provenance describes what was built, by which builder, from which source, with which dependencies. Store it as a signed attestation alongside the artifact. Tools like in-toto and Sigstore Rekor provide standardized provenance with transparency-log backing.

Verify at consumption. Production deployments should verify both signature and provenance before running an artifact. Sigstore Policy Controller, Kyverno, OPA Gatekeeper, and commercial tools enforce this at admission.

Signing and Provenance

Sign every artifact. Container images, language packages, binaries, IaC modules, and even SBOMs should be signed. Sigstore Cosign has become the de facto standard for OCI artifacts and many other formats, with public Rekor transparency logs providing tamper-evidence.

Use keyless signing where appropriate. Sigstore supports keyless signing using OIDC identities (GitHub Actions, GitLab, Buildkite identities), eliminating long-lived signing keys. The transparency log records the signing identity for auditability.

For traditional signing, manage keys carefully. Hardware-backed keys (HSMs, YubiKeys, cloud KMS) raise the bar. Rotate keys on a schedule and immediately on suspicion of compromise. Limit who can sign and what they can sign.

Verify signatures on consumption. Configure package managers, container registries, and admission controllers to require signatures from approved signers. Reject unsigned or improperly signed artifacts.

Attach attestations. Beyond signing the artifact, attach attestations describing scans, tests, approvals, and policy evaluations. The artifact accumulates a verifiable record of how it was built and vetted.

Source and Maintainer Security

Lock down source repositories. Apply branch protection to main and release branches: require pull request reviews, status checks, signed commits, linear history, CODEOWNERS. Audit admin access regularly. Enforce SAML SSO with strong MFA for source platforms.

Sign commits and tags. Cryptographic signing provides attribution and tamper-evidence. Sigstore gitsign provides keyless commit signing using OIDC identities, making it easier to adopt.

Limit who can push to release branches. Use CODEOWNERS to require specific reviewer approval for sensitive paths: build scripts, dependency manifests, security configuration. Even maintainers with broad commit access should follow PR review for critical paths.

For open source maintainers, follow OpenSSF Best Practices and the OpenSSF Scorecard. Both provide actionable checklists and automated scoring. Adoption raises the security baseline of the entire open source ecosystem.

Address maintainer takeover risk. Major package registries have moved toward mandatory MFA for high-impact maintainers. Personal account compromise is a leading attack vector; account hygiene is supply chain hygiene.

Vendor and Third-Party Risk

Software supply chain extends to SaaS vendors, open source maintainers, and infrastructure providers. Each is a trust relationship.

Maintain a vendor inventory. For each, capture: data and access it has, certifications (SOC 2, ISO 27001, FedRAMP), breach history, contract terms, breach notification commitments, and last review date.

Conduct vendor security reviews. Use standardized questionnaires (CAIQ, SIG, vendor-specific) but supplement with public information: security advisories, breach reports, OpenSSF Scorecard for open source. Tools like SecurityScorecard, BitSight, Whistic, and Vanta accelerate the process.

Apply contractual protections. Right to audit, breach notification timelines, security control requirements, data handling restrictions, and incident response cooperation should be standard for any vendor with access to sensitive data.

Plan for vendor compromise. Vendors will be breached. Maintain contacts, internal playbooks, and the ability to rapidly revoke or restrict vendor access. Run scenarios in tabletop exercises.

For critical open source dependencies, contribute back. Funding maintainers via GitHub Sponsors, Tidelift, or Open Source Pledge, and contributing fixes, raises the security and sustainability of components your business depends on.

Operational Best Practices

Build a supply chain incident response playbook. The 2021 Log4Shell incident illustrated the value: organizations with SBOMs and dependency monitoring responded in hours; others took weeks. Practice through tabletop scenarios.

Adopt CycloneDX VEX (Vulnerability Exploitability eXchange) statements. VEX lets vendors declare whether known CVEs affect their products in context. Consume VEX to filter out non-applicable vulnerabilities and focus response.

Subscribe to advisories. CISA's KEV (Known Exploited Vulnerabilities) catalog, vendor security feeds, and ecosystem advisories (GitHub Advisory Database, OSV, npm, PyPI, RubySec) should feed your vulnerability management process.

Measure outcomes. Track time to detect vulnerable dependencies in production, time to remediate critical findings, percentage of artifacts with SBOMs and signatures, and coverage of build provenance.

Train developers. Supply chain security relies on developer choices about what to depend on, how to pin, and how to update. Training pays off across every team.

Real-world Examples

The 2020 SolarWinds Sunburst attack injected malicious code into the Orion build process, distributing trojaned updates to tens of thousands of customers. The incident drove broad adoption of SLSA, signed builds, and pipeline isolation.

The 2021 Log4Shell vulnerability in log4j2 demonstrated the urgency of dependency visibility. Organizations with SBOMs and dependency monitoring rapidly identified exposure; others spent weeks finding affected systems. CISA's response made SBOMs a required topic at the federal level.

The 2024 XZ Utils backdoor (CVE-2024-3094) showed long-term social engineering of an open source maintainer. The attacker spent years building trust, eventually merging a subtle backdoor that was caught by an alert engineer investigating performance regressions. The incident reinforced the importance of build-time scanning, runtime monitoring, and the value of curious engineers.

The 2024 tj-actions/changed-files compromise affected thousands of GitHub Actions workflows when a popular action's tags were overwritten. SHA-pinned workflows were safe; tag-pinned were not.

Key Takeaways

Software supply chain security is the discipline of trusting verifiably rather than blindly. Generate and consume SBOMs. Sign and verify artifacts. Adopt SLSA. Pin dependencies and update regularly. Lock down source and protect maintainers. Manage vendor risk with the rigor of internal risk. Plan for incidents.

For intermediate practitioners, the highest-impact first steps are typically SBOM generation, dependency scanning with automated updates, Sigstore signing of container images, and OIDC-based pipeline credentials. Each closes a major attack class. Build from there with provenance, attestations, and broader vendor governance.

Supply chain incidents will continue. The difference between organizations that contain them quickly and those that flounder is preparation. Make your supply chain a system of verifiable trust, and the inevitable next incident becomes manageable rather than catastrophic.

Ready to test your knowledge? Take the Software Supply Chain Security MCQ Quiz on HackCert today!

Related articles

back to all articles