Skip to content

Commit 7284f2f

Browse files
Cleanup of workflows for Zizmor compliance
1 parent bfc2187 commit 7284f2f

File tree

9 files changed

+59
-31
lines changed

9 files changed

+59
-31
lines changed

.github/workflows/publish-python.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,19 @@ jobs:
3333
outputs:
3434
version: ${{ steps.version-output.outputs.version }}
3535
tag_name: ${{ steps.version-output.outputs.tag_name }}
36+
env:
37+
INPUTS: ${{ toJson(inputs) }}
3638
steps:
3739
- name: Log inputs to job summary
3840
run: |
39-
echo "<details><summary>Job Inputs</summary>" >> $GITHUB_STEP_SUMMARY
40-
echo "" >> $GITHUB_STEP_SUMMARY
41-
echo '```json' >> $GITHUB_STEP_SUMMARY
42-
echo '${{ toJson(inputs) }}' >> $GITHUB_STEP_SUMMARY
43-
echo '```' >> $GITHUB_STEP_SUMMARY
44-
echo "</details>" >> $GITHUB_STEP_SUMMARY
41+
{
42+
echo "<details><summary>Job Inputs</summary>"
43+
echo ""
44+
echo '```json'
45+
echo "${INPUTS}"
46+
echo '```'
47+
echo "</details>"
48+
} >> "$GITHUB_STEP_SUMMARY"
4549
4650
- name: Checkout repo
4751
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

.github/workflows/publish-ruby.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ on:
1717
required: false
1818
default: "latest"
1919

20-
permissions:
21-
contents: read
22-
id-token: write
20+
permissions: {}
2321

2422
jobs:
2523
setup:
2624
name: Setup
2725
runs-on: ubuntu-22.04
26+
permissions:
27+
contents: read
2828
outputs:
2929
release_version: ${{ steps.version-output.outputs.version }}
3030
tag_name: ${{ steps.version-output.outputs.tag_name }}
@@ -65,6 +65,9 @@ jobs:
6565
publish:
6666
name: Publish
6767
runs-on: ubuntu-22.04
68+
permissions:
69+
contents: read
70+
id-token: write
6871
needs: setup
6972
env:
7073
_VERSION: ${{ needs.setup.outputs.release_version }}

.github/workflows/release-dotnet.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ on:
1313
- Release
1414
- Dry Run
1515

16-
permissions:
17-
contents: write
18-
actions: read
16+
permissions: {}
1917

2018
jobs:
2119
setup:
2220
name: Setup
2321
runs-on: ubuntu-22.04
22+
permissions:
23+
contents: read
2424
outputs:
2525
version: ${{ steps.version.outputs.version }}
2626
steps:
@@ -53,6 +53,9 @@ jobs:
5353
release:
5454
name: Create GitHub release
5555
runs-on: ubuntu-22.04
56+
permissions:
57+
contents: write
58+
actions: read
5659
needs: setup
5760
steps:
5861
- name: Checkout Repository

.github/workflows/release-java.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ on:
1313
- Release
1414
- Dry Run
1515

16-
permissions:
17-
contents: write
18-
actions: read
16+
permissions: {}
1917

2018
jobs:
2119
setup:
2220
name: Setup
2321
runs-on: ubuntu-22.04
22+
permissions:
23+
contents: read
2424
outputs:
2525
version: ${{ steps.version.outputs.version }}
2626
steps:
@@ -48,6 +48,9 @@ jobs:
4848
release:
4949
name: Release
5050
runs-on: ubuntu-22.04
51+
permissions:
52+
contents: write
53+
actions: read
5154
needs: setup
5255
steps:
5356
- name: Checkout Repository

.github/workflows/release-napi.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ defaults:
1919
shell: bash
2020
working-directory: crates/bitwarden-napi
2121

22-
permissions:
23-
contents: write
24-
actions: read
22+
permissions: {}
2523

2624
jobs:
2725
setup:
2826
name: Setup
2927
runs-on: ubuntu-22.04
28+
permissions:
29+
contents: read
3030
outputs:
3131
version: ${{ steps.version.outputs.version }}
3232
steps:
@@ -57,6 +57,9 @@ jobs:
5757
release:
5858
name: Create GitHub release
5959
runs-on: ubuntu-22.04
60+
permissions:
61+
contents: write
62+
actions: read
6063
needs: setup
6164
steps:
6265
- name: Checkout Repository

.github/workflows/release-python.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ on:
1313
- Release
1414
- Dry Run
1515

16-
permissions:
17-
contents: write
18-
actions: read
16+
permissions: {}
1917

2018
jobs:
2119
setup:
2220
name: Setup
2321
runs-on: ubuntu-22.04
22+
permissions:
23+
contents: read
2424
outputs:
2525
version: ${{ steps.version.outputs.version }}
2626
steps:
@@ -48,6 +48,9 @@ jobs:
4848
release:
4949
name: Release
5050
runs-on: ubuntu-22.04
51+
permissions:
52+
contents: write
53+
actions: read
5154
needs: setup
5255
steps:
5356
- name: Checkout repo

.github/workflows/release-ruby.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ on:
1313
- Release
1414
- Dry Run
1515

16-
permissions:
17-
contents: write
18-
actions: read
16+
permissions: {}
1917

2018
jobs:
2119
setup:
2220
name: Setup
2321
runs-on: ubuntu-22.04
22+
permissions:
23+
contents: read
2424
outputs:
2525
version: ${{ steps.version.outputs.version }}
2626
steps:
@@ -48,6 +48,9 @@ jobs:
4848
release:
4949
name: Create GitHub release
5050
runs-on: ubuntu-22.04
51+
permissions:
52+
contents: write
53+
actions: read
5154
needs: setup
5255
steps:
5356
- name: Checkout Repository

.github/workflows/release-wasm.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ defaults:
1717
run:
1818
working-directory: languages/js/wasm
1919

20-
permissions:
21-
contents: write
22-
actions: read
20+
permissions: {}
2321

2422
jobs:
2523
setup:
2624
name: Setup
2725
runs-on: ubuntu-22.04
26+
permissions:
27+
contents: read
2828
outputs:
2929
release_version: ${{ steps.version.outputs.version }}
3030
steps:
@@ -55,6 +55,9 @@ jobs:
5555
release:
5656
name: Release
5757
runs-on: ubuntu-22.04
58+
permissions:
59+
contents: write
60+
actions: read
5861
needs: setup
5962
steps:
6063
- name: Checkout repo

.github/workflows/rustdoc.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@ on:
44
push:
55
branches: ["main"]
66

7-
permissions:
8-
contents: read
9-
pages: write
10-
id-token: write
7+
permissions: {}
118

129
concurrency:
1310
group: "pages"
@@ -17,6 +14,8 @@ jobs:
1714
rustdoc:
1815
name: Rustdoc
1916
runs-on: ubuntu-24.04
17+
permissions:
18+
contents: read
2019

2120
steps:
2221
- name: Checkout
@@ -44,6 +43,10 @@ jobs:
4443
name: github-pages
4544
url: ${{ steps.deployment.outputs.page_url }}
4645
runs-on: ubuntu-24.04
46+
permissions:
47+
contents: read
48+
pages: write
49+
id-token: write
4750
needs: rustdoc
4851
name: Deploy
4952
steps:

0 commit comments

Comments
 (0)