-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Secure Continuous Delivery on Google Cloud
By :

Software production and delivery can be viewed as a supply chain in which the same developer can be both a software producer (by developing software) and a consumer (by using existing software as a dependency for the app being developed).
This section is a high-level overview of some of the security threats against a software delivery pipeline, as well as some best practices that help protect against those threats. In later chapters, we describe how to implement some of the best practices, using Google Cloud-managed services.
First, let’s look at the security of your source code.
Threats to source code management systems affect the security of the source code. These threats can come from the code itself (for example, submitting source code that is unintentionally or intentionally vulnerable) or can be threats to the source control platform, which can be compromised in different ways. The next section lists some practices to help ensure your source code is safe.
The following is a list of security best practices to protect the integrity of your source code:
Enforce centralized identity management with multi-factor authentication (MFA) for users, ensuring updated access privileges. Limit repository ownership to a few trusted employees, integrate identity management systems, and require dual approval for merges to enhance security.
Reviewers should be assigned to a repository application or a specific commit based on expertise in the programming language and relevant security risks. Perform code reviews on feature-branch pull requests as soon as developers are ready.
In addition to human code reviews, implement static code analysis tools.
Now, let’s look at security for your build process.
The following are some examples of security threats to the artifact build process and tools:
The following section lists some practices to help ensure the security of your build process.
The Supply-chain Levels for Software Artifacts (SLSA) specification defines a set of build-security best practices. These are established by multiple software-industry organizations under the Open Source Security Foundation (OpenSSF) (https://openssf.org/).
SLSA (http://slsa.dev) is a specification meant to help you describe and improve your software supply chain security. It’s structured as a series of tracks, each one covering an aspect of supply chain security, and levels, with each level offering progressively stronger security guidelines and requirements for each track.
At the time of this writing, the SLSA specification is at version 1.0, the first stable release of SLSA. SLSA v1.0 consists of only one track: Build. Future versions of SLSA will add tracks that cover other parts of the software supply chain.
Each level includes a set of requirements for the build process: lower-level requirements are easier to implement but provide lower security guarantees. Higher-level requirements are harder and usually more expensive to adopt but demonstrate that tougher security guidelines have been adopted for software build practices.
The level-based structure also allows you to incrementally adopt the guidelines, progressively improving the security posture of your software supply chain.
The primary goal of the SLSA Build track is to attest and verify that an artifact was built as expected. This is done mainly by generating build provenance, which software consumers can verify. The SLSA v1.0 Build track includes three levels: L1 to L3. There is also an L0 level, which refers to software that doesn’t meet any SLSA requirements. The following table summarizes the build levels:
Track/Level |
Requirements |
Focus |
Build L0 |
None |
N/A |
Build L1 |
Provenance showing how the package was built |
Mistakes, documentation |
Build L2 |
Signed provenance, generated by a hosted build platform |
Tampering after the build |
Build L3 |
Hardened build platform |
Tampering during the build |
Table 1.1 – SLSA v1 Build tracks
These security levels, and descriptions thereof, are from the SLSA specification, version 1.0, courtesy of the SLSA Working Group. You can find more details on the requirements for each level at http://slsa.dev.
In the next section, we’ll talk about threats in your code’s dependencies and some practices for remediating those threats.
Dependency threats are vulnerabilities or intentionally malicious code in any software that your application depends on.
The following is a list of security best practices for managing dependencies:
This section described how to secure your software delivery pipeline, including a look at how your code and its dependencies can face vulnerabilities.