Chapter 6 · Reading 5 of 6
Code Security
Security+ SY0-801 · Objectives 1.3
The booking fix passes review on Tuesday. On Wednesday a release manager sees two packages with the same friendly version label. Only one came from the reviewed build. A release name helps people communicate, but an approval needs to refer to something more precise.
Code signing is a security technique used to ensure the integrity and authenticity of software code. By digitally signing executable files and scripts, developers can assure users that the code has not been altered or tampered with since it was signed and that it comes from a legitimate source. Think of this like comparing a checksum to a hash. We will learn more about this in cryptography.
Process of Code Signing
- Generate a Key Pair: The developer generates a public-private key pair.
- Obtain a Digital Certificate: The developer applies for a digital certificate from a CA using the public key.
- Sign the Code: The developer uses their private key to generate a digital signature for the code.
- Distribute the Code: The signed code is distributed to users.
- Verify the Signature: Users' systems verify the digital signature using the developer's public key and the CA's digital certificate.
A Software Development Kit (SDK) is a third-party collection of software tools, libraries, documentation, code samples, and APIs (Application Programming Interfaces) that developers use to create applications for specific platforms or frameworks. SDKs simplify the development process by providing pre-built components and utilities. Any work that is created will be placed into a code repository for ease of access between teams. A code repository, often referred to as a "repo," is a storage location where software developers can store, manage, and track changes to their codebase. Code repositories facilitate collaboration, version control, and project management, enabling multiple developers to work on the same project simultaneously while maintaining a history of changes.
Github
GitHub is a web-based code repository platform used for version control, collaboration, and project management for software development. It leverages Git, a distributed version control system, to provide a comprehensive environment for managing code repositories, tracking changes, and facilitating teamwork among developers.
Checking release integrity
Review dependencies and secret-scanning results before signing an artifact. Static analysis examines source or compiled representations, while runtime testing observes behavior in an executing application. Restrict signing credentials and verify the artifact at deployment. Keep provenance records that connect the deployed digest with its source revision and approvals.
Following one release across a handoff
Record the source revision, build identity, dependency versions and resulting artifact digest. Check the signing identity against the release policy, then compare the deployed digest with the approved artifact. A successful signature check answers who controlled the signing key for those bytes. It leaves the quality of the review and the signer’s authority as separate questions. Protect the signing service and investigate unexpected signing requests.
Now suppose a deployment request is delivered twice after a network timeout. The team needs the same release evidence, plus a way to distinguish unfinished work from work already completed. That is the role of a carefully designed automation workflow.
Inspect the three records, then use the evidence to answer the question.
1. Build
Produce the release artifact.
Release key is trusted by policy
2. Sign
The publisher signs the artifact.
Artifact A passes signature verification
3. Verify
Check integrity and the expected signer.
Artifact B has the same name but verification fails
Apply the reading
A software update has a valid signature. What question still belongs in release review?
Compare your reasoning
Ask what security testing was performed and whether this specific version is approved. Signature verification addresses provenance and integrity.