Topic lessonTopic: CI/CD design: from checks to release and recovery
CI/CD supply-chain security: verify dependencies, digests and provenance
A delivered artifact comes through source, dependencies, build processes and storage. Distinguish matching bytes, trusted origin and required safety checks. Use GitHub artifact attestations—signed statements of build provenance—to examine modification and substitution.
Distinguish byte digests from signed provenance and explain why a consumer rejects artifacts outside its policy.
An artifact is produced output. A digest is computed from bytes; signatures help validate the association between a statement and a trusted identity. Cases supply fictional verification observations; no real signatures or workflows are created.
Inputs beyond source affect delivered output
Review changes and dependency revisions.
Inspect workflow, runner, privileges and inputs.
Associate produced bytes with provenance.
Evaluate expected identity, source and bytes.
Supply-chain boundaries, not a claim that passing through these areas makes software safe.
Third-party actions, reusable workflows, packages and build images are code or inputs. Inspect indirect dependencies as well as direct references. Review operations that can reach powerful tokens or shared runner state in terms of their possible impact.
A matching digest does not identify who built it
Suppose a trusted record stores the digest computed from artifact B. A different fetched digest means different bytes. But if an attacker can replace both a file and its adjacent checksum, their agreement does not connect either to a trusted origin.
| Observation | Conclusion |
|---|---|
| Fetched digest differs from trusted B digest | Do not use it as B; investigate substitution or modification. |
| Fetched file matches a checksum from the same untrusted site | The pair agrees; trusted origin remains unestablished. |
| Fetched bytes match trusted B digest | Byte identity is supported; harmless behavior remains a separate question. |
Verify signed provenance against consumer policy
GitHub artifact attestations bind artifacts to signed build-provenance statements. Consumers must verify them before using that provenance in a decision. Generating a statement does not complete consumer verification.
Fictional consumer policy S2 requires candidate bytes B, the expected repository, a reviewed signer workflow and the intended source revision. A valid signature from another repository or a test-only workflow is insufficient. A/B are short teaching labels, not actual digest values.
| Observation | Policy decision | Remaining checks |
|---|---|---|
| B bytes; valid signature; expected repository, signer and revision | Provenance conditions match | Review content, dependencies, tests and release conditions. |
| Modified bytes; statement identifies original B | Stop: subject mismatch | Investigate retrieval, storage and transfer. |
| B bytes; valid signature; another repository | Stop: outside trusted origin | Do not silently broaden the trusted source. |
| B bytes; same repository but another test workflow | Stop: outside signer policy | Identify the workflow authorized to produce candidates. |
Distinguish identities validated through the verification certificate from descriptive fields controlled by a workflow. For reusable workflows, match the signer identity to that structure. Repository-only verification is not the same policy as constraining the signer workflow and source.
gh attestation verify PATH/TO/ARTIFACT --repo OWNER/REPOSITORY
# Minimal repository-scoped verification shape only.
# Add the intended signer/source constraints to match your policy.Check availability and the limits of the claim
The GitHub.com documentation checked on 2026-10-25 limits attestations on Free/Pro/Team to public repositories; private/internal use requires Enterprise Cloud, and legacy plans are excluded. Check availability for the intended repository before adopting the feature.
Control dependency identity and review updates
Tags and branches can move. When pinning an action to a reviewed full commit, inspect origin, code, dependencies and privileges, then review update differences. Keeping an old version forever does not address vulnerabilities.
GitHub also documents workflow dependency lockfiles in public preview. They lock direct and transitive action dependencies and repository identity; dependencies inside a reusable workflow belong to its defining repository’s lockfile. Preview behavior can change: verify support before adopting it. No extension is installed and no settings are changed here.
- Inventory source, dependencies, workflows, runners and storage.
- Define trusted and rejected cases as a consumer.
- Verify artifact bytes against signer and source policy.
- Check rejection for modification, another repository/workflow and stale source.
- Continue content review and release checks after provenance matches.
Interpret artifact verification
Choose an option to see the result and explanation.
Check, then explain in your own words
- Limit conclusions from a matching digest.
- Distinguish S2 modification, repository and workflow mismatches.
- Separate matching provenance from safety.
- Check feature availability and review dependency updates.
Check your understanding: An attestation was generated. May deployment consume B without checking it?
No. The consumer must verify fetched bytes against trusted repository, signer workflow and required source conditions. Content, dependencies, tests and release decisions remain separate checks.
Having a statement differs from a consumer verifying the conditions it needs.
Sources and conditions checked
The official references used in this lesson are collected here with their scope, conditions and corresponding sections. Independent expert review and live AWS comparison have not been performed.
- GitHub: Secure use referenceChecked:
Scope and conditionsImmutable action references plus review, and separation of untrusted code/input from privileges. Documentation review, not live GitHub/AWS validation.
Used in this lessonInputs beyond source affect delivered output Control dependency identity and review updates
- GitHub: Artifact attestationsChecked:
Scope and conditionsConsumers must verify provenance; signed origin is distinct from software safety. Documentation review, not live GitHub/AWS validation.
Used in this lessonVerify signed provenance against consumer policy Check availability and the limits of the claim
Scope and conditionsArtifact and signer/source policy, reusable-workflow signer identity, and limits of workflow-controlled predicate data. Documentation review, not live GitHub/AWS validation.
Used in this lessonVerify signed provenance against consumer policy
Scope and conditionsBuild provenance and consumer verification; Free/Pro/Team public-only, private/internal requires Enterprise Cloud, legacy plans excluded. Not proof of harmless behavior. Documentation review, not live GitHub/AWS validation.
Used in this lessonCheck availability and the limits of the claim
Scope and conditionsPublic preview on 2026-10-25; locked action dependencies and repository identity, with reusable workflow dependencies covered in their defining repository. Not installed or live-tested. Documentation review, not live GitHub/AWS validation.
Used in this lessonControl dependency identity and review updates