Step 01 of 06
Understand the idea
A successful build does not prove that its contents are safe or trustworthy. Supply-chain checks record what went into an image, scan it for known issues, and verify who built or signed it.
Key technical ideas
An SBOM names the ingredients
A Software Bill of Materials lists packages, versions and relationships. It is not a vulnerability report. It is the inventory the report depends on. During a new CVE, teams with usable SBOMs can answer whether they contain the package.
Keyless signing uses identity instead of a stored key
Cosign can sign with GitLab's OIDC token, producing a certificate bound to repository, pipeline and commit. No long-lived signing key sits in secrets. That removes a leak class, but makes pipeline permissions important.
Pinned CI images stop tags from becoming invisible supply chain
A container image tag can move to new bytes. Pin CI images by digest, for example golang:1.25@sha256:..., when repeatable tooling matters.
merge request pipeline is a loaded footgun
merge request pipeline runs in the base repository context and may access secrets and write tokens. If it checks out and runs code from an untrusted fork, the fork can steal that power. Use it only for metadata operations.
# Open the latest pipeline and inspect its job logs.
glab ci view mainThe bread is not safer because the receipt exists. The receipt lets a buyer reject a batch whose ingredients, builder or signature do not match policy.
Secrets and identity in CI
| Mechanism | Lifetime | Best use | Main risk |
|---|---|---|---|
Repository secret | Until rotated | Legacy API tokens | Replay after leak |
OIDC token | Minutes | Cosign, federation | Overbroad permission |
CI_JOB_TOKEN | One run | GitLab API | Write scope carelessness |
Commit SHA pin | Immutable | Trusted CI images | Update process needed |
Technical terms used at work
SBOM — Machine-readable inventory of packages and files in an artifact.
OIDC — Short-lived identity token issued to a pipeline run.
SLSA — A framework for build integrity and provenance levels.
Critical CVE — A vulnerability severe enough that policy normally blocks release.
