Skip to content

Commit bb37497

Browse files
varunsh-coderGoogle Java Core Libraries
authored andcommitted
ci: add GitHub token permissions for workflow
Signed-off-by: Varun Sharma <varunsh@stepsecurity.io> Closes #6106 RELNOTES=n/a PiperOrigin-RevId: 460733976
1 parent 4cf437c commit bb37497

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,14 @@ on:
88
branches:
99
- master
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
test:
16+
permissions:
17+
actions: write # for styfle/cancel-workflow-action to cancel/stop running workflows
18+
contents: read # for actions/checkout to fetch code
1319
name: "${{ matrix.root-pom }} on JDK ${{ matrix.java }}"
1420
strategy:
1521
matrix:
@@ -68,6 +74,8 @@ jobs:
6874
run: ./util/deploy_snapshot.sh
6975

7076
generate_docs:
77+
permissions:
78+
contents: write
7179
name: 'Generate latest docs'
7280
needs: test
7381
if: github.event_name == 'push' && github.repository == 'google/guava'

0 commit comments

Comments
 (0)