Skip to content

Commit 553eb4c

Browse files
authored
ci: define minimal permissions to github workflows (#1295)
Signed-off-by: Diogo Teles Sant'Anna <[email protected]>
1 parent f6bb79e commit 553eb4c

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ on:
2020
schedule:
2121
- cron: '31 21 * * 6'
2222

23+
# Minimal permissions to be inherited by any job that don't declare it's own permissions
24+
permissions:
25+
contents: read
26+
2327
jobs:
2428
analyze:
2529
name: Analyze

.github/workflows/go.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
- main
88
- 'release-*'
99

10+
# Minimal permissions to be inherited by any job that don't declare it's own permissions
11+
permissions:
12+
contents: read
13+
1014
jobs:
1115
test:
1216
name: Tests
@@ -39,4 +43,4 @@ jobs:
3943

4044
- name: Run style and unused
4145
if: ${{ matrix.go_version == '1.20' }}
42-
run: make style unused
46+
run: make style unused

0 commit comments

Comments
 (0)