Skip to content

Commit 12f1521

Browse files
ci(gh-actions): resolve zizmor findings (#3449)
Fix template-injection and artipacked findings, suppress the intentional dependabot-cooldown warnings. - docker.yaml: move workflow_dispatch inputs into env: so they are no longer expanded into the run: shell (template-injection). - add persist-credentials: false to checkout in the seven workflows that never push to git (artipacked); release.yml keeps credentials. - add .github/zizmor.yml to suppress dependabot-cooldown for the intentional no-cooldown daily update cadence.
1 parent 5286b24 commit 12f1521

8 files changed

Lines changed: 34 additions & 3 deletions

File tree

.github/workflows/codeql-analysis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ jobs:
5252

5353
- name: Checkout repository
5454
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
55+
with:
56+
persist-credentials: false
5557

5658
# Initializes the CodeQL tools for scanning.
5759
- name: Initialize CodeQL

.github/workflows/cypress.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
egress-policy: audit
3434

3535
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
36+
with:
37+
persist-credentials: false
3638
- name: Use Node.js ${{ matrix.node-version }}
3739
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
3840
with:

.github/workflows/dependency-review.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,7 @@ jobs:
2323

2424
- name: 'Checkout Repository'
2525
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
26+
with:
27+
persist-credentials: false
2628
- name: 'Dependency Review'
2729
uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0

.github/workflows/docker.yaml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,22 @@ jobs:
2525
egress-policy: audit
2626

2727
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
28+
with:
29+
persist-credentials: false
2830
- name: Build the Docker image
29-
run: docker buildx build --platform linux/amd64,linux/arm64 . --file Dockerfile --tag ${{ github.event.inputs.docker_registry }}/${{ github.event.inputs.docker_tag_name }}
31+
env:
32+
DOCKER_REGISTRY: ${{ github.event.inputs.docker_registry }}
33+
DOCKER_TAG_NAME: ${{ github.event.inputs.docker_tag_name }}
34+
run: docker buildx build --platform linux/amd64,linux/arm64 . --file Dockerfile --tag "$DOCKER_REGISTRY/$DOCKER_TAG_NAME"
3035
- name: Docker Login
3136
uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
3237
with:
3338
registry: ${{ github.event.inputs.docker_registry }}
3439
username: ${{ secrets.DOCKER_USERNAME }}
3540
password: ${{ secrets.DOCKER_PASSWORD }}
3641
logout: true
37-
- name: Push the Docker image to ${{ github.event.inputs.docker_registry }}
38-
run: docker push ${{ github.event.inputs.docker_registry }}/${{ github.event.inputs.docker_tag_name }}
42+
- name: Push the Docker image
43+
env:
44+
DOCKER_REGISTRY: ${{ github.event.inputs.docker_registry }}
45+
DOCKER_TAG_NAME: ${{ github.event.inputs.docker_tag_name }}
46+
run: docker push "$DOCKER_REGISTRY/$DOCKER_TAG_NAME"

.github/workflows/nodejs.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ jobs:
2727
egress-policy: audit
2828

2929
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
30+
with:
31+
persist-credentials: false
3032
- name: Use Node.js ${{ matrix.node-version }}
3133
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
3234
with:

.github/workflows/semantic.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2121
with:
2222
fetch-depth: 0
23+
persist-credentials: false
2324
- uses: wagoid/commitlint-github-action@b948419dd99f3fd78a6548d48f94e3df7f6bf3ed # v6.2.1
2425
with:
2526
configFile: .github/commitlint.config.cjs

.github/workflows/trivy-scan.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
egress-policy: audit
2121

2222
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
23+
with:
24+
persist-credentials: false
2325
- name: Build the Docker image
2426

2527
run: docker build . --file Dockerfile --tag vprodemo.azurecr.io/webui:${{ github.sha }} --tag vprodemo.azurecr.io/webui:latest

.github/zizmor.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# SPDX-FileCopyrightText: (C) 2026 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
---
4+
# Zizmor configuration. See https://docs.zizmor.sh/configuration/
5+
rules:
6+
# Daily updates with no cooldown are intentional here. A version compromised
7+
# at publish time can reach CI before it is yanked, but the blast radius is
8+
# small: the PR workflows reference no secrets, and Dependabot PRs get a
9+
# read-only GITHUB_TOKEN.
10+
dependabot-cooldown:
11+
ignore:
12+
- dependabot.yml

0 commit comments

Comments
 (0)