Skip to content

feat!: require artifact-metadata:write permission for attestations#144

Merged
derrix060 merged 1 commit intomainfrom
feat/artifact-metadata-permission
Apr 10, 2026
Merged

feat!: require artifact-metadata:write permission for attestations#144
derrix060 merged 1 commit intomainfrom
feat/artifact-metadata-permission

Conversation

@derrix060
Copy link
Copy Markdown
Contributor

Summary

Breaking Change

Caller workflows with explicit permissions: blocks must add artifact-metadata: write:

permissions:
  id-token: write
  attestations: write
  artifact-metadata: write  # ← add this
  contents: read

Without it, GitHub will reject the workflow with a validation error.

Test plan

  • Verify caller workflows updated with the new permission pass
  • Verify the artifact-metadata:write and storage record warnings are gone

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.
Copilot AI review requested due to automatic review settings April 10, 2026 14:45
@derrix060 derrix060 merged commit e7be9b5 into main Apr 10, 2026
1 check passed
@derrix060 derrix060 deleted the feat/artifact-metadata-permission branch April 10, 2026 14:46
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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: write to the existing permissions blocks in Docker build-and-push reusable workflows.
  • Introduce explicit workflow-level permissions: blocks (including artifact-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.

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