Skip to content

Commit 1878734

Browse files
Add minimum token permissions for all github workflow files (#839)
1 parent bb325fc commit 1878734

File tree

5 files changed

+14
-0
lines changed

5 files changed

+14
-0
lines changed

.github/workflows/BuildAndTest.yml

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

8+
permissions:
9+
contents: read
10+
811
jobs:
912
FormattingLint:
1013
runs-on: macos-15

.github/workflows/CodeQL-Analysis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
pull_request:
77
branches: [ main ]
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
analyze:
1114
name: Analyze CodeQL

.github/workflows/Create-Release-PR.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
new_version:
66
description: "New sdk version"
77
required: true
8+
permissions:
9+
contents: read
810
jobs:
911
Release:
1012
runs-on: ubuntu-latest

.github/workflows/PR-Release-Warning.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
- main
66
types:
77
- opened
8+
permissions:
9+
contents: read
810
jobs:
911
Check:
1012
runs-on: ubuntu-latest

.github/workflows/Tag-And-Release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@ on :
55
- main
66
types:
77
- closed
8+
permissions:
9+
contents: read
810
jobs:
911
CheckRelease:
12+
permissions:
13+
contents: write # required for creating tags and releases
1014
runs-on: macos-15
1115
steps:
1216
- name: Check if merge is release branch

0 commit comments

Comments
 (0)