-
Notifications
You must be signed in to change notification settings - Fork 18
ci: switch from SLSA provenance to actions/attest with subject-path #116
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b3f75f9
ci: use draft releases to support immutable GitHub releases
keelerm84 1bf6ade
ci: add force-tag-creation and publish_release option
keelerm84 0de6ac0
ci: simplify for attestation-only releases (no draft needed)
keelerm84 c2f30e2
ci: remove force-tag-creation from attestation-only repo
keelerm84 586f151
ci: switch from subject-checksums to subject-path for attestation
keelerm84 90184c4
ci: remove unused tag input and fix dry_run condition style
keelerm84 7d776f1
ci: use format() for dry_run conditions to handle both string and boo…
keelerm84 e5a1b55
ci: remove dead tag_name outputs and inputs
keelerm84 1acf4c1
docs: add PROVENANCE.md for GitHub artifact attestations
keelerm84 1b122ee
docs: add SLSA provenance section to README.md
keelerm84 70122a9
ci: register PROVENANCE.md in release-please extra-files
keelerm84 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| ## Verifying SDK build provenance with GitHub artifact attestations | ||
|
|
||
| LaunchDarkly uses [GitHub artifact attestations](https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds) to help developers make their supply chain more secure by ensuring the authenticity and build integrity of our published SDK packages. | ||
|
|
||
| LaunchDarkly publishes provenance about our SDK package builds using [GitHub's `actions/attest` action](https://github.com/actions/attest). These attestations are stored in GitHub's attestation API and can be verified using the [GitHub CLI](https://cli.github.com/). | ||
|
|
||
| To verify build provenance attestations, we recommend using the [GitHub CLI `attestation verify` command](https://cli.github.com/manual/gh_attestation_verify). Example usage for verifying SDK packages is included below: | ||
|
|
||
| <!-- x-release-please-start-version --> | ||
| ``` | ||
| # Set the version of the SDK to verify | ||
| SDK_VERSION=5.3.0 | ||
| ``` | ||
| <!-- x-release-please-end --> | ||
cursor[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| ``` | ||
| # Download the nupkg from NuGet | ||
| $ nuget install LaunchDarkly.EventSource -Version $SDK_VERSION -OutputDirectory ./packages | ||
|
|
||
| # Verify provenance using the GitHub CLI | ||
| $ gh attestation verify ./packages/LaunchDarkly.EventSource.${SDK_VERSION}/LaunchDarkly.EventSource.${SDK_VERSION}.nupkg --owner launchdarkly | ||
| ``` | ||
|
|
||
| Below is a sample of expected output. | ||
|
|
||
| ``` | ||
| Loaded digest sha256:... for file://LaunchDarkly.EventSource.5.3.0.nupkg | ||
| 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/launchdarkly | ||
| - Subject Alternative Name must match regex: (?i)^https://github.com/launchdarkly/ | ||
| - OIDC Issuer must match:................... https://token.actions.githubusercontent.com | ||
|
|
||
| ✓ Verification succeeded! | ||
|
|
||
| The following 1 attestation matched the policy criteria | ||
|
|
||
| - Attestation #1 | ||
| - Build repo:..... launchdarkly/dotnet-eventsource | ||
| - Build workflow:. .github/workflows/release-please.yml | ||
| - Signer repo:.... launchdarkly/dotnet-eventsource | ||
| - Signer workflow: .github/workflows/release-please.yml | ||
| ``` | ||
|
|
||
| For more information, see [GitHub's documentation on verifying artifact attestations](https://docs.github.com/en/actions/security-for-github-actions/using-artifact-attestations/using-artifact-attestations-to-establish-provenance-for-builds#verifying-artifact-attestations-with-the-github-cli). | ||
|
|
||
| **Note:** These instructions do not apply when building our SDKs from source. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.