Skip to content

Commit d4a9c9a

Browse files
authored
Set explicit workflow permissions (#418)
Fix actions/missing-workflow-permissions in Code Scanning alerts
1 parent 7b166f2 commit d4a9c9a

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

.github/workflows/build.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
schedule:
1111
- cron: "0 0 * * *"
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
test:
1518
name: ${{ matrix.os }}
@@ -28,8 +31,3 @@ jobs:
2831
run: make test
2932
- name: Run build
3033
run: make build
31-
- name: Upload Artifact
32-
uses: actions/upload-artifact@master
33-
with:
34-
name: tflint-ruleset-google-${{ matrix.os }}
35-
path: tflint-ruleset-google

.github/workflows/e2e.yml

+3
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
schedule:
1111
- cron: "0 0 * * *"
1212

13+
permissions:
14+
contents: read
15+
1316
jobs:
1417
e2e:
1518
name: ${{ matrix.os }} (${{ matrix.version }})

.github/workflows/goreleaser.yml

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
branches:
99
- master
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
check:
1316
runs-on: ubuntu-latest

.github/workflows/maintenance.yml

+7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
1+
name: maintenance
2+
13
on:
24
push:
35
branches: [ master ]
46
schedule:
57
- cron: '0 0 * * 1'
68
workflow_dispatch: # Enables on-demand/manual triggering
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
714
jobs:
815
job:
916
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)