Parcourir la source

Updated .github/workflows/cleanup-ghcr.yml

maziggy il y a 3 semaines
Parent
commit
46468c9602
1 fichiers modifiés avec 6 ajouts et 0 suppressions
  1. 6 0
      .github/workflows/cleanup-ghcr.yml

+ 6 - 0
.github/workflows/cleanup-ghcr.yml

@@ -19,6 +19,12 @@ on:
         type: boolean
         type: boolean
         default: false
         default: false
 
 
+# This workflow authenticates exclusively via GHCR_CLEANUP_TOKEN (a classic PAT)
+# and never reads/writes via the default GITHUB_TOKEN. Strip every permission
+# from the GITHUB_TOKEN so a stolen workflow run can't reach the repo at all
+# — least privilege per CodeQL `actions/missing-workflow-permissions`.
+permissions: {}
+
 jobs:
 jobs:
   cleanup:
   cleanup:
     runs-on: ubuntu-latest
     runs-on: ubuntu-latest