Skip to content

Commit 93887fe

Browse files
Nicolas Brieusselnbrieussel
authored andcommitted
fix: restrict GITHUB_TOKEN to contents: read in sync workflow
The GITHUB_TOKEN previously inherited org-wide default permissions. Since the workflow only uses GitHub App credentials for the sync and GITHUB_TOKEN is only needed for the two actions/checkout steps, restrict it to contents: read. Closes #3
1 parent 93595c2 commit 93887fe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

.github/workflows/safe-settings-sync.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
sync:
2222
name: Sync org settings${{ github.event.inputs.nop == 'true' && ' (dry-run)' || '' }}
2323
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
2426
env:
2527
SAFE_SETTINGS_VERSION: 2.1.17
2628
SAFE_SETTINGS_CODE_DIR: ${{ github.workspace }}/.safe-settings-code

0 commit comments

Comments
 (0)