Skip to content

Commit c0d1c97

Browse files
ci: add GitHub token permissions for workflows (#1495)
Signed-off-by: Varun Sharma <[email protected]>
1 parent 413984d commit c0d1c97

File tree

6 files changed

+21
-0
lines changed

6 files changed

+21
-0
lines changed

.github/workflows/bandit.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ on:
99
branches:
1010
- main
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
build:
1417
runs-on: ubuntu-latest

.github/workflows/cfn-nag.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
branches:
1414
- main
1515

16+
permissions:
17+
contents: read
18+
1619
jobs:
1720
build:
1821
runs-on: ubuntu-latest

.github/workflows/minimal-tests.yml

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

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
Check:
1316

.github/workflows/snyk.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: Snyk
33
on:
44
workflow_dispatch
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
security:
811
runs-on: ubuntu-latest

.github/workflows/static-checking.yml

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

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
Check:
1316

.github/workflows/unlabel-assigned-issue.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,14 @@ on:
33
issues:
44
types:
55
- assigned
6+
permissions:
7+
contents: read
8+
69
jobs:
710
unlabel-issue:
11+
permissions:
12+
issues: write # for andymckay/labeler to label issues
13+
pull-requests: write # for andymckay/labeler to label PRs
814
runs-on: ubuntu-latest
915
steps:
1016
- name: unlabel-issues

0 commit comments

Comments
 (0)