Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

Commit 91bfe5b

Browse files
Fix GITHUB_ACTIONS_ZIZMOR issues
1 parent 26be350 commit 91bfe5b

5 files changed

Lines changed: 68 additions & 5 deletions

File tree

.github/workflows/linter.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ jobs:
1414
get-sloc:
1515
name: Count Lines of Code
1616
runs-on: ubuntu-latest
17+
permissions:
18+
contents: read
1719
steps:
1820
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
21+
with:
22+
persist-credentials: false
1923
- name: Setup Go
2024
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # 6.1.0
2125
with:
@@ -26,14 +30,22 @@ jobs:
2630
run: scc --format wide
2731
check-broken-links:
2832
runs-on: ubuntu-latest
33+
permissions:
34+
contents: read
2935
steps:
3036
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
37+
with:
38+
persist-credentials: false
3139
- name: Check broken links
3240
uses: gaurav-nelson/github-action-markdown-link-check@4a1af151f4d7cf4d8f8ac5780597672a3671b88b # 1.0.17
3341
check-super-linter:
3442
runs-on: ubuntu-latest
43+
permissions:
44+
contents: read
3545
steps:
3646
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
47+
with:
48+
persist-credentials: false
3749
- name: Run super-linter validation
3850
uses: github/super-linter@b807e99ddd37e444d189cfd2c2ca1274d8ae8ef1 # 7
3951
env:
@@ -42,8 +54,12 @@ jobs:
4254
VALIDATE_SHELL_SHFMT: false
4355
check-tox:
4456
runs-on: ubuntu-latest
57+
permissions:
58+
contents: read
4559
steps:
4660
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
61+
with:
62+
persist-credentials: true
4763
- name: Install tox
4864
run: pip install tox
4965
- name: Run tox lint validation

.github/workflows/on-demand_ci.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,12 @@ jobs:
1818
check-format:
1919
name: Check scripts format
2020
runs-on: ubuntu-latest
21+
permissions:
22+
contents: read
2123
steps:
2224
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
25+
with:
26+
persist-credentials: false
2327
- name: Run the sh-checker
2428
uses: luizm/action-sh-checker@17bd25a6ee188d2b91f677060038f4ba37ba14b2 # 0.9.0
2529
env:
@@ -30,19 +34,26 @@ jobs:
3034
sh_checker_exclude: "spec/setup_spec.sh"
3135
check-ci-baremetal-jammy:
3236
runs-on: ubuntu-22.04
37+
permissions:
38+
contents: read
3339
steps:
3440
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
41+
with:
42+
persist-credentials: false
3543
- name: Setup a Supported python version # NOTE: https://docs.openstack.org/tempest/latest/supported_version.html
3644
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # 6.0.0
3745
id: python3-setup
3846
with:
3947
python-version: "3.11" # NOTE: distutils deprecated on Python 3.12+ (https://peps.python.org/pep-0632/)
4048
- name: Create symlink
49+
env:
50+
PY_VERSION: ${{ steps.python3-setup.outputs.python-version }}
51+
PY_PATH: ${{ steps.python3-setup.outputs.python-path }}
4152
run: |
42-
version=${{ steps.python3-setup.outputs.python-version }}
53+
version="$PY_VERSION"
4354
path="/usr/bin/python${version%\.*}"
4455
sudo rm -f "$path"
45-
sudo ln -s ${{ steps.python3-setup.outputs.python-path }} "$path"
56+
sudo ln -s "$PY_PATH" "$path"
4657
- name: Uninstall postgresql package # NOTE: This has a conflict with Azure packages (https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#postgresql)
4758
run: sudo apt-get --purge -y remove postgresql*
4859
- name: Deploy services
@@ -51,8 +62,12 @@ jobs:
5162
run: ./setup.sh
5263
check-e2e-rocky:
5364
runs-on: vm-self-hosted
65+
permissions:
66+
contents: read
5467
steps:
5568
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
69+
with:
70+
persist-credentials: false
5671
- uses: ./.github/actions/vagrant-setup
5772
- name: Deploy services
5873
env:
@@ -72,8 +87,12 @@ jobs:
7287
check-bash-shellspec:
7388
name: Run BDD shell specs
7489
runs-on: ubuntu-latest
90+
permissions:
91+
contents: read
7592
steps:
7693
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
94+
with:
95+
persist-credentials: false
7796
- name: Install ShellSpec
7897
run: curl -fsSL https://github.com/shellspec/shellspec/releases/latest/download/shellspec-dist.tar.gz | tar -xz -C ..
7998
- name: Run Shellspec

.github/workflows/scheduled_distros.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@ on:
1515
jobs:
1616
generate-json-matrix:
1717
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
1820
steps:
1921
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
22+
with:
23+
persist-credentials: false
2024
- name: Get matrix values
2125
id: set-matrix
2226
run: |
@@ -38,13 +42,17 @@ jobs:
3842
check-all-distros:
3943
name: Check all Linux Distributions supported in an All-in-One setup
4044
runs-on: vm-self-hosted
45+
permissions:
46+
contents: read
4147
needs: generate-json-matrix
4248
strategy:
4349
fail-fast: false
4450
matrix:
4551
include: ${{ fromJson(needs.generate-json-matrix.outputs.matrix) }}
4652
steps:
4753
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
54+
with:
55+
persist-credentials: false
4856
- uses: ./.github/actions/vagrant-setup
4957
- name: Deploy Devstack instance
5058
env:

.github/workflows/spell.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,23 @@ jobs:
2121
check-reviewdog:
2222
name: Check spelling (reviewdog)
2323
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read
2426
steps:
2527
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
28+
with:
29+
persist-credentials: false
2630
- uses: reviewdog/action-misspell@e7ea17f144822818706c7e579de7927d59384575 # 1.27.0
2731
with:
2832
github_token: ${{ secrets.github_token }}
2933
check-spellcheck:
3034
name: Check spelling (pyspelling)
3135
runs-on: ubuntu-latest
36+
permissions:
37+
contents: read
3238
steps:
3339
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
40+
with:
41+
persist-credentials: false
3442
- uses: igsekor/pyspelling-any@44278deea34ea69d8f0d5179ac409c140b0a2f5a # 1.0.5
3543
name: Spellcheck

.github/workflows/update.yml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,17 @@ on:
1212
schedule:
1313
- cron: "0 0 * * *"
1414
workflow_dispatch:
15-
permissions:
16-
contents: write # for technote-space/create-pr-action to push code
17-
pull-requests: write # for technote-space/create-pr-action to create a PR
15+
permissions: read-all
1816
jobs:
1917
check-versions:
18+
permissions:
19+
contents: write # for technote-space/create-pr-action to push code
20+
pull-requests: write # for technote-space/create-pr-action to create a PR
2021
runs-on: vm-self-hosted
2122
steps:
2223
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
24+
with:
25+
persist-credentials: true
2326
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # 6.0.0
2427
with:
2528
python-version: "^3.10"
@@ -33,8 +36,13 @@ jobs:
3336
PR_TITLE: "chore: update versions"
3437
check-dictionary:
3538
runs-on: ubuntu-latest
39+
permissions:
40+
contents: write # for technote-space/create-pr-action to push code
41+
pull-requests: write # for technote-space/create-pr-action to create a PR
3642
steps:
3743
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
44+
with:
45+
persist-credentials: true
3846
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # 2.1.4
3947
with:
4048
EXECUTE_COMMANDS: |
@@ -56,9 +64,13 @@ jobs:
5664
PR_TITLE: "chore: update dictionary"
5765
check-github-actions:
5866
runs-on: ubuntu-latest
67+
permissions:
68+
contents: write # for technote-space/create-pr-action to push code
69+
pull-requests: write # for technote-space/create-pr-action to create a PR
5970
steps:
6071
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # 6.0.0
6172
with:
73+
persist-credentials: true
6274
# Fine-grained PAT with contents:write and workflows:write scopes
6375
token: ${{ secrets.WORKFLOW_TOKEN }}
6476
- uses: technote-space/create-pr-action@91114507cf92349bec0a9a501c2edf1635427bc5 # 2.1.4

0 commit comments

Comments
 (0)