You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Summary
Records the GitHub [vars
context](https://docs.github.com/en/actions/learn-github-actions/contexts#vars-context)
in the SLSA invocation in the generic generator and container generator.
The `vars` context is passed to the "builder" binary as a JSON blob via
the `GITHUB_VARS` environment variable. The values are then recorded in
the `invocation.parameters.vars` field of the provenance predicate.
Masking of inputs or vars is not supported.
Note that the `vars` context is set to the variables for the *repository
that initiated the GitHub Actions run* and not the reusable workflow's
repository.
Updates #1555
## Testing Process
- Set a variable on the test repo
- Go to Settings -> Secrets & variables -> Actions and then click on the
Variables tab.
- Set some test variables.
- Generate provenance as normal using the generic generator or container
generator
- Note that the `compile-generator: true` input must be set.
- Examine the `invocation.parameters.vars` field in the resulting
provenance. The vars should be recorded there.
## Checklist
- [x] Review the contributing
[guidelines](https://github.com/slsa-framework/slsa-github-generator/blob/main/CONTRIBUTING.md)
- [x] Add a reference to related issues in the PR description.
- [x] Update documentation if applicable (added #3627 to track)
- [x] Add unit tests if applicable.
- [x] Add changes to the
[CHANGELOG](https://github.com/slsa-framework/slsa-github-generator/blob/main/CHANGELOG.md)
if applicable.
---------
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
Signed-off-by: Ian Lewis <ianlewis@google.com>
Current provenance examples (e.g. generic generator) do not include inputs. We should have an example that includes inputs (and vars - #1555).
The text was updated successfully, but these errors were encountered: