Skip to content

Commit 55bd5bf

Browse files
authored
fix: use right token permissions (#6430)
Signed-off-by: Jorge Turrado <[email protected]>
1 parent 87cb45f commit 55bd5bf

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

.github/workflows/main-build.yml

+9
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ jobs:
9292

9393
trivy-scan:
9494
needs: build
95+
permissions:
96+
contents: read
97+
security-events: write
9598
uses: kedacore/keda/.github/workflows/template-trivy-scan.yml@main
9699
with:
97100
runs-on: ubuntu-latest
@@ -102,6 +105,9 @@ jobs:
102105

103106
trivy-scan-metrics-server:
104107
needs: build
108+
permissions:
109+
contents: read
110+
security-events: write
105111
strategy:
106112
matrix:
107113
runner: [ARM64, ubuntu-latest]
@@ -116,6 +122,9 @@ jobs:
116122

117123
trivy-scan-keda:
118124
needs: build
125+
permissions:
126+
contents: read
127+
security-events: write
119128
strategy:
120129
matrix:
121130
runner: [ARM64, ubuntu-latest]

.github/workflows/template-smoke-tests.yml

-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,6 @@ on:
1313
required: true
1414
type: string
1515

16-
permissions:
17-
contents: read
18-
1916
jobs:
2017
smoke-tests:
2118
name: Validate k8s-${{ inputs.kubernetesVersion }}

.github/workflows/template-trivy-scan.yml

-4
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ on:
3131
required: true
3232
type: boolean
3333

34-
permissions:
35-
contents: read
36-
security-events: write
37-
3834
jobs:
3935
trivy-scan:
4036
name: Trivy - ${{ inputs.runs-on }} - ${{ inputs.scan-type }} ${{ inputs.image-ref }}

0 commit comments

Comments
 (0)