Skip to content

Commit b98a251

Browse files
authored
chore: harden GITHUB_TOKEN permissions on internal workflows (#526)
Scope the workflow runner token to least privilege: - bump-gitstream-core.yml: permissions: {} (uses PAT, not GITHUB_TOKEN) - create-tag-on-merge.yml: contents: write + pull-requests: read Follows https://github.blog/changelog/2021-04-20-github-actions-control-permissions-for-github_token/
1 parent d1b4cbc commit b98a251

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/bump-gitstream-core.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ on:
2525
description: GitHub username to assign as reviewer
2626
required: false
2727

28+
permissions: {}
29+
2830
jobs:
2931
publish_pr:
3032
name: Publish PR

.github/workflows/create-tag-on-merge.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ on:
1515
env:
1616
SLACK_WEBHOOK: ${{ secrets.SLACK_WORKFLOWS_DEPLOYMENT_WEBHOOK }}
1717

18+
permissions:
19+
contents: write
20+
pull-requests: read
21+
1822
jobs:
1923
create-tag:
2024
runs-on: ubuntu-24.04

0 commit comments

Comments
 (0)