-
Notifications
You must be signed in to change notification settings - Fork 171
feat: Record the vars context. #3622
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
Conversation
Records the GitHub vars context in the SLSA invocation in the generic, container, and Go builders. Signed-off-by: Ian Lewis <ianlewis@google.com>
12b659b to
f52b686
Compare
Signed-off-by: Ian Lewis <ianlewis@google.com>
Signed-off-by: Ian Lewis <ianlewis@google.com>
Signed-off-by: Ian Lewis <ianlewis@google.com>
Signed-off-by: Ian Lewis <ianlewis@google.com>
Signed-off-by: Ian Lewis <ianlewis@google.com>
Signed-off-by: Ian Lewis <ianlewis@google.com>
Signed-off-by: Ian Lewis <ianlewis@google.com>
Signed-off-by: Ian Lewis <ianlewis@google.com>
|
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 <ianmlewis@gmail.com>
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
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
varscontext is passed to the "builder" binary as a JSON blob via theGITHUB_VARSenvironment variable. The values are then recorded in theinvocation.parameters.varsfield of the provenance predicate. Masking of inputs or vars is not supported.BYOB
The
varscontext is converted to JSON and passed tosetup-genericby the TRW in the same way that theinputscontext is added. Vars are then recorded in the SLSA token. Individualvarscan be masked from the provenance as well via theslsa-masked-varsfield in the same way as inputs.verify-tokenreads 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