Skip to content

Commit cf56427

Browse files
ergoushaErgin Akin
andauthored
chore: fix zizmor findings in workflows (#431)
* chore: harden GitHub workflows for zizmor * fix: resolve yamllint line-length and truthy warnings in workflows * ci: add zizmor workflow to scan PRs * fix: correct zizmor action repository to zizmorcore/zizmor-action * chore: remove version comments from SHA-pinned action references --------- Co-authored-by: Ergin Akin <eakin@scubergphilis.com>
1 parent ae2f6b5 commit cf56427

11 files changed

Lines changed: 51 additions & 12 deletions

.github/dependabot.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ updates:
55
directory: /
66
schedule:
77
interval: weekly
8+
cooldown:
9+
default-days: 7
810
groups:
911
github-actions-all:
1012
patterns:
@@ -13,6 +15,8 @@ updates:
1315
directory: /
1416
schedule:
1517
interval: weekly
18+
cooldown:
19+
default-days: 7
1620
groups:
1721
gomod-all:
1822
patterns:

.github/workflows/action-sorted-inputs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,9 @@ jobs:
1111
check-action-inputs-sorted:
1212
runs-on: ubuntu-24.04
1313
steps:
14-
- uses: actions/checkout@v6.0.3
14+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
15+
with:
16+
persist-credentials: false
1517
- name: Validate input key order in action.yml
1618
run: |
1719
inputs_file="action.yml"

.github/workflows/general.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# yamllint disable rule:line-length
12
---
23
name: General
3-
"on": pull_request
4+
"on":
5+
pull_request:
46
permissions:
57
contents: read
68
packages: read
@@ -15,7 +17,9 @@ jobs:
1517
- testing-type: yamllint
1618
runs-on: ubuntu-24.04
1719
steps:
18-
- uses: actions/checkout@v6.0.3
19-
- uses: schubergphilis/mcvs-general-action@v0.5.8
20+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
21+
with:
22+
persist-credentials: false
23+
- uses: schubergphilis/mcvs-general-action@f52c4433add29d8eff9036bf37b5b69a2c4cf28b
2024
with:
2125
testing-type: ${{ matrix.args.testing-type }}

.github/workflows/golang.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ jobs:
1616
env:
1717
TASK_X_REMOTE_TASKFILES: 1
1818
steps:
19-
- uses: actions/checkout@v6.0.3
19+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
20+
with:
21+
persist-credentials: false
2022
- uses: ./
2123
with:
2224
task-install: yes

.github/workflows/gomod-go-version-updater.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# yamllint disable rule:line-length
12
---
23
name: gomod-go-version-updater-action
34
"on":
@@ -11,4 +12,4 @@ jobs:
1112
gomod-go-version-updater-action:
1213
runs-on: ubuntu-24.04
1314
steps:
14-
- uses: schubergphilis/gomod-go-version-updater-action@v0.3.5
15+
- uses: schubergphilis/gomod-go-version-updater-action@c12bc6c5e4ae85e82ee346115d1657e43121c195

.github/workflows/mcvs-pr-validation.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# yamllint disable rule:line-length
12
---
23
name: MCVS-PR-validation-action
34
"on":
@@ -15,5 +16,7 @@ jobs:
1516
MCVS-PR-validation-action:
1617
runs-on: ubuntu-24.04
1718
steps:
18-
- uses: actions/checkout@v6.0.3
19-
- uses: schubergphilis/mcvs-pr-validation-action@v0.2.2
19+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
20+
with:
21+
persist-credentials: false
22+
- uses: schubergphilis/mcvs-pr-validation-action@6f153c01301ab2f92336781173b7f3a796de5f3e

.github/workflows/package-version-updater.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ jobs:
1010
update-package-version-not-updated-by-dependabot:
1111
runs-on: ubuntu-24.04
1212
steps:
13-
- uses: actions/checkout@v6.0.3
13+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
14+
with:
15+
persist-credentials: false
1416
- env:
1517
DEPENDENCIES_LABEL: dependencies
1618
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
stale:
1212
runs-on: ubuntu-24.04
1313
steps:
14-
- uses: actions/stale@v10.3.0
14+
- uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899
1515
with:
1616
days-before-stale: 63
1717
days-before-close: 21

.github/workflows/taskfile-sorted-units.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ jobs:
99
taskfile-sorted-units:
1010
runs-on: ubuntu-24.04
1111
steps:
12-
- uses: actions/checkout@v6.0.3
12+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
13+
with:
14+
persist-credentials: false
1315
- run: |
1416
check_sorted() {
1517
local task_name="$1"

.github/workflows/taskfile-without-empty-lines.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ jobs:
88
taskfile-without-empty-lines:
99
runs-on: ubuntu-24.04
1010
steps:
11-
- uses: actions/checkout@v6.0.3
11+
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
12+
with:
13+
persist-credentials: false
1214
- run: |
1315
yaml_file="./build/task.yml"
1416
empty_lines=$(grep -n -e '^$' "$yaml_file")

0 commit comments

Comments
 (0)