Skip to content

Commit 3b0772d

Browse files
authored
Merge pull request #2207 from turrisxyz/naveen/feat/set-perms-actions
Set permissions for GitHub actions
2 parents 2ea9cf8 + a2523e3 commit 3b0772d

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

.github/workflows/codeql-analysis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,15 @@ on:
99
schedule:
1010
- cron: '37 19 * * 0'
1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
analyze:
17+
permissions:
18+
actions: read # for github/codeql-action/init to get workflow details
19+
contents: read # for actions/checkout to fetch code
20+
security-events: write # for github/codeql-action/autobuild to send a status report
1421
name: Analyze
1522
runs-on: ubuntu-latest
1623

.github/workflows/generate.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ on:
99
description: 'The remote kubernetes release branch to fetch openapi spec. .e.g. "release-1.23"'
1010

1111

12+
permissions:
13+
contents: read
14+
1215
jobs:
1316
generate:
17+
permissions:
18+
contents: write # for Git to git push
19+
pull-requests: write # for repo-sync/pull-request to create pull requests
1420
runs-on: ubuntu-latest
1521
steps:
1622
- name: Checkout Java

.github/workflows/snapshot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ on:
66
- master
77
workflow_dispatch: {}
88

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
verify:
1114
name: latest-images

0 commit comments

Comments
 (0)