Skip to content

Commit 3e090a6

Browse files
authored
Reduce scopes granted to GITHUB_TOKEN in GitHub Actions workflows (#265)
As part of security-hardening our GHA workflows, this reduces the permissions granted to the automatically set `GITHUB_TOKEN` env var in GitHub Actions workflows to no more than what is required by that workflow. See: https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication GUS-W-18053749.
1 parent 99e7a0f commit 3e090a6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

.github/workflows/prepare-release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
- minor
1414
- patch
1515

16+
# Disable all GITHUB_TOKEN permissions, since the GitHub App token is used instead.
17+
permissions: {}
18+
1619
jobs:
1720
prepare-release:
1821
uses: heroku/languages-github-actions/.github/workflows/_buildpacks-prepare-release.yml@latest

.github/workflows/release.yml

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
type: boolean
99
default: false
1010

11+
# Disable all GITHUB_TOKEN permissions, since the GitHub App token is used instead.
12+
permissions: {}
13+
1114
jobs:
1215
release:
1316
name: Release

0 commit comments

Comments
 (0)