ci: give every workflow an explicit least-privilege GITHUB_TOKEN (#13)

CodeQL actions/missing-workflow-permissions: lock.yml, pr-any.yml, push-master.yml had no permissions block, so their jobs received the repository default token. Read-only where nothing writes through GITHUB_TOKEN; lock-threads gets the issues/pull-requests/discussions write it documents; workflows that write do it with a separate bot or app token, so GITHUB_TOKEN stays read-only.
This commit is contained in:
SatoshiQaziMuhammed authored and GitHub committed 2026-10-20 23:00:21 +04:00
1 parent 6a02a562b7
commit 71e061e789
3 files changed
+17

No files matched your search

+7
View File
@@ -5,6 +5,13 @@ on:
schedule:
- cron: '15 1/3 * * *'
# dessant/lock-threads locks closed issues, PRs and discussions.
permissions:
issues: write
pull-requests: write
discussions: write
jobs:
lock:
runs-on: ubuntu-latest