Skip to content

Commit 9bc29c8

Browse files
authored
Set explicit permissions for GitHub Actions workflows
Merging PR via automated process
1 parent e7c0c2a commit 9bc29c8

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

.github/workflows/coverage.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
branches:
55
- master
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
code-coverage:
912
runs-on: ubuntu-latest-16-cores

.github/workflows/gradle-wrapper-validation.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: "Validate Gradle Wrapper"
22
on: [push, pull_request]
33

4+
permissions:
5+
contents: read
6+
47
jobs:
58
validation:
69
name: "Gradle wrapper validation"

.github/workflows/prepare-release.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ on:
2424
description: "Publish Java Artifacts"
2525
required: true
2626
default: "true"
27+
28+
permissions:
29+
contents: read
30+
2731
env:
2832
INPUT_REF: ${{ github.event.inputs.ref }}
2933
INPUT_TAG: ${{ github.event.inputs.tag }}
@@ -32,6 +36,8 @@ jobs:
3236
create_draft_release:
3337
name: Create Github draft release
3438
runs-on: ubuntu-latest
39+
permissions:
40+
contents: write
3541
steps:
3642
- name: Audit gh version
3743
run: gh --version
@@ -133,6 +139,9 @@ jobs:
133139
name: Attach native executables to release
134140
needs: [build_native_images, create_draft_release]
135141
runs-on: ubuntu-latest
142+
permissions:
143+
contents: write
144+
actions: write
136145
steps:
137146
- name: Audit gh version
138147
run: gh --version

.github/workflows/publish-snapshot.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ on:
2222
tags-ignore:
2323
- 'v*'
2424

25+
permissions:
26+
contents: read
27+
2528
jobs:
2629
publish-snapshot:
2730
if: github.repository == 'temporalio/sdk-java' || github.event_name == 'workflow_dispatch'

0 commit comments

Comments
 (0)