Skip to content

Commit bdce8ce

Browse files
committed
ci: Fix zizmor findings in .github/workflows/
In preparation for adding it to the pre-commit configuration.
1 parent c55ee7f commit bdce8ce

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

.github/workflows/ci.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@ on:
66
branches:
77
- main
88

9+
permissions: {}
10+
911
jobs:
1012
pre-commit:
1113
runs-on: ubuntu-latest
1214
steps:
1315
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1416
with: # for gitlint
17+
persist-credentials: false
1518
ref: ${{ github.event.pull_request.head.sha }}
1619
fetch-depth: 0
1720
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
@@ -53,6 +56,8 @@ jobs:
5356
fail-fast: false
5457
steps:
5558
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
59+
with:
60+
persist-credentials: false
5661
- uses: googleapis/release-please-action@5792afc6b46e9bb55deda9eda973a18c226bc3fc # v4.1.5
5762
with:
5863
config-file: .github/release-please-config.json
@@ -87,10 +92,13 @@ jobs:
8792
sha256sums.txt
8893
if: matrix.dist == 'alpine'
8994
- name: Upload release assets
95+
permissions:
96+
contents: write
9097
run: |
9198
set -x
92-
gh release upload ${{steps.release.outputs.tag_name}} \
99+
gh release upload ${RELEASE_PLEASE_TAG_NAME} \
93100
bash-completion-$(cat version.txt).tar.xz sha256sums.txt
94101
env:
95102
GH_TOKEN: ${{github.token}}
103+
RELEASE_PLEASE_TAG_NAME: ${{steps.release.outputs.tag_name}}
96104
if: steps.release.outputs.release_created

.github/workflows/update-docker-images.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ on:
1515
- test/docker/*/install-packages.sh
1616
workflow_dispatch:
1717

18+
permissions: {}
19+
1820
jobs:
1921
update-test-image:
2022
runs-on: ubuntu-latest
@@ -29,7 +31,11 @@ jobs:
2931
- dist: ubuntu14
3032
steps:
3133
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+
with:
35+
persist-credentials: false
3236
- uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
37+
permissions:
38+
packages: write # Get token that can write to ghcr.io
3339
with:
3440
registry: ghcr.io
3541
username: ${{github.repository_owner}}

0 commit comments

Comments
 (0)