-
Notifications
You must be signed in to change notification settings - Fork 137
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
feat: Record the vars context. #3622
feat: Record the vars context. #3622
Conversation
Records the GitHub vars context in the SLSA invocation in the generic, container, and Go builders. Signed-off-by: Ian Lewis <[email protected]>
12b659b
to
f52b686
Compare
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
Probably can split this into two PRs. One for the generic generator, container generator, and Go builder. One for BYOB and BYOB workflows. Each PR wouldn't really depend on the other. |
Requiring changes to TRW inputs isn't ideal. Currently we need the TRW to pass the vars context to setup-generic because JavaScript actions don't have access to the vars context like they do for inputs (inputs are set to environment variables but vars aren't). I wonder if I could create a wrap the current action in a composite action to get access to the vars context without needing it to be passed in an input. |
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
Looks like this won't work since the |
Breaking up this PR into multiple PRs. First of which is #3633 for the generic generator, container generator, and Go builder. |
Recording vars for BYOB implemented in #3636. Closing this PR. |
Summary
Records the GitHub vars context in the SLSA invocation in all generators and builders.
generic generator, container generator, Go builder
The
vars
context is passed to the "builder" binary as a JSON blob via theGITHUB_VARS
environment variable. The values are then recorded in theinvocation.parameters.vars
field of the provenance predicate. Masking of inputs or vars is not supported.BYOB
The
vars
context is converted to JSON and passed tosetup-generic
by the TRW in the same way that theinputs
context is added. Vars are then recorded in the SLSA token. Individualvars
can be masked from the provenance as well via theslsa-masked-vars
field in the same way as inputs.verify-token
reads the vars from the SLSA token and includes them in the final provenance.Note that changes to the TRW are necessary to record the vars context.
TODO:
Updates #1555
Testing Process
Checklist