Skip to content
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 vars in BYOB workflows #3636

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

ianlewis
Copy link
Member

@ianlewis ianlewis commented May 15, 2024

Summary

The vars context is converted to JSON and passed to setup-generic by the TRW in the same way that the inputs context is added. Vars are then recorded in the SLSA token. Individual vars can be masked from the provenance as well via the slsa-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:

  • Support recording vars in BYOB
  • Record vars in Node.js builder
  • Record vars in maven builder
  • Record vars in gradle builder
  • Record vars in bazel builder
  • Document changes for TRWs

Updates #1555

Testing Process

  • Add how to test.

Checklist

  • Review the contributing guidelines
  • Add a reference to related issues in the PR description.
  • Update documentation if applicable
  • Add unit tests if applicable.
  • Add changes to the CHANGELOG if applicable.

Ian Lewis added 2 commits May 15, 2024 03:03
Signed-off-by: Ian Lewis <[email protected]>
@ianlewis ianlewis mentioned this pull request May 15, 2024
15 tasks
@ianlewis
Copy link
Member Author

  • Record vars in Node.js builder
  • Record vars in maven builder
  • Record vars in gradle builder
  • Record vars in bazel builder

Though, I think BYOB itself should support setting the vars we perhaps shouldn't set them for these builders since they don't need to be used in the TRW.

Ian Lewis added 4 commits May 17, 2024 02:33
Signed-off-by: Ian Lewis <[email protected]>
Signed-off-by: Ian Lewis <[email protected]>
@ianlewis
Copy link
Member Author

I'm kind of thinking we don't really care about this with BYOB for now since for builders the caller can just require users to pass vars as TRW inputs.

We will need this to support generators but we don't currently support generators anyway so it isn't urgent.

Signed-off-by: Ian Lewis <[email protected]>
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.

1 participant