Published on

Securing your software supply chain

Securing Your Software Supply Chain


The concept of the software supply chain refers to the set of systems and processes used to get code from development all the way to production, eventually reaching your users. It encompasses more than just your specific code; it includes your build scripts, packaging scripts, dependencies, and external dependencies, each with its own software supply chain. This complexity introduces multiple points of vulnerability that bad actors can exploit to compromise the integrity of your software. If you can't verify explicitly that your code hasn't been tampered with, both your business and your customers are at risk.

The Importance of Secure Software Supply Chains

Securing your software supply chain involves a holistic strategy that aims to protect the integrity of your software. This strategy generally applies to four key stages: code, build, store, and deploy.


Key Stages of a Software Supply Chain

Code

Your software supply chain begins when developers write source code and tests using IDEs on their workstations. Once the code is ready, it’s usually pushed to a remote source code management system. This often triggers the next stage: building a deployable artifact.

Build

Typically, the build process is automated and involves several workers that run tests, pull in external dependencies, and produce an artifact like a container image.

Store

After the deployable artifact is created, it's pushed to long-term storage such as a registry. Your pre-production and production environments access artifacts from this storage.

Deploy

Artifacts are fetched based on pipelines that orchestrate their rollout through continuous deployment or continuous delivery procedures.


Potential Vulnerabilities and Attacks

It's essential to be aware of various attack vectors at different stages:

  • Code Vulnerabilities: Malicious code or vulnerabilities like SQL injection can be introduced.
  • Build Pipeline Injection: Bad actors can inject malicious instructions into build pipelines.
  • Malicious Artifacts: Actors can build and store bad artifacts in your storage if they gain access.
  • Dependency Exploitation: Bad actors can exploit vulnerabilities in transitive dependencies or use dependency confusion tactics.

Securing these various points requires a comprehensive approach, including safeguarding your network perimeters and infrastructure.


Strategies for Securing the Supply Chain

Security can no longer focus solely on the production environment. It must "shift left," securing processes as early as possible, starting from when developers write code on their workstations. Here are some best practices:

  • Secure Workstations: Apply secure configurations and provide in-context vulnerability scanning.
  • Code Reviews and Policy Checks: Implement both automated and manual code review processes.
  • Secure Builds: Automatically generate a Software Bill of Materials (SBOM) and use secure base images for containers.
  • Artifact Authenticity: Establish proof of authenticity to ensure that artifacts came from a trusted source and build environment. Crypto-signed attestations can validate the origin and build environment of the artifacts and the results of vulnerability scans.

Continuous Trust and Verification

Verification must be a continuous process across the supply chain. This means using crypto-signed attestations to provide proof that an artifact was built from a trusted source. These proofs can enforce security policies at deploy time and maintain trust in production environments.


Remediation and Evolving Security

Efficient software supply chains don't just detect potential compromises; they remediate issues quickly by updating build configurations or policies through code reviews. As supply chain security continues to evolve, frameworks like Salsa (Supply Chain Levels for Software Artifacts) can provide a structured approach to improving security incrementally.

To learn more about securing your software supply chain, check out Google's resources at Google Cloud Software Supply Chain Security.


Keywords

  • Software Supply Chain
  • Code vulnerabilities
  • Build pipeline injection
  • Dependency exploitation
  • Secure Workstations
  • Code reviews
  • Secure builds
  • Artifact authenticity
  • Continuous Trust and Verification
  • Salsa Framework

FAQ

Q1: What is a software supply chain?

A: The software supply chain consists of systems and processes used to get code from development to production, including code, build scripts, dependencies, and more.

Q2: Why is securing the software supply chain important?

A: It ensures that the code and processes involved in delivering software to users have not been tampered with, protecting both the business and its customers.

Q3: What are some common vulnerabilities in the software supply chain?

A: Common vulnerabilities include malicious code submissions, build pipeline injections, unauthorized artifacts, and dependency exploitation.

Q4: How can software supply chains be secured?

A: By shifting security left, developers should secure workstations, conduct thorough code reviews, and ensure build environments and artifacts are authentic and verified via cryptographic attestations.

Q5: What does "shifting security left" mean?

A: It means integrating security practices early in the development lifecycle, starting from when developers begin writing code.

Q6: What is the Salsa framework?

A: Salsa (Supply Chain Levels for Software Artifacts) is an end-to-end framework providing a structured approach to enhancing software supply chain security in incremental levels.

Q7: How can continuous trust and verification be maintained?

A: By using crypto-signed attestations to prove the authenticity and security of artifacts throughout the supply chain and enforcing security policies based on these proofs.