Skip to content

Commit 60e70cc

Browse files
authored
ci: scope down GitHub Token permissions (#829)
* ci: scope down permissions for pull.yml * ci: scope down permissions for issue-notification.yml * ci: scope down permissions for repo-sync.yml * ci: scope down permissions for clang-format.yml * ci: scope down permissions for daily_ci.yml * ci: scope down permissions for push.yml
1 parent b353e97 commit 60e70cc

6 files changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/clang-format.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: test-clang-format
33
on:
44
workflow_call:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
build:
811
runs-on: ubuntu-latest

.github/workflows/daily_ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
schedule:
66
- cron: "00 15 * * 1-5"
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
codebuild:
1013
if: github.event_name != 'schedule' || github.repository_owner == 'aws'

.github/workflows/issue-notification.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
issue_comment:
66
types: [created]
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
notify-issue:
1013
if: github.event_name == 'issues'

.github/workflows/pull.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Pull Request Workflow
33
on:
44
pull_request:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
clang-format:
811
uses: ./.github/workflows/clang-format.yml

.github/workflows/push.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
branches: master
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
clang-format:
912
uses: ./.github/workflows/clang-format.yml

.github/workflows/repo-sync.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ name: Repo Sync
33
on:
44
workflow_dispatch: # allows triggering this manually through the Actions UI
55

6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
610
jobs:
711
repo-sync:
812
name: Repo Sync

0 commit comments

Comments
 (0)