Skip to content

Commit 3ddaeb8

Browse files
CopilotKSemenenko
andcommitted
Add explicit permissions to GitHub workflows for security
Co-authored-by: KSemenenko <4385716+KSemenenko@users.noreply.github.com>
1 parent 9b62416 commit 3ddaeb8

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
build:
1414
name: Build and Test
1515
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
1618

1719
steps:
1820
- name: Checkout

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ jobs:
1212
build:
1313
name: Build and Test
1414
runs-on: ubuntu-latest
15+
permissions:
16+
contents: read
1517

1618
outputs:
1719
version: ${{ steps.version.outputs.version }}
@@ -59,6 +61,8 @@ jobs:
5961
needs: build
6062
runs-on: ubuntu-latest
6163
if: github.ref == 'refs/heads/main'
64+
permissions:
65+
contents: read
6266

6367
outputs:
6468
published: ${{ steps.publish.outputs.published }}
@@ -122,6 +126,8 @@ jobs:
122126
needs: publish-nuget
123127
runs-on: ubuntu-latest
124128
if: needs.publish-nuget.outputs.published == 'true'
129+
permissions:
130+
contents: write
125131

126132
steps:
127133
- name: Checkout

0 commit comments

Comments
 (0)