Skip to content

Commit 1a304cf

Browse files
committed
security(workflows): add permissions
1 parent 8df72d0 commit 1a304cf

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

.github/workflows/build_and_test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ jobs:
1717
os: macos-latest
1818
- env: windows-64
1919
os: windows-latest
20+
permissions:
21+
contents: read
2022
steps:
2123
- name: Checkout
2224
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

.github/workflows/deploy_prerelease.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on:
55
jobs:
66
github:
77
name: Publish GitHub
8-
permissions:
9-
contents: write
108
environment: GITHUB_PRE_RELEASE
119
runs-on: ubuntu-latest
10+
permissions:
11+
contents: write
1212
steps:
1313
- name: Checkout
1414
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

.github/workflows/deploy_release.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ jobs:
66
check_version_bump:
77
name: Check version bump
88
runs-on: ubuntu-latest
9+
permissions:
10+
contents: read
911
steps:
1012
- name: Checkout
1113
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -34,6 +36,8 @@ jobs:
3436
needs: check_version_bump
3537
environment: CRATES_IO
3638
runs-on: ubuntu-latest
39+
permissions:
40+
contents: read
3741
steps:
3842
- name: Checkout
3943
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
@@ -51,10 +55,10 @@ jobs:
5155
github:
5256
name: Publish GitHub
5357
needs: crates_io
54-
permissions:
55-
contents: write
5658
environment: GITHUB_RELEASE
5759
runs-on: ubuntu-latest
60+
permissions:
61+
contents: write
5862
steps:
5963
- name: Checkout
6064
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

0 commit comments

Comments
 (0)