Skip to content

Conversation

@ianlewis
Copy link
Member

@ianlewis ianlewis commented May 14, 2024

Summary

Records the GitHub 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

ianlewis added 2 commits May 14, 2024 20:36
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
@ianlewis ianlewis mentioned this pull request May 14, 2024
15 tasks
ianlewis and others added 2 commits May 14, 2024 20:56
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
@ianlewis ianlewis marked this pull request as ready for review May 14, 2024 21:05
Signed-off-by: Ian Lewis <ianlewis@google.com>
@ianlewis ianlewis changed the title feat: Record vars in generators and Go builder feat: Record vars in SLSA generators May 16, 2024
ianlewis added 2 commits May 16, 2024 07:57
Signed-off-by: Ian Lewis <ianlewis@google.com>
Signed-off-by: Ian Lewis <ianlewis@google.com>
ianlewis added 3 commits May 23, 2024 08:42
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
Signed-off-by: Ian Lewis <ianmlewis@gmail.com>
@ianlewis ianlewis enabled auto-merge (squash) May 23, 2024 08:48
@ianlewis ianlewis merged commit 40c607f into slsa-framework:main May 23, 2024
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.

2 participants