Skip to content

ci: add zizmor workflow #13531

Draft
thaJeztah wants to merge 6 commits into
containerd:mainfrom
thaJeztah:add_zizmor
Draft

ci: add zizmor workflow #13531
thaJeztah wants to merge 6 commits into
containerd:mainfrom
thaJeztah:add_zizmor

Conversation

@thaJeztah

@thaJeztah thaJeztah commented Jun 4, 2026

Copy link
Copy Markdown
Member

Add a workflow to lint GitHub workflows for common mistakes / security issues.

Similar to docker/buildx#3742

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a dedicated GitHub Actions workflow to run zizmor against this repository’s workflows, and updates existing workflows to align with zizmor/secure-workflow recommendations (e.g., reducing credential persistence and avoiding direct expression interpolation in shell).

Changes:

  • Add a new zizmor workflow (reusable workflow invocation) to lint GitHub workflows for common mistakes/security issues.
  • Harden multiple workflows by setting actions/checkout to persist-credentials: false.
  • Adjust a few shell steps/uses lines to satisfy zizmor (e.g., use env vars for inputs; add zizmor ignore annotations where intentional).

Reviewed changes

Copilot reviewed 16 out of 16 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.github/workflows/zizmor.yml New zizmor workflow to lint GitHub Actions configuration.
.github/workflows/windows-periodic.yml Disable persisted checkout credentials.
.github/workflows/windows-periodic-trigger.yml Add zizmor ignore for intentionally unpinned reusable workflow reference.
.github/workflows/windows-hyperv-periodic.yml Disable persisted checkout credentials.
.github/workflows/windows-hyperv-periodic-trigger.yml Add zizmor ignore for intentionally unpinned reusable workflow reference.
.github/workflows/release.yml Disable persisted checkout credentials; use env var ref in shell.
.github/workflows/api-release.yml Disable persisted checkout credentials; use env var ref in shell.
.github/workflows/node-e2e.yml Disable persisted checkout credentials for both checkouts.
.github/workflows/nightly.yml Disable persisted checkout credentials for both checkouts.
.github/workflows/links.yml Disable persisted checkout credentials.
.github/workflows/images.yml Disable persisted checkout credentials; move workflow inputs into env for shell usage.
.github/workflows/fuzz.yml Disable persisted checkout credentials for go test fuzz job.
.github/workflows/codeql.yml Disable persisted checkout credentials.
.github/workflows/ci.yml Disable persisted checkout credentials across multiple jobs/steps.
.github/workflows/build-test-images.yml Disable persisted checkout credentials; move workflow inputs into env for shell usage.
.github/dependabot.yml Add a Dependabot update cooldown configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/zizmor.yml
Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/release.yml Outdated
Comment thread .github/workflows/api-release.yml Outdated
Comment thread .github/workflows/api-release.yml Outdated
Comment thread .github/workflows/images.yml Outdated

This comment was marked as outdated.

Copilot AI review requested due to automatic review settings June 4, 2026 09:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.

with:
min-severity: medium
min-confidence: medium
persona: pedantic

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
persona: pedantic
persona: pedantic
# No need to hide the result in https://github.com/ORG/REPO/security (private),
# as anybody can already run zizmor locally to find vulnerabilities.
advanced-security: false

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah! I was wondering why I didn't see the reports; possibly because of that (?); thx! will update later.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like that's not supported; maybe something needed to be added in @crazy-max 's workflow?

Invalid workflow file: .github/workflows/zizmor.yml#L36

The workflow is not valid. .github/workflows/zizmor.yml (Line: 36, Col: 26): Invalid input, advanced-security is not defined in the referenced workflow.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed it again (for now)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 18 out of 18 changed files in this pull request and generated no new comments.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.

Comment on lines +40 to 44
releasever=${GITHUB_REF}
releasever="${releasever#refs/tags/}"
TAGCHECK=$(git tag -v ${releasever} 2>&1 >/dev/null) ||
TAGCHECK=$(git tag -v "${releasever}" 2>&1 >/dev/null) ||
echo "${TAGCHECK}" | grep -q "error" && {
echo "::error::tag ${releasever} is not a signed tag. Failing release process."
Comment on lines +33 to 37
releasever=${GITHUB_REF}
releasever="${releasever#refs/tags/}"
TAGCHECK=$(git tag -v ${releasever} 2>&1 >/dev/null) ||
TAGCHECK=$(git tag -v "${releasever}" 2>&1 >/dev/null) ||
echo "${TAGCHECK}" | grep -q "error" && {
echo "::error::tag ${releasever} is not a signed tag. Failing release process."
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Results of automated fixes using;

    zizmor --fix=all --min-severity medium .

Signed-off-by: Sebastiaan van Stijn <[email protected]>
"read-all" is overly permissive as a default. Change it to contents: read
to align with other defaults.

Note that this does not actually impact the workflows, because the defaults
are overwritten in the actual check.

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Quote values to address CoPilot review comments

Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
@samuelkarp

Copy link
Copy Markdown
Member

@thaJeztah Rebase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Triage

Development

Successfully merging this pull request may close these issues.

7 participants