Skip to content

Commit 59988d8

Browse files
Potential fix for code scanning alert no. 2: Workflow does not contain permissions
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent 6769034 commit 59988d8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/dotnet.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Build Project
22

3+
permissions:
4+
contents: read
5+
36
env:
47
DOTNET_NOLOGO: true
58
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
@@ -66,6 +69,9 @@ jobs:
6669
runs-on: ubuntu-latest
6770
needs: build
6871
if: success() && github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v'))
72+
permissions:
73+
contents: read
74+
packages: write
6975

7076
steps:
7177
- name: Download Artifact

0 commit comments

Comments
 (0)