CICD-377 · Artifact attestation verification
Encyclopedia · Advanced security and compliance · All snippets
Previous · CICD-376 · Next · CICD-378
1. Where it fits
- Placement CI run step or authorized lab terminal.
- Prerequisites reviewed policies, a short-lived CI identity, and synthetic or approved test inputs.
- Platforms github-actions, github-cli.
- Parameters
RELEASE_REPO.
2. Copy the snippet
bash
gh attestation verify dist/release.tar.gz --repo "${RELEASE_REPO:?}"3. How it works
The verify command checks the downloaded artifact against signed provenance from an expected repository. A modified file or different signer should fail.
Verification ties the bytes to a trusted repository identity.
flowchart TD
N1["Downloaded artifact"]
N2{"Provenance verifies"}
N1 --> N2
N3["Expected signer repository"]
N3 --> N2
N4["Accept artifact"]
N2 -->|Yes| N4
N5["Stop consumer"]
N2 -->|No| N5
4. Verify the result
Fail on a modified artifact or an unexpected signer repository. Further constrain signer workflow for high-value releases.
Validation version-dependent (Bash parse). Status definitions.