From 7c4a5b1ea37812b3d50349da7693f443cac359c1 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 26 Oct 2026 17:46:46 +0000 Subject: [PATCH] fix: scope publish-preview write permission to the calling job zizmor flags workflow-level pull-requests: write as overly broad. Grant it only on the publish-preview job, and keep contents: read on the workflow and the job. Co-authored-by: George Marshall --- .github/workflows/publish-preview.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish-preview.yml b/.github/workflows/publish-preview.yml index 5030117561c..23972db77e6 100644 --- a/.github/workflows/publish-preview.yml +++ b/.github/workflows/publish-preview.yml @@ -6,10 +6,14 @@ on: permissions: contents: read - pull-requests: write jobs: publish-preview: + # Job permissions replace the workflow set. The shared workflow still + # needs pull-requests: write to comment, and contents: read to check out. + permissions: + contents: read + pull-requests: write if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '@metamaskbot publish-preview') }} uses: MetaMask/github-tools/.github/workflows/publish-preview.yml@v1 with: