Skip to content

Commit 5166628

Browse files
authored
chore(actions): address zizmor findings (#27209)
This PR is an AI assisted attempt to address zizmor findings. It may not catch everything, and should be reviewed by repository owners. If it is unhelpful, feel free to close the PR and address separately. If it is helpful, feel free to approve and merge, or edit/modify as needed to get it to the right state. Repository owners must ultimately ensure compliance by 2026-07-13. The purpose of this PR is to provide some assistance with achieving that as a first pass. This will become a blocking check for new changes to github workflows on 2026-07-13.
1 parent 579039f commit 5166628

5 files changed

Lines changed: 37 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: CI
2+
3+
permissions:
4+
contents: read
25
on:
36
pull_request:
47
branches:
@@ -36,9 +39,11 @@ jobs:
3639
runs-on: ${{ matrix.os }}
3740
steps:
3841
- name: Checkout repo
39-
uses: actions/checkout@v2
42+
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
43+
with:
44+
persist-credentials: false
4045
- name: Install Ruby ${{ matrix.ruby }}
41-
uses: ruby/setup-ruby@v1
46+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
4247
with:
4348
ruby-version: "${{ matrix.ruby }}"
4449
- name: Install tools
@@ -49,11 +54,13 @@ jobs:
4954
# See https://github.com/actions/runner-images/issues/10215
5055
# and https://github.com/rubygems/rubygems/issues/7983.
5156
shell: bash
57+
# zizmor: ignore[template-injection]
5258
run: |
5359
if [ -d /opt/hostedtoolcache/Ruby ]; then
5460
chmod -R o-w /opt/hostedtoolcache/Ruby
5561
fi
5662
- name: Test ${{ matrix.task }} ${{ matrix.rubyopt }}
63+
# zizmor: ignore[template-injection]
5764
run: |
5865
toys ci -v --only ${{ matrix.task }} --github-event-name=${{ github.event_name }} --github-event-payload=${{ github.event_path }}
5966
env:

.github/workflows/generate-updates.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Generate-Updates
2+
3+
permissions:
4+
contents: read
25
on:
36
workflow_dispatch:
47
inputs:
@@ -14,9 +17,11 @@ jobs:
1417
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
1518
steps:
1619
- name: Checkout repo
17-
uses: actions/checkout@v4
20+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
21+
with:
22+
persist-credentials: false
1823
- name: Install Ruby 4.0
19-
uses: ruby/setup-ruby@v1
24+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
2025
with:
2126
ruby-version: "4.0"
2227
- name: Install tools

.github/workflows/release-freeze.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Freeze releases
2+
3+
permissions:
4+
contents: read
25
on:
36
workflow_dispatch:
47

@@ -10,9 +13,11 @@ jobs:
1013
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
1114
steps:
1215
- name: Checkout repo
13-
uses: actions/checkout@v4
16+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
17+
with:
18+
persist-credentials: false
1419
- name: Install Ruby 4.0
15-
uses: ruby/setup-ruby@v1
20+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
1621
with:
1722
ruby-version: "4.0"
1823
- name: Install tools

.github/workflows/release-unfreeze.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Unfreeze releases
2+
3+
permissions:
4+
contents: read
25
on:
36
workflow_dispatch:
47

@@ -10,9 +13,11 @@ jobs:
1013
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
1114
steps:
1215
- name: Checkout repo
13-
uses: actions/checkout@v4
16+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
17+
with:
18+
persist-credentials: false
1419
- name: Install Ruby 4.0
15-
uses: ruby/setup-ruby@v1
20+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
1621
with:
1722
ruby-version: "4.0"
1823
- name: Install tools

.github/workflows/weekly-generate-updates.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
name: Weekly-Generate-Updates
2+
3+
permissions:
4+
contents: read
25
on:
36
schedule:
47
- cron: '02 9 * * 0'
@@ -11,9 +14,11 @@ jobs:
1114
GITHUB_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
1215
steps:
1316
- name: Checkout repo
14-
uses: actions/checkout@v4
17+
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
18+
with:
19+
persist-credentials: false
1520
- name: Install Ruby 4.0
16-
uses: ruby/setup-ruby@v1
21+
uses: ruby/setup-ruby@9eb537ca036ebaed86729dcb9309076e4c5c3b74 # v1
1722
with:
1823
ruby-version: "4.0"
1924
- name: Install tools

0 commit comments

Comments
 (0)