gnodet-bot commented on code in PR #12581:
URL: https://github.com/apache/maven/pull/12581#discussion_r4692799583


##########
.github/workflows/stale.yml:
##########
@@ -23,6 +23,11 @@ on:
   issue_comment:
     types: [ 'created' ]
 
+permissions: {}
+
 jobs:
   stale:
-    uses: 'apache/maven-gh-actions-shared/.github/workflows/stale.yml@v5'
+    permissions:
+      issues: write
+      pull-requests: write
+    uses: 
apache/maven-gh-actions-shared/.github/workflows/stale.yml@8599b638c78a2bec146a98d75d4c8b4e8458324f
 # v5

Review Comment:
   The permissions declared here (`issues: write` + `pull-requests: write`) are 
correct **for the pinned hash `8599b638`** — `stale.yml@8599b638` only needs 
those two. However, if this hash is ever updated to the current `v5` HEAD, 
`actions: write` must be added here: the current `v5` stale workflow declares 
it at the top level for `actions/stale` v11 state-cache cleanup, and GitHub's 
`workflow_call` permission model intersects the caller's grants with the 
callee's declared permissions — meaning the called workflow cannot have 
permissions the caller did not grant.
   
   ```suggestion
       permissions:
         actions: write
         issues: write
         pull-requests: write
   ```
   
   _(No change needed if keeping the hash pinned to `8599b638` — this 
suggestion applies only on hash update.)_



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to