-
Notifications
You must be signed in to change notification settings - Fork 711
Closed as not planned
Closed as not planned
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Description
When running cosign attest on GitHub Actions cosign seems to use the ambient github token for retrieving data from the registry for the purposes of signing instead of using the provided registry password/token.
The situation is as follows:
- Running inside a GitHub Actions workflow.
- The workflow job's ambient GitHub token does not have
packages: writepermission. - A PAT token with
packages: writeis given to the workflow and passed tocosign loginto authenticate. - Run
cosign atteston a previously created ghcr.io image.
This results in an error occurring during signing. Something like:
Error: signing ghcr.io/...: GET https://ghcr.io/token?...: DENIED: denied
I would expect this flow to succeed by using the auth set by cosign login to retrieve registry data for signing.
Background: This is for a GitHub reusable workflow that deals with registries generically and does not request packages: write for the github token, instead relying on the user to pass a token with the proper package: write permissions as a secret and logging them in using cosign login.
Version
v1.13.1
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working