Skip to content

Commit 834486d

Browse files
authored
fix: add permissions to workflows (#1439)
1 parent 6cbbd13 commit 834486d

5 files changed

Lines changed: 31 additions & 0 deletions

File tree

.github/workflows/pull-request-main.yml

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

9+
permissions: {}
10+
911
jobs:
1012
ci-lint:
1113
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
1216
steps:
1317
- name: Checkout repo (needed to reference local action)
1418
uses: actions/checkout@v5
@@ -24,6 +28,8 @@ jobs:
2428

2529
ci-prettier:
2630
runs-on: ubuntu-latest
31+
permissions:
32+
contents: read
2733
steps:
2834
- name: Checkout repo (needed to reference local action)
2935
uses: actions/checkout@v5
@@ -39,6 +45,8 @@ jobs:
3945

4046
ci-lint-misc:
4147
runs-on: ubuntu-latest
48+
permissions:
49+
contents: read
4250
steps:
4351
- name: Checkout repo (needed to reference local action)
4452
uses: actions/checkout@v5
@@ -56,6 +64,9 @@ jobs:
5664
# 1. More generalizable for all workspaces requiring build artifacts
5765
# 2. Have better attribution for the commits generated from this workflow
5866
if: false
67+
permissions:
68+
contents: write
69+
pull-requests: write
5970
runs-on: ubuntu-latest
6071
steps:
6172
- name: Checkout repo (needed to reference local action)
@@ -85,6 +96,8 @@ jobs:
8596

8697
ci-signed-commits:
8798
runs-on: ubuntu-latest
99+
permissions:
100+
contents: read
88101
steps:
89102
- name: Checkout repo (needed to reference local action)
90103
uses: actions/checkout@v5
@@ -101,6 +114,8 @@ jobs:
101114

102115
ci-test:
103116
runs-on: ubuntu-latest
117+
permissions:
118+
contents: read
104119
steps:
105120
- name: Checkout repo (needed to reference local action)
106121
uses: actions/checkout@v5
@@ -116,6 +131,8 @@ jobs:
116131

117132
ci-build-artifacts:
118133
runs-on: ubuntu-latest
134+
permissions:
135+
contents: read
119136
steps:
120137
- name: Checkout repo (needed to reference local action)
121138
uses: actions/checkout@v5

.github/workflows/push-main.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ on:
55
branches:
66
- main
77

8+
permissions: {}
9+
810
jobs:
911
ci-lint:
1012
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
1115
steps:
1216
- name: Checkout repo (needed to reference local action)
1317
uses: actions/checkout@v5
@@ -21,6 +25,8 @@ jobs:
2125

2226
ci-prettier:
2327
runs-on: ubuntu-latest
28+
permissions:
29+
contents: read
2430
steps:
2531
- name: Checkout repo (needed to reference local action)
2632
uses: actions/checkout@v5
@@ -36,6 +42,8 @@ jobs:
3642

3743
ci-test:
3844
runs-on: ubuntu-latest
45+
permissions:
46+
contents: read
3947
steps:
4048
- name: Checkout repo (needed to reference local action)
4149
uses: actions/checkout@v5

.github/workflows/reusable-codeowners-review-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ on:
4343
description: "AWS Lambda URL for GATI."
4444
required: false
4545

46+
permissions: {}
47+
4648
jobs:
4749
codeowners-review-analysis:
4850
runs-on: ubuntu-latest

.github/workflows/schedule-renovate.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ on:
55
schedule:
66
- cron: "0 0 * * *"
77

8+
permissions: {}
9+
810
jobs:
911
renovate:
1012
runs-on: ubuntu-latest

.github/workflows/stale.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ name: Manage stale PRs
33
on:
44
schedule:
55
- cron: "30 0 * * *" # will be triggered daily at 00:30 UTC.
6+
67
permissions: {}
8+
79
jobs:
810
stale-prs:
911
permissions:

0 commit comments

Comments
 (0)