Skip to content

Commit 2cab124

Browse files
authored
Merge pull request hub4j#1432 from turrisxyz/naveen/feat/set-perms-actions
Set permissions for GitHub actions
2 parents cb7aacf + 740ed06 commit 2cab124

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
@@ -20,8 +20,15 @@ on:
2020
schedule:
2121
- cron: '20 0 * * 6'
2222

23+
permissions:
24+
contents: read
25+
2326
jobs:
2427
analyze:
28+
permissions:
29+
actions: read # for github/codeql-action/init to get workflow details
30+
contents: read # for actions/checkout to fetch code
31+
security-events: write # for github/codeql-action/autobuild to send a status report
2532
name: Analyze
2633
runs-on: ubuntu-latest
2734

.github/workflows/maven-build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ on:
1414
env:
1515
JAVA_11_PLUS_MAVEN_OPTS: "--add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED --add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"
1616

17+
permissions:
18+
contents: read
19+
1720
jobs:
1821
build:
1922
name: build-only (Java ${{ matrix.java }})

.github/workflows/release-drafter.yml

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

9+
permissions:
10+
contents: read
11+
912
jobs:
1013
update_release_draft:
14+
permissions:
15+
contents: write # for release-drafter/release-drafter to create a github release
16+
pull-requests: write # for release-drafter/release-drafter to add label to PR
1117
runs-on: ubuntu-latest
1218
steps:
1319
- name: Release Drafter

0 commit comments

Comments
 (0)