Skip to content

Commit bebaa47

Browse files
committed
ci: fix more zizmor findings
1 parent 61945f8 commit bebaa47

11 files changed

+22
-22
lines changed

.github/workflows/image-cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
delete-images:
1313
runs-on: ubuntu-latest
1414
permissions:
15-
packages: write # `packages: write` is needed to delete untagged and orphaned images (dataaxiom/ghcr-cleanup-action)
15+
packages: write # is needed by dataaxiom/ghcr-cleanup-action to delete untagged and orphaned images
1616
steps:
1717
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
1818
with:

.github/workflows/issue-cleanup.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ jobs:
1111
close-issues:
1212
runs-on: ubuntu-latest
1313
permissions:
14-
issues: write # `issues: write` is needed to close/comment on issues (actions/stale)
15-
pull-requests: write # `pull-requests: write` is needed to close/comment on PRs (actions/stale)
14+
issues: write # is needed by actions/stale to close/comment on issues
15+
pull-requests: write # is needed by actions/stale to close/comment on PRs
1616
steps:
1717
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
1818
with:

.github/workflows/issue-creation-tool-versions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
name: Create tool version evaluation issue
1414
runs-on: ubuntu-latest
1515
permissions:
16-
issues: write # `issues: write` is needed to create/close/pin/unpin issues (gh cli)
16+
issues: write # is by gh cli needed to create/close/pin/unpin issues
1717
steps:
1818
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
1919
with:

.github/workflows/linting-formatting.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ jobs:
2222
permissions:
2323
contents: read
2424
actions: read
25-
pull-requests: write
26-
security-events: write
25+
pull-requests: write # is needed by oxsecurity/megalinter and reviewdog/action-suggester to post PR comments
26+
security-events: write # is needed by oxsecurity/megalinter for uploading sarif files
2727
steps:
2828
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2929
with:

.github/workflows/ossf-scorecard.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,15 @@ on:
99
push:
1010
branches: [main]
1111

12-
permissions: read-all
12+
permissions: {}
1313

1414
jobs:
1515
ossf-scorecard:
1616
runs-on: ubuntu-latest
1717
permissions:
18-
security-events: write
19-
id-token: write
18+
contents: read
19+
security-events: write # is needed by github/codeql-action/upload-sarif to upload sarif files
20+
id-token: write # is needed by ossf/scorecard-action to authenticate with OIDC
2021
steps:
2122
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2223
with:

.github/workflows/pr-conventional-title.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ jobs:
1414
validate-pr-title:
1515
runs-on: ubuntu-latest
1616
permissions:
17-
# We need `pull-requests: write` to be able to post comments on PRs
18-
pull-requests: write
17+
pull-requests: write # is needed by marocchino/sticky-pull-request-comment to post comments on PRs
1918
steps:
2019
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2120
with:

.github/workflows/pr-image-cleanup.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
delete-images:
1212
runs-on: ubuntu-latest
1313
permissions:
14-
packages: write
14+
packages: write # is needed by dataaxiom/ghcr-cleanup-action to delete images
1515
steps:
1616
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
1717
with:
@@ -24,8 +24,7 @@ jobs:
2424
cleanup-cache:
2525
runs-on: ubuntu-latest
2626
permissions:
27-
# actions: write permission is required to delete the cache
28-
actions: write
27+
actions: write # is needed to delete workflow run caches
2928
steps:
3029
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
3130
with:

.github/workflows/pr-report.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
add-pr-report:
1212
permissions:
1313
contents: read
14-
checks: read
15-
pull-requests: write
16-
repository-projects: read
17-
actions: read
14+
checks: read # is needed by philips-software/pull-request-report-action to fetch check run information
15+
pull-requests: write # is needed by philips-software/pull-request-report-action to post the report as a comment on the PR
16+
repository-projects: read # is needed by philips-software/pull-request-report-action to fetch project information
17+
actions: read # is needed by philips-software/pull-request-report-action to fetch workflow run information
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1

.github/workflows/release-please.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@ on:
99
concurrency:
1010
group: ${{ github.ref }}-${{ github.workflow }}
1111

12-
permissions:
13-
contents: read
12+
permissions: {}
1413

1514
jobs:
1615
create-release:
1716
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
1819
steps:
1920
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
2021
with:

.github/workflows/release-published.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: Comment on released PRs
1313
runs-on: ubuntu-latest
1414
permissions:
15-
pull-requests: write
15+
pull-requests: write # is needed by rdlf0/comment-released-prs-action to post comments on PRs
1616
steps:
1717
- uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1
1818
with:

0 commit comments

Comments
 (0)