Refactor and add BuildType interface#47
Merged
Merged
Conversation
ianlewis
commented
May 17, 2022
Member
Author
|
I'll finish this up and send for review after #50 gets merged. |
Member
Author
|
@laurentsimon Could you take a look at this? would like to merge at some point soon. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Depends on #69
Fixes #13
Fixes #2
Improve the API by adding the
BuildTypeinterface that builders can extend to implement their own build types. The intention is to improve the API and not rely so much on function parameters and allow the API to scale easier with minimal backwards incompatible changes.The Github API client was added in order to get the workflow path via the API and solve #11 in a later PR.
The
BuildTypeinterface represents a SLSA build type and theGithubActionsBuildimplements it with a basic Github Actions build type that can be extended by ecosystem builders.A typical ecosystem builder might look like:
You can then create it and generate SLSA from it:
Github API and OIDC clients are a bit annoying to deal with in tests so the generator will support not using them by setting a NilClientProvider. In that case the generator might generate invalid SLSA but is good enough for automated or e2e tests.