Skip to content

Commit eb07385

Browse files
authored
ci: add minimum GitHub token permissions for workflows (#6236)
Signed-off-by: Ashish Kurmi <[email protected]>
1 parent 2745db1 commit eb07385

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,15 @@ on:
1414
schedule:
1515
- cron: '0 23 * * 0'
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
analyze:
22+
permissions:
23+
actions: read # for github/codeql-action/init to get workflow details
24+
contents: read # for actions/checkout to fetch code
25+
security-events: write # for github/codeql-action/autobuild to send a status report
1926
name: Analyze
2027
runs-on: ubuntu-latest
2128

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
push:
55
pull_request:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
lint:
912
runs-on: ubuntu-20.04

.github/workflows/run-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Tests
22

33
on: [push, pull_request]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
build:
710
runs-on: ${{ matrix.os }}

0 commit comments

Comments
 (0)