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

Update cosign #1201

Merged
merged 3 commits into from
Sep 19, 2023
Merged

Update cosign #1201

merged 3 commits into from
Sep 19, 2023

Conversation

natalieparellano
Copy link
Member

Summary

Updates GitHub actions workflows that use cosign to sign and verify lifecycle images to use keyless signing. This is the default as of cosign 2.x.x and is considered more secure than signing with a long-lived private key. Note that the cosign verify command for verifying signatures is also updated.

When this is merged, we can remove COSIGN_PASSWORD and COSIGN_PRIVATE_KEY from repo secrets. We'll also need to update our Docker Hub page help text with the new information.

Release notes

  • When signing lifecycle images in GitHub actions with cosign, use keyless signing

Related

Resolves #___


Context

Tested (with some effort) on fork: https://github.com/natalieparellano/lifecycle/actions

@natalieparellano natalieparellano requested a review from a team as a code owner September 18, 2023 19:42
@natalieparellano natalieparellano changed the base branch from main to update-actions September 18, 2023 19:43
Comment on lines +114 to +115
permissions:
id-token: write
Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +9 to +10
permissions:
contents: write
Copy link
Member Author

Choose a reason for hiding this comment

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

I updated the repo "Actions permissions" settings to use the more restrictive "Read repository contents and package permissions" instead of the more permissive "Read and write permissions", thus this is now required.

Base automatically changed from update-actions to main September 19, 2023 12:54
@natalieparellano natalieparellano merged commit 2b81abb into main Sep 19, 2023
@natalieparellano natalieparellano deleted the update-cosign branch September 19, 2023 14:02
natalieparellano added a commit that referenced this pull request Dec 14, 2023
In #1201 we explicitly granted
the needed permissions to the token, and we updated the repo settings to be the most restrictive.
Now that the repo has been updated, the draft-release workflow is broken
for minor versions less than 0.18.x.

This change will allow us to continue to patch 0.17.x.

Signed-off-by: Natalie Arellano <[email protected]>
natalieparellano added a commit that referenced this pull request Jan 10, 2024
…ons (#1256)

In #1201 we explicitly granted
the needed permissions to the token, and we updated the repo settings to be the most restrictive.
Now that the repo has been updated, the draft-release workflow is broken
for minor versions less than 0.18.x.

This change will allow us to continue to patch 0.17.x.

Signed-off-by: Natalie Arellano <[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.

2 participants