Skip to content

Commit 603ac9a

Browse files
committed
build: harden ci.yaml permissions
Signed-off-by: Alex <[email protected]>
1 parent c3ba2f4 commit 603ac9a

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ env:
3030
# `java` (we could use the `_JAVA_OPTIONS` environment variable, but this prints
3131
# text on stderr and so can break tests which check the output of a program).
3232

33+
permissions:
34+
contents: read # to fetch code (actions/checkout)
35+
3336
jobs:
3437
test_non_bootstrapped:
3538
runs-on: [self-hosted, Linux]
@@ -528,6 +531,9 @@ jobs:
528531
./project/scripts/sbtPublish ";project scala3-bootstrapped ;publishSigned ;sonatypeBundleRelease"
529532
530533
nightly_documentation:
534+
permissions:
535+
contents: write # to push pages branch (peaceiris/actions-gh-pages)
536+
531537
runs-on: [self-hosted, Linux]
532538
container:
533539
image: lampepfl/dotty:2021-03-22
@@ -706,6 +712,10 @@ jobs:
706712

707713

708714
open_issue_on_failure:
715+
permissions:
716+
contents: read # to fetch code (actions/checkout)
717+
issues: write # to create new issues (jasonetco/create-an-issue)
718+
709719
runs-on: [self-hosted, Linux]
710720
container:
711721
image: lampepfl/dotty:2021-03-22

0 commit comments

Comments
 (0)