Skip to content

Commit 3046da5

Browse files
committed
Drop GitHub token permissions on deploy jobs
Deploy jobs only curl an external updater URL and need no GitHub API access. Without an explicit permissions block they inherit the workflow default, which may include contents:write, packages:write, etc. Setting permissions to {} limits the blast radius if a job is compromised.
1 parent 638fa63 commit 3046da5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.github/workflows/ci-site.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ jobs:
135135
runs-on: ubuntu-latest
136136
needs: merge
137137
if: github.ref == 'refs/heads/master' || github.event_name == 'release'
138+
permissions: {} # only calls an external URL via curl, no GitHub API access needed
138139

139140
steps:
140141
- name: trigger deployment

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ jobs:
206206
runs-on: ubuntu-latest
207207
needs: merge
208208
if: github.event.workflow_run.head_branch == 'master'
209+
permissions: {} # only calls an external URL via curl, no GitHub API access needed
209210

210211
steps:
211212
- name: trigger deployment

0 commit comments

Comments
 (0)