Skip to content

Commit 3cd3ef4

Browse files
Fix: resolve zizmor auditor persona findings
Resolve the zizmor auditor-persona findings that fail the organisation's required zizmor gate and block Dependabot pull requests from merging. - Boilerplate workflows (tag-push, release-drafter, clear-action-cache, openssf-scorecard) are replaced with the canonical versions from actions-template where they carried findings. - Repository-specific workflows (for example testing.yaml) are adjusted in place to add a workflow-level concurrency group (concurrency-limits) and persist-credentials: false on checkout steps (artipacked), matching the actions-template canonical patterns. Verified with zizmor --persona auditor --min-severity low (clean) with no action pin downgrades. Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org>
1 parent 3266e33 commit 3cd3ef4

3 files changed

Lines changed: 59 additions & 13 deletions

File tree

.github/workflows/release-drafter.yaml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,26 @@ jobs:
2020
update_release_draft:
2121
name: 'Update Release Draft'
2222
permissions:
23-
# write permission is required to create releases
24-
contents: write
23+
contents: write # Create and update draft releases
2524
runs-on: 'ubuntu-latest'
2625
timeout-minutes: 3
2726
steps:
28-
# Harden the runner used by this workflow
27+
# Load the egress allow-list out-of-band from the
28+
# organisation's .github repository and publish it as
29+
# $CONNECTION_ALLOW_LIST for the harden-runner step below.
2930
# yamllint disable-line rule:line-length
30-
- uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
31+
- uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1
3132
with:
32-
egress-policy: 'audit'
33+
config: '@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1
34+
35+
# Harden the runner with the just-loaded allow-list.
36+
- name: 'Harden runner (block)'
37+
# yamllint disable-line rule:line-length
38+
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
39+
with:
40+
egress-policy: 'block'
41+
allowed-endpoints: >
42+
${{ env.CONNECTION_ALLOW_LIST }}
3343
3444
# yamllint disable-line rule:line-length
35-
- uses: release-drafter/release-drafter@ed4bc48ec97379be2258e7b7ac2624a3e26ab809 # v7.4.0
45+
- uses: release-drafter/release-drafter@4d75298e00d9e34c483e5ff8c68d0ea1c1940c1e # v7.5.1

.github/workflows/tag-push.yaml

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@ on:
1313

1414
permissions: {}
1515

16+
# Serialise repeated runs for the same tag; never cancel an in-flight
17+
# release promotion. Distinct tags use distinct groups and proceed
18+
# independently.
19+
concurrency:
20+
group: '${{ github.workflow }}-${{ github.ref }}'
21+
cancel-in-progress: false
22+
1623
jobs:
1724
validate_tag:
1825
name: 'Validate Tag'
@@ -25,11 +32,22 @@ jobs:
2532
outputs:
2633
tag: "${{ steps.tag_validate.outputs.tag_name }}"
2734
steps:
28-
# Harden the runner used by this workflow
35+
# Load the egress allow-list out-of-band from the
36+
# organisation's .github repository and publish it as
37+
# $CONNECTION_ALLOW_LIST for the harden-runner step below.
2938
# yamllint disable-line rule:line-length
30-
- uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
39+
- uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1
40+
with:
41+
config: '@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1
42+
43+
# Harden the runner with the just-loaded allow-list.
44+
- name: 'Harden runner (block)'
45+
# yamllint disable-line rule:line-length
46+
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
3147
with:
32-
egress-policy: audit
48+
egress-policy: 'block'
49+
allowed-endpoints: >
50+
${{ env.CONNECTION_ALLOW_LIST }}
3351
3452
# yamllint disable-line rule:line-length
3553
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
@@ -53,14 +71,25 @@ jobs:
5371
needs: validate_tag
5472
runs-on: 'ubuntu-latest'
5573
permissions:
56-
contents: write
74+
contents: write # Promote (publish) the draft release for the tag
5775
timeout-minutes: 5
5876
steps:
59-
# Harden the runner used by this workflow
77+
# Load the egress allow-list out-of-band from the
78+
# organisation's .github repository and publish it as
79+
# $CONNECTION_ALLOW_LIST for the harden-runner step below.
6080
# yamllint disable-line rule:line-length
61-
- uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
81+
- uses: lfreleng-actions/harden-runner-block-action@6db537b3e6d060c3287c5a3ce2c28b55b0af330d # v0.2.1
82+
with:
83+
config: '@18d9c4446bea555d0783e850f6d295f844fe8f67' # v0.1.1
84+
85+
# Harden the runner with the just-loaded allow-list.
86+
- name: 'Harden runner (block)'
87+
# yamllint disable-line rule:line-length
88+
uses: step-security/harden-runner@9af89fc71515a100421586dfdb3dc9c984fbf411 # v2.19.4
6289
with:
63-
egress-policy: audit
90+
egress-policy: 'block'
91+
allowed-endpoints: >
92+
${{ env.CONNECTION_ALLOW_LIST }}
6493
6594
# yamllint disable-line rule:line-length
6695
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

.github/workflows/testing.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ on:
1313
pull_request:
1414
branches: ["main"]
1515

16+
concurrency:
17+
group: "${{ github.workflow }}-${{ github.ref }}"
18+
cancel-in-progress: true
19+
1620
permissions: {}
1721

1822
jobs:
@@ -26,11 +30,14 @@ jobs:
2630
steps:
2731
- name: "Checkout repository"
2832
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
33+
with:
34+
persist-credentials: false
2935

3036
# Perform setup prior to running test(s)
3137
- name: "Checkout sample project repository"
3238
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3339
with:
40+
persist-credentials: false
3441
repository: "lfreleng-actions/test-python-project"
3542
path: "test-python-project"
3643

0 commit comments

Comments
 (0)