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: add provenance.jq #76

Merged
merged 6 commits into from
Sep 19, 2024

Commits on Sep 16, 2024

  1. feat: add gha provenance

    mrjoelkamp committed Sep 16, 2024
    Configuration menu
    Copy the full SHA
    5c73be4 View commit details
    Browse the repository at this point in the history

Commits on Sep 18, 2024

  1. refactor: pr comments

    mrjoelkamp committed Sep 18, 2024
    Configuration menu
    Copy the full SHA
    24e679e View commit details
    Browse the repository at this point in the history

Commits on Sep 19, 2024

  1. Collapse more functions into main doc, add more trailing commas, mino…

    …r calculation adjustments
    
    The primary justification for collapsing everything back into the main document (aside from there only being a single caller for each function) is that it makes verifying that we didn't miss anything easier -- as you scan the document, for each field that contains a "load-bearing" URL (first https://in-toto.io/Statement/v1, then https://slsa.dev/provenance/v1, and finally https://actions.github.io/buildtypes/workflow/v1), if you open the URL it describes the expected format, fields, and values, and with them all here and in-order, they're *much* easier to match up and validate to be correct and exhaustive.  Granted, that will change over time as we shove more and more (optional) data into this document so that it includes a more complete picture, but for now, this is makes it really easy to double check our work (and the end result is no less organized; for example, the `externalParameters` are still all grouped together under a suitable heading describing what their purpose is).
    
    I also made some minor changes to the way values were calculated, especially in the `workflow` block, but very related to the above justification: now the way we calculate the values matches the way they're described in https://actions.github.io/buildtypes/workflow/v1 (specifically using the exact fields parsed in the exact ways they suggest).  We will probably deviate from that over time (as suggested by a new "TODO" comment I included), but at least this way our baseline matches theirs and the delta will be easier to track.
    
    Additionally, I removed the `(env.GITHUB_CONTEXT | fromjson) as $github` line from here, because I think that's more appropriate behavior for the caller (and added back the explicit function arguments).  This will be more clearly meaningful in my follow-up commit adding a basic test.
    tianon committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    96f29bc View commit details
    Browse the repository at this point in the history
  2. Add a basic test of the provenance (both amd64 and windows, to illust…

    …rate/validate the `inputs` variance)
    tianon committed Sep 19, 2024
    Configuration menu
    Copy the full SHA
    ad28b37 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    d9b5735 View commit details
    Browse the repository at this point in the history
  4. Update provenance.jq

    Co-authored-by: Tianon Gravi <[email protected]>
    mrjoelkamp and tianon authored Sep 19, 2024
    Configuration menu
    Copy the full SHA
    3385931 View commit details
    Browse the repository at this point in the history