Skip to content

Commit 2beafe5

Browse files
committed
chore(actions): address zizmor findings
This PR is an auto-generated attempt to address zizmor findings. It may not catch everything, and should be reviewed by repository owners. If it is unhelpful, feel free to close the PR and address separately. This PR was generated by running `zizmor --fix=all --gh-token=$(gh auth token) ./.github/workflows`. See go/github-zizmor-help for instructions to install and run. If this PR is helpful, feel free to approve and merge, or edit/modify as needed to get it to the right state. Repository owners must ultimately ensure compliance by 2026-07-13. The purpose of this PR is to provide some assistance with achieving that as a first pass. This will become a blocking check for new changes to github workflows on 2026-07-13 within the `googleapis` org. There may be some ignored findings (with the comment `# zizmor: ignore[...]`), which you may fix if feasible.
1 parent 284f348 commit 2beafe5

16 files changed

Lines changed: 118 additions & 54 deletions

.github/workflows/conformance-tests-bigtable-proxy.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
# limitations under the License.
1414
# Github action job to test core java library features on
1515
# downstream client libraries before they are released.
16+
permissions:
17+
contents: read
18+
1619
on:
1720
push:
1821
branches:
@@ -31,22 +34,25 @@ jobs:
3134
runs-on: ubuntu-latest
3235
steps:
3336
- name: Checkout code
34-
uses: actions/checkout@v7
37+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
38+
with:
39+
persist-credentials: false
3540

3641
- name: Setup PHP
37-
uses: shivammathur/setup-php@v2
42+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
3843
with:
3944
php-version: '8.1'
4045
extensions: grpc
4146

4247
- name: Checkout Bigtable conformance tests
43-
uses: actions/checkout@v7
48+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
4449
with:
4550
repository: googleapis/cloud-bigtable-clients-test
4651
ref: v0.0.3
4752
path: cloud-bigtable-clients-test
53+
persist-credentials: false
4854

49-
- uses: actions/setup-go@v6
55+
- uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6
5056
with:
5157
go-version: '>=1.20.2'
5258

.github/workflows/conformance-tests-gax-showcase.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ jobs:
1616
name: GAPIC Showcase Conformance Tests
1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v7
19+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
20+
with:
21+
persist-credentials: false
2022

2123
- name: Setup PHP
22-
uses: shivammathur/setup-php@v2
24+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2325
with:
2426
php-version: '8.1'
2527
extensions: grpc

.github/workflows/conformance-tests-storage-emulator.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
permissions:
2+
contents: read
3+
14
on:
25
push:
36
branches:
@@ -22,10 +25,12 @@ jobs:
2225

2326
steps:
2427
- name: Checkout code
25-
uses: actions/checkout@v7
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
29+
with:
30+
persist-credentials: false
2631

2732
- name: Setup PHP
28-
uses: shivammathur/setup-php@v2
33+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2934
with:
3035
php-version: '8.1'
3136

.github/workflows/docs.yaml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
permissions:
2+
contents: read
3+
14
name: DocFX Test Suite
25
on:
36
push:
@@ -12,9 +15,11 @@ jobs:
1215
env:
1316
PHPDOC_ENV: prod
1417
steps:
15-
- uses: actions/checkout@v7
18+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
19+
with:
20+
persist-credentials: false
1621
- name: Setup Python
17-
uses: actions/setup-python@v6
22+
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6
1823
with:
1924
python-version: '3.14'
2025
- run: pip install --no-deps --require-hashes -r .kokoro/docs/docker/requirements.txt
@@ -24,14 +29,16 @@ jobs:
2429
php-version: "8.2"
2530
- name: Extract phpDocumentor
2631
id: extract
27-
uses: shrink/actions-docker-extract@v4
32+
uses: shrink/actions-docker-extract@f1ef61065b78731fe3310b4e84e511f6a927a77e # v4
2833
with:
2934
image: "phpdoc/phpdoc:3.5.3"
3035
path: "/opt/phpdoc/."
3136
- name: Symlink phpDocumentor
32-
run: ln -s $(pwd)/${{ steps.extract.outputs.destination }}/bin/phpdoc /usr/local/bin/phpdoc
37+
run: ln -s $(pwd)/${STEPS_EXTRACT_OUTPUTS_DESTINATION}/bin/phpdoc /usr/local/bin/phpdoc
38+
env:
39+
STEPS_EXTRACT_OUTPUTS_DESTINATION: ${{ steps.extract.outputs.destination }}
3340
- name: Install Dependencies
34-
uses: nick-invision/retry@v4
41+
uses: nick-invision/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4
3542
with:
3643
timeout_minutes: 10
3744
max_attempts: 3

.github/workflows/emulator-system-tests-bigtable.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919
name: Bigtable
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
23+
with:
24+
persist-credentials: false
2325

2426
- run: ./.github/emulator/start-emulator.sh bigtable 522.0.0-emulators
2527

2628
- name: Setup PHP
27-
uses: shivammathur/setup-php@v2
29+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2830
with:
2931
php-version: '8.1'
3032
tools: pecl

.github/workflows/emulator-system-tests-datastore.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919
name: Datastore
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
23+
with:
24+
persist-credentials: false
2325

2426
- run: ./.github/emulator/start-emulator.sh datastore 522.0.0-emulators
2527

2628
- name: Setup PHP
27-
uses: shivammathur/setup-php@v2
29+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2830
with:
2931
php-version: '8.1'
3032
tools: pecl

.github/workflows/emulator-system-tests-firestore.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919
name: Firestore
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
23+
with:
24+
persist-credentials: false
2325

2426
- run: ./.github/emulator/start-emulator.sh firestore 522.0.0-emulators
2527

2628
- name: Setup PHP
27-
uses: shivammathur/setup-php@v2
29+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2830
with:
2931
php-version: '8.1'
3032
tools: pecl

.github/workflows/emulator-system-tests-pubsub.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ jobs:
1919
name: PubSub
2020
runs-on: ubuntu-latest
2121
steps:
22-
- uses: actions/checkout@v7
22+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
23+
with:
24+
persist-credentials: false
2325

2426
- run: ./.github/emulator/start-emulator.sh pubsub
2527

2628
- name: Setup PHP
27-
uses: shivammathur/setup-php@v2
29+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
2830
with:
2931
php-version: '8.1'
3032
tools: pecl

.github/workflows/emulator-system-tests-spanner.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ jobs:
2525

2626
steps:
2727
- name: Checkout code
28-
uses: actions/checkout@v7
28+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
29+
with:
30+
persist-credentials: false
2931

3032
- name: Create Spanner instance
31-
uses: google-github-actions/setup-gcloud@v3
33+
uses: google-github-actions/setup-gcloud@aa5489c8933f4cc7a4f7d45035b3b1440c9c10db # v3
3234
with:
3335
version: '516.0.0'
3436
- run: gcloud info
@@ -39,7 +41,7 @@ jobs:
3941
- run: gcloud spanner instances create google-cloud-php-system-tests --config=emulator-config --description="Test Instance" --nodes=1
4042

4143
- name: Setup PHP
42-
uses: shivammathur/setup-php@v2
44+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
4345
with:
4446
php-version: '8.4'
4547
ini-values: grpc.enable_fork_support=1

.github/workflows/lint.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
name: PHP Style Check
1414
steps:
15-
- uses: actions/checkout@v7
15+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
16+
with:
17+
persist-credentials: false
1618
- name: Setup PHP
17-
uses: shivammathur/setup-php@v2
19+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
1820
with:
1921
php-version: '8.1'
2022
- name: Install Dependencies
@@ -52,9 +54,11 @@ jobs:
5254
runs-on: ubuntu-latest
5355
name: PHPStan Static Analysis
5456
steps:
55-
- uses: actions/checkout@v7
57+
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
58+
with:
59+
persist-credentials: false
5660
- name: Install PHP
57-
uses: shivammathur/setup-php@v2
61+
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # v2
5862
with:
5963
php-version: '8.2'
6064
- name: "Install dependencies"

0 commit comments

Comments
 (0)