mirror of
https://github.com/pezkuwichain/pezkuwi-api.git
synced 2026-11-13 18:07:10 +00:00
ci: give every workflow an explicit least-privilege GITHUB_TOKEN (#16)
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:
1 parent
e3c72817fb
commit
67dbb67ddc
3 files changed
+17
No files matched your search
@@ -5,6 +5,13 @@ on:
|
|||||||
schedule:
|
schedule:
|
||||||
- cron: '10 1/3 * * *'
|
- cron: '10 1/3 * * *'
|
||||||
|
|
||||||
|
|
||||||
|
# dessant/lock-threads locks closed issues, PRs and discussions.
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
discussions: write
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lock:
|
lock:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
name: PR
|
name: PR
|
||||||
on: [pull_request]
|
on: [pull_request]
|
||||||
|
|
||||||
|
|
||||||
|
# Read-only token: no step writes through GITHUB_TOKEN.
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
pr:
|
pr:
|
||||||
strategy:
|
strategy:
|
||||||
|
|||||||
@@ -4,6 +4,11 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
|
||||||
|
# Writes go through a separate bot token or app token; GITHUB_TOKEN stays read-only.
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
master:
|
master:
|
||||||
if: "! startsWith(github.event.head_commit.message, '[CI Skip]')"
|
if: "! startsWith(github.event.head_commit.message, '[CI Skip]')"
|
||||||
|
|||||||
Reference in new issue
Block a user