feat!: require artifact-metadata:write permission for attestations#144
Merged
feat!: require artifact-metadata:write permission for attestations#144
Conversation
Add artifact-metadata:write to all Docker build and promote reusable workflows. This is required by the actions/attest-build-provenance action since GitHub made the permission GA in January 2026. BREAKING CHANGE: Caller workflows that set explicit permissions must add `artifact-metadata: write` to their permissions block. Without it, GitHub will reject the workflow with a validation error.
There was a problem hiding this comment.
Pull request overview
This PR updates the repository’s reusable Docker build/publish and image promotion workflows to explicitly request the new artifact-metadata: write permission required for provenance attestations, aligning with GitHub’s fine-grained permission GA (Jan 2026) and preventing workflow validation failures for callers with explicit permissions: blocks.
Changes:
- Add
artifact-metadata: writeto the existing permissions blocks in Docker build-and-push reusable workflows. - Introduce explicit workflow-level
permissions:blocks (includingartifact-metadata: write) in Docker promote reusable workflows.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .github/workflows/docker-promote-jfrog.yaml | Adds explicit workflow permissions including artifact-metadata: write to support attestations during promotion. |
| .github/workflows/docker-promote-dockerhub.yaml | Adds explicit workflow permissions including artifact-metadata: write to support attestations during promotion. |
| .github/workflows/docker-build-push-jfrog.yaml | Extends the existing permissions block with artifact-metadata: write. |
| .github/workflows/docker-build-push-dockerhub.yaml | Extends the existing permissions block with artifact-metadata: write. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
artifact-metadata: writeto all Docker build and promote reusable workflowsactions/attest-build-provenancesince GitHub made the permission GA in Jan 2026Breaking Change
Caller workflows with explicit
permissions:blocks must addartifact-metadata: write:Without it, GitHub will reject the workflow with a validation error.
Test plan
artifact-metadata:writeand storage record warnings are gone