Skip to content

chore: slsa 3 provenance generation#753

Closed
developer-guy wants to merge 1 commit into
ko-build:mainfrom
developer-guy:feat/slsa3
Closed

chore: slsa 3 provenance generation#753
developer-guy wants to merge 1 commit into
ko-build:mainfrom
developer-guy:feat/slsa3

Conversation

@developer-guy
Copy link
Copy Markdown
Collaborator

Signed-off-by: Batuhan Apaydın batuhan.apaydin@trendyol.com

experimental try out with slsa 3 provenance generation for ko project

cc: @imjasonh @ianlewis

https://github.com/developer-guy/ko/releases/tag/v0.0.0

Signed-off-by: Batuhan Apaydın <batuhan.apaydin@trendyol.com>
@developer-guy developer-guy changed the title feat: allow symlink chore: slsa 3 provenance generation Jul 7, 2022
@imjasonh
Copy link
Copy Markdown
Member

imjasonh commented Jul 7, 2022

@laurentsimon possibly superceding #730 ?

@developer-guy
Copy link
Copy Markdown
Collaborator Author

ah 🤦 I've missed that issue

@imjasonh
Copy link
Copy Markdown
Member

imjasonh commented Jul 7, 2022

To clarify, I think this PR may be on a better track than #730, which AIUI is blocked on goreleaser including provenance generation itself. The alternative in #730 is to fork our goreleaser process to use the SLSA trusted builder, but I'd rather not have us diverge from standard vanilla goreleaser that much.

@developer-guy developer-guy reopened this Jul 7, 2022
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

Merging #753 (98c2c67) into main (9139f45) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #753   +/-   ##
=======================================
  Coverage   51.19%   51.19%           
=======================================
  Files          44       44           
  Lines        3313     3313           
=======================================
  Hits         1696     1696           
  Misses       1404     1404           
  Partials      213      213           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9139f45...98c2c67. Read the comment docs.

@laurentsimon
Copy link
Copy Markdown
Contributor

laurentsimon commented Jul 7, 2022

We're working on a solution that will help you keep GoReleaser and attach provenance to it, see https://github.com/slsa-framework/slsa-github-generator/tree/main/internal/builders/generic#provenance-for-goreleaser

TL;DR: it will let you build yourself (so no change needed to your GoReleaser config), and the generator will attest to the origin of the repo ("provenance" requirement in SLSA https://slsa.dev/spec/v0.1/requirements). This won't satisfy the "build" requirements of SLSA, but it's still a good improvement.

We'll release this provenance generator this month. Later, when our Go builder has feature parity (or close to) with GoReleaser, we can discuss Go builder :)

Wdut?

@imjasonh
Copy link
Copy Markdown
Member

imjasonh commented Jul 7, 2022

Sounds good to me. I'm glad so many folks are looking into improving the SLSAbility of these release workflows, and I'm happy to just ride that wave 🏄

@laurentsimon
Copy link
Copy Markdown
Contributor

laurentsimon commented Jul 26, 2022

I updated my original #730 and just realized your PR does the same thing :) We released the generic generator today, and it supports uploading the provenance using upload-assets: true, so the workflow need not do itself anymore.

Let me know if I should drop my PR and let this one go thru, or the other way around.
I'm excited either way :)!

One thing I would add is a mention in the README to tell users how to verify binaries they download.

actions: read
id-token: write
contents: read
uses: slsa-framework/slsa-github-generator/.github/workflows/generator_generic_slsa3.yml@v1.1.1
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

v1.2.0 is the release to use to support the generic generator.

base64-subjects: "${{ needs.goreleaser.outputs.hashes }}"

# This step creates a GitHub release with our provenance.
release-provenance:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

no longer necessary, you can use:

with:
  base64-subjects: "${{ needs.goreleaser.outputs.hashes }}"
  upload-assets: true

@imjasonh
Copy link
Copy Markdown
Member

#730 was merged, closing this

Please feel free to reopen this or open a new issue if there's anything else we should do on top of #730

@imjasonh imjasonh closed this Aug 19, 2022
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.

4 participants