Create go-ossf-slsa3-publish.yml - #1
Conversation
.github/workflows/lint.yml.
There was a problem hiding this comment.
Pull Request Overview
This PR creates a new GitHub Actions workflow file for SLSA (Supply-chain Levels for Software Artifacts) Level 3 compliance, enabling secure and verifiable builds for Go projects. The workflow integrates with the SLSA framework to generate cryptographic provenance for build artifacts.
Key changes:
- Adds a new workflow that triggers on releases and manual dispatch
- Configures SLSA3-compliant build process using the official slsa-framework builder
- Sets up necessary permissions for signing and uploading release assets
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| id-token: write # To sign. | ||
| contents: write # To upload release assets. | ||
| actions: read # To read workflow path. | ||
| uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.4.0 |
There was a problem hiding this comment.
The SLSA builder version v1.4.0 may be outdated. Consider updating to the latest version for security improvements and bug fixes. Check the slsa-framework/slsa-github-generator releases for the most recent stable version.
| uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.4.0 | |
| uses: slsa-framework/slsa-github-generator/.github/workflows/builder_go_slsa3.yml@v1.8.0 |
|
|
||
| jobs: | ||
| # ======================================================================================================================================== | ||
| # Prerequisite: Create a .slsa-goreleaser in the root directory of your project. |
There was a problem hiding this comment.
The comment mentions creating a '.slsa-goreleaser' file but doesn't specify that this file is required for the workflow to function properly. Consider adding a note that the workflow will fail without this configuration file.
| # Prerequisite: Create a .slsa-goreleaser in the root directory of your project. | |
| # Prerequisite: Create a .slsa-goreleaser in the root directory of your project. | |
| # The workflow will fail without this configuration file. |
.github/workflows/lint.yml.
Your changes add a TrustedRoot field to the AttestationVerifier struct and ensure it is passed into the NewVerifierOptions. This improves the ability to provide a trusted root for attestation verification, which is important for security and flexibility.
Diff summary:
Added TrustedRoot string to AttestationVerifier.
Passed TrustedRoot to NewVerifierOptions in VerifyAttestation.
Review points:
The code change is straightforward and non-breaking—existing code using AttestationVerifier will not be affected unless they want to use the new TrustedRoot field.
The new field is optional; if not set, the behavior should be unchanged for callers not using TrustedRoot.
Be sure to check that anywhere AttestationVerifier is instantiated, the new TrustedRoot field is set as needed, or is left with the default zero value as appropriate.
If there are tests covering attestation verification, consider adding or updating tests to cover cases where TrustedRoot is set.
Suggestions:
If this field is expected to be set from configuration or CLI, make sure the relevant wiring is in place.
If documentation exists for AttestationVerifier or its usage, update it to mention TrustedRoot.
Conclusion:
This is a clean and useful change. If you have tested or validated the new code path (with and without TrustedRoot), it's ready for merge pending any additional feedback from reviewers.
Would you like a suggested PR description or help reviewing other parts of this comparison?