Skip to content

Commit 0952d5a

Browse files
committed
ci: declare permissions on build-check and codeql-analysis
build-check.yml: pure CI matrix compile - contents: read. codeql-analysis.yml: github/codeql-action workflows need actions: read contents: read security-events: write (SARIF upload) which is the standard scope set for any CodeQL workflow. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
1 parent 9a2c3c7 commit 0952d5a

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/build-check.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
branches:
77
- main
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
compile:
1114
strategy:

.github/workflows/codeql-analysis.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ concurrency:
1212
group: codeql-${{ github.ref_name }}
1313
cancel-in-progress: true
1414

15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write # github/codeql-action/upload posts SARIF results
19+
1520
jobs:
1621
codeql-analyze:
1722
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)