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

Release Process: Write SLSA v0.2 provenance attestations #2375

Merged
merged 6 commits into from
Jan 2, 2022

Conversation

puerco
Copy link
Member

@puerco puerco commented Jan 2, 2022

What type of PR is this?

/kind cleanup

What this PR does / why we need it:

This PR modifies the Kubernetes release process to write its provenance attestations using the latest SLSA 0.2 spec. Except for newer fields in the attestation predicate, content is mostly the same, it just has been migrated from 0.1 to the equivalent 0.2 fields.

This PR also addresses the comments noted in #2273 (/cc @justaugustus )

Which issue(s) this PR fixes:

None

Special notes for your reviewer:

/cc @kubernetes/release-engineering @justaugustus @cpanato

Test runs of the new code:

Stage:
https://console.cloud.google.com/cloud-build/builds;region=global/f464f9a1-dac8-4090-8a00-bd5ae56e72c5?project=kubernetes-release-test

Release:
https://console.cloud.google.com/cloud-build/builds;region=global/bfc36ac7-c558-4f84-95ae-76ca1de6f546?project=kubernetes-release-test

Does this PR introduce a user-facing change?

The provenance attestations written while during the Kubernetes release process now conform to the [SLSA v0.2 specification](https://slsa.dev/provenance/v0.2).

Signed-off-by: Adolfo García Veytia <[email protected]>
Migrate provenance predicate fields to SLSA v0.2 equivalents. Also,
reference the DigestSets from the new versioned SLSA package.

Signed-off-by: Adolfo García Veytia <[email protected]>
This commit removes the temporary logic to lookup the last commit
SHA in favor of the function in the release-sdk `git` package.

Signed-off-by: Adolfo García Veytia <[email protected]>
This commit addresses nits noted in kubernetes#2273.

Signed-off-by: Adolfo García Veytia <[email protected]>
krel arguments recorded in the provenance attestation were recorded
with dashes and equal signs:

```
 "arguments": {
        "--branch=": "master",
```

This commit fixes them to record just the name of the parameter.

Signed-off-by: Adolfo García Veytia <[email protected]>
@k8s-ci-robot k8s-ci-robot requested review from cpanato, justaugustus and a team January 2, 2022 04:37
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-priority size/L Denotes a PR that changes 100-499 lines, ignoring generated files. area/release-eng Issues or PRs related to the Release Engineering subproject sig/release Categorizes an issue or PR as relevant to SIG Release. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 2, 2022
@puerco puerco added this to the v1.24 milestone Jan 2, 2022
@puerco puerco changed the title SLSA v0.2 provenance attestaions Release Process: Write SLSA v0.2 provenance attestations Jan 2, 2022
Copy link
Member

@cpanato cpanato left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cpanato, puerco

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 2, 2022
@k8s-ci-robot k8s-ci-robot merged commit ddf1e93 into kubernetes:master Jan 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. area/release-eng Issues or PRs related to the Release Engineering subproject cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/cleanup Categorizes issue or PR as related to cleaning up code, process, or technical debt. lgtm "Looks good to me", indicates that a PR is ready to be merged. needs-priority release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/release Categorizes an issue or PR as relevant to SIG Release. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants