Skip to content

Generate build provenance for CLI releases#430

Merged
JamieMagee merged 2 commits intomainfrom
jamiemagee/sign-dependabot-cli
Apr 23, 2025
Merged

Generate build provenance for CLI releases#430
JamieMagee merged 2 commits intomainfrom
jamiemagee/sign-dependabot-cli

Conversation

@JamieMagee
Copy link
Member

@JamieMagee JamieMagee commented Apr 22, 2025

Once this is merged, and a release is created, the CLI binary will be built with the necessary provenance. This will allow us to verify the authenticity of the binary and ensure that it was built from the correct source code. This is an important security feature that will help us maintain the integrity of our releases.

We can verify the provenance using: gh attestation verify command. For example gh attestation verify dependabot --repo dependabot/cli.

@JamieMagee JamieMagee requested a review from a team as a code owner April 22, 2025 04:20
Copy link

@codysoyland codysoyland left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@JamieMagee
Copy link
Member Author

After chatting with @codysoyland offline, he suggested removing the quotes from the multi-line subject-path.

Copy link
Member

@jeffwidman jeffwidman left a comment

Choose a reason for hiding this comment

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

Looks straightforward to me. Cody's the expert, so if he thinks it's good, I'm good! 👍

@JamieMagee JamieMagee added this pull request to the merge queue Apr 23, 2025
Merged via the queue into main with commit f12cbee Apr 23, 2025
76 checks passed
@JamieMagee JamieMagee deleted the jamiemagee/sign-dependabot-cli branch April 23, 2025 04:42
@JamieMagee
Copy link
Member Author

It works 🎉

$ curl -L -O https://github.com/dependabot/cli/releases/download/v1.62.2/dependabot-v1.62.2-linux-amd64.tar.gz
$ tar xzf dependabot-v1.62.2-linux-amd64.tar.gz
$ gh attestation verify dependabot --owner dependabot
Loaded digest sha256:f54246f86d9706d4aa8b51348201be6931b61da125c4401290917ae09f22a180 for file://dependabot
Loaded 1 attestation from GitHub API

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

✓ Verification succeeded!

The following 1 attestation matched the policy criteria

- Attestation #1
  - Build repo:..... dependabot/cli
  - Build workflow:. .github/workflows/release.yml@refs/tags/v1.62.2
  - Signer repo:.... dependabot/cli
  - Signer workflow: .github/workflows/release.yml@refs/tags/v1.62.2

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.

3 participants