Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Artifact attestation for CI builds #1240

Merged
merged 4 commits into from
Jan 21, 2025
Merged

Conversation

fabergat
Copy link
Collaborator

Description

Add Artifact attestation for CI

Closes: #1233

Ref: https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds#generating-artifact-attestations-for-your-builds

Changes

  • Add Github Artifact Attestation in the docker build workflow

Testing Information

https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds#generating-artifact-attestations-for-your-builds

Checklist:

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@fabergat fabergat requested a review from aldur January 20, 2025 12:18
@aldur aldur requested a review from matteojug January 20, 2025 14:38
Copy link
Collaborator

@aldur aldur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Before merging I'd like to see and verify an attested build, is it possible?

.github/workflows/image-build.yaml Show resolved Hide resolved
@fabergat fabergat marked this pull request as draft January 20, 2025 16:21
@fabergat fabergat marked this pull request as ready for review January 20, 2025 17:17
@fabergat fabergat requested a review from aldur January 20, 2025 17:23
@aldur
Copy link
Collaborator

aldur commented Jan 21, 2025

Verified with the following:

gh attestation verify oci://index.docker.io/blockstack/sbtc:signer-test-attestation -R stacks-network/sbtc
Loaded digest sha256:3f7fd67e2d8ce754ce5890716d94da9fb09327f06ac17acdbc90e5735d0adb09 for oci://index.docker.io/blockstack/sbtc:signer-test-attestation
Loaded 1 attestation from GitHub API

The following policy criteria will be enforced:
- OIDC Issuer must match:................... https://token.actions.githubusercontent.com
- Source Repository Owner URI must match:... https://github.com/stacks-network
- Source Repository URI must match:......... https://github.com/stacks-network/sbtc
- Predicate type must match:................ https://slsa.dev/provenance/v1
- Subject Alternative Name must match regex: (?i)^https://github.com/stacks-network/sbtc/

✓ Verification succeeded!

sha256:3f7fd67e2d8ce754ce5890716d94da9fb09327f06ac17acdbc90e5735d0adb09 was attested by:
REPO                 PREDICATE_TYPE                  WORKFLOW
stacks-network/sbtc  https://slsa.dev/provenance/v1  .github/workflows/image-build.yaml@refs/tags/test-attestation

@aldur aldur merged commit 9a61457 into main Jan 21, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature]: Artifact attestation for CI builds
2 participants