Skip to content

ci(gh-actions): resolve zizmor findings - #2592

Merged
madhavilosetty-intel merged 1 commit into
mainfrom
ci/fix-zizmor-findings
Jul 22, 2026
Merged

ci(gh-actions): resolve zizmor findings#2592
madhavilosetty-intel merged 1 commit into
mainfrom
ci/fix-zizmor-findings

Conversation

@madhavilosetty-intel

Copy link
Copy Markdown
Contributor
  • Set persist-credentials: false on actions/checkout in api-test, codeql-analysis, docker-image, node.js, semantic and trivy-scan workflows; none of these jobs push back to git.
  • Move the docker_registry / docker_tag_name inputs out of the docker-image build run block into step-level env vars, referenced as quoted shell variables, to avoid template injection.
  • Add .github/zizmor.yml ignoring dependabot-cooldown, with a note on why daily uncooled updates are acceptable here.

PR Checklist

  • Unit Tests have been added for new changes
  • API tests have been updated if applicable
  • All commented code has been removed
  • If you've added a dependency, you've ensured license is compatible with Apache 2.0 and clearly outlined the added dependency.

What are you changing?

Anything the reviewer should know when reviewing this PR?

If the there are associated PRs in other repositories, please link them here (i.e. device-management-toolkit/repo#365 )

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

This PR addresses Zizmor security findings in the repository’s GitHub Actions workflows by hardening checkout credential handling and reducing risk of expression/template injection in a shell run step. It also introduces a Zizmor config file to document an intentional exception for Dependabot cooldown findings.

Changes:

  • Disable persisted Git credentials (persist-credentials: false) for actions/checkout across multiple workflows that don’t need to push to the repo.
  • Refactor docker-image.yml to pass workflow inputs via step-level env and reference them as quoted shell variables in the run command.
  • Add .github/zizmor.yml to configure/ignore dependabot-cooldown with rationale.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/zizmor.yml Adds Zizmor configuration to ignore a specific rule (Dependabot cooldown) with a documented rationale.
.github/workflows/api-test.yml Disables persisted checkout credentials for the API test workflow.
.github/workflows/codeql-analysis.yml Disables persisted checkout credentials for CodeQL workflow checkout.
.github/workflows/docker-image.yml Disables persisted checkout credentials; moves inputs into env and quotes shell variable usage to mitigate injection risk.
.github/workflows/node.js.yml Disables persisted checkout credentials for Node.js CI workflow.
.github/workflows/semantic.yml Disables persisted checkout credentials while keeping full history checkout for PR semantic validation.
.github/workflows/trivy-scan.yml Disables persisted checkout credentials for Trivy scan workflow.

Comment thread .github/zizmor.yml
- Set persist-credentials: false on actions/checkout in api-test,
  codeql-analysis, docker-image, node.js, semantic and trivy-scan
  workflows; none of these jobs push back to git.
- Move the docker_registry / docker_tag_name inputs out of the
  docker-image build run block into step-level env vars, referenced as
  quoted shell variables, to avoid template injection.
- Add .github/zizmor.yml ignoring dependabot-cooldown, with a note on
  why daily uncooled updates are acceptable here.
@madhavilosetty-intel
madhavilosetty-intel merged commit 5b42e08 into main Jul 22, 2026
9 checks passed
@madhavilosetty-intel
madhavilosetty-intel deleted the ci/fix-zizmor-findings branch July 22, 2026 12:33
@RosieAMT

Copy link
Copy Markdown

🎉 This PR is included in version 2.34.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants