Skip to content

Commit e63a0b2

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

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
test:
1111
name: Test
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
1315
strategy:
1416
matrix:
1517
go-version: [ '1.18', '1.19', '1.20', '1.21', '1.22' , '1.23' , '1.24']
@@ -69,6 +71,8 @@ jobs:
6971
name: "Test success"
7072
if: always()
7173
runs-on: ubuntu-latest
74+
permissions:
75+
contents: read
7276
needs: [ test ]
7377
steps:
7478
- name: "Success"
@@ -82,6 +86,8 @@ jobs:
8286

8387
draft:
8488
runs-on: ubuntu-latest
89+
permissions:
90+
contents: write
8591
needs: test_success
8692
if: github.ref == 'refs/heads/main'
8793
steps:

0 commit comments

Comments
 (0)