Backport workflow-hardening fix (excessive-permissions) to 3 release branches

Open Beginner friendly
#14,085 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
85/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Quiet
Tech stack
github-actions, python
Domain
ci-cd, security

Research direction

Apply the suggested change to .github/workflows/stale.yml on stable-cascade-dtype, release-tests, and stable-cascade-upcasting. Start by comparing each branch with the default-branch fix, then run zizmor and actionlint for each workflow. Done means the excessive-permissions finding is cleared without new findings on all three branches.

Written by the indexing model from the issue text.

Description

Summary

The default branch already hardened .github/workflows/stale.yml against the issue(s) below, but 3 release branches still carry it. This proposes the same, minimal, scanner-verified fix for each.

What's flagged (by zizmor)
  • excessive-permissions — workflow/job granted broader permissions than needed

Already resolved on the default branch in:

Affected release branches (3)
  • stable-cascade-dtype (still present as of HEAD 327d8e5a)
  • release-tests (still present as of HEAD 7ef1df4a)
  • stable-cascade-upcasting (still present as of HEAD 1ca9acc2)
Suggested per-branch patches

Each diff below was checked locally with zizmor and actionlint: the flagged finding(s) are cleared on the affected construct and no new lint or security findings are introduced. (Whitespace is normalized; only security-relevant lines change.)

stable-cascade-dtype — excessive-permissions

File .github/workflows/stale.yml; suggested edits:

    • jobs.$J.permissions.issues = 'write'
    • jobs.$J.permissions.pull-requests = 'write'
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -25,3 +25,6 @@
       - name: Close stale issues
         run: |
           python utils/stale.py
+    permissions:
+      issues: write
+      pull-requests: write
release-tests — excessive-permissions

File .github/workflows/stale.yml; suggested edits:

    • jobs.$J.permissions.issues = 'write'
    • jobs.$J.permissions.pull-requests = 'write'
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -25,3 +25,6 @@
       - name: Close stale issues
         run: |
           python utils/stale.py
+    permissions:
+      issues: write
+      pull-requests: write
stable-cascade-upcasting — excessive-permissions

File .github/workflows/stale.yml; suggested edits:

    • jobs.$J.permissions.issues = 'write'
    • jobs.$J.permissions.pull-requests = 'write'
--- a/.github/workflows/stale.yml
+++ b/.github/workflows/stale.yml
@@ -25,3 +25,6 @@
       - name: Close stale issues
         run: |
           python utils/stale.py
+    permissions:
+      issues: write
+      pull-requests: write

Happy to open pull requests instead if that's preferred.

Dominant language
Python
Stars
34.6k
Forks
7.3k
Avg merge
3d 16h
Merged PRs (30d)
74

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from huggingface/diffusers

All issues in huggingface/diffusers

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.