Skip to content

Commit 6990d1c

Browse files
authored
Set workflow permissions (#1184)
1 parent 180a9eb commit 6990d1c

File tree

7 files changed

+24
-3
lines changed

7 files changed

+24
-3
lines changed

.github/workflows/build-net6.0.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
dotnet6-build-and-unit-test:
1619
name: Build and Test on .NET 6.0

.github/workflows/build-net8.0.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
dotnet8-build-and-unit-test:
1619
name: Build and Test on .NET 8.0

.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 1 * * 0'
66

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

.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
@@ -5,6 +5,9 @@ on:
55
release:
66
types: [ published ]
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
# Publish the nuget package
1013
publish:

.github/workflows/release.yml

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

23+
permissions:
24+
contents: write
25+
pull-requests: write
26+
2327
jobs:
2428
release:
25-
permissions:
26-
contents: write
27-
pull-requests: write
2829
runs-on: ubuntu-latest
2930
steps:
3031
- 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)