Skip to content

Commit 34fe296

Browse files
authored
Set workflow permissions (#1547)
1 parent 936c6de commit 34fe296

File tree

7 files changed

+24
-5
lines changed

7 files changed

+24
-5
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ on:
44
schedule:
55
- cron: '0 0 * * 4'
66

7+
permissions:
8+
contents: read
9+
security-events: write
10+
711
jobs:
812
CodeQL-Build:
913

.github/workflows/format.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@ on:
55
branches:
66
- 'sdk-automation/models'
77

8+
permissions:
9+
contents: write
10+
811
jobs:
912
format:
1013
if: ${{ github.event.commits != null && !startsWith(github.event.head_commit.message, 'style(fmt)') }}
11-
permissions:
12-
contents: write
1314
runs-on: ubuntu-latest
1415

1516
steps:

.github/workflows/javaci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111
- promote/main
1212
workflow_dispatch: {}
1313

14+
permissions:
15+
contents: read
16+
1417
jobs:
1518
java-check:
1619
name: Java Code Check

.github/workflows/label_new_issues.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ on:
33
issues:
44
types: [opened]
55

6+
permissions:
7+
issues: write
8+
69
jobs:
710
add-label:
811
runs-on: ubuntu-latest

.github/workflows/publish.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
release:
55
types: [published]
66

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

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ on:
2020
branches:
2121
- main
2222

23+
permissions:
24+
contents: write
25+
pull-requests: write
26+
2327
jobs:
2428
release:
2529
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
26-
permissions:
27-
contents: write
28-
pull-requests: write
2930
runs-on: ubuntu-latest
3031
steps:
3132
- uses: actions/checkout@v4

.github/workflows/stale.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ on:
33
schedule:
44
- cron: '30 8 * * *'
55

6+
permissions:
7+
issues: write
8+
pull-requests: write
9+
610
jobs:
711
stale:
812
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)