Skip to content

gha: pin remaining actions and apply hardening from zizmor#13597

Merged
samuelkarp merged 5 commits into
containerd:mainfrom
thaJeztah:harden_actions
Jul 1, 2026
Merged

gha: pin remaining actions and apply hardening from zizmor#13597
samuelkarp merged 5 commits into
containerd:mainfrom
thaJeztah:harden_actions

Conversation

@thaJeztah

Copy link
Copy Markdown
Member

gha: buf-breaking: pin actions by sha

gha: apply zizmor fixes

Results of automated fixes using;

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

gha: suppress zizmor warning for intentionally un-pinned workflows

gha: remove uses of "read-all" permissions

"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.

gha: quote some values

Quote values to address CoPilot review comments

Copilot AI review requested due to automatic review settings June 15, 2026 14:06
@github-project-automation github-project-automation Bot moved this to Needs Triage in Pull Request Review Jun 15, 2026
@thaJeztah thaJeztah mentioned this pull request Jun 15, 2026
1 task

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 hardens the repository’s GitHub Actions configuration in line with zizmor/secure-workflows guidance by tightening default permissions, reducing token persistence, and improving shell safety/quoting in workflow scripts.

Changes:

  • Add persist-credentials: false to actions/checkout steps to avoid leaving the workflow token in the git config.
  • Replace overly broad default workflow permissions (read-all) with contents: read while keeping job-level overrides where needed.
  • Apply zizmor-related adjustments (unpinned reusable workflow suppressions, quoting of shell variables/args) and add Dependabot “cooldown” to reduce update risk/noise.

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/windows-periodic.yml Disables persisted checkout credentials for improved token hygiene.
.github/workflows/windows-periodic-trigger.yml Adds zizmor suppression for intentionally unpinned reusable workflow reference.
.github/workflows/windows-hyperv-periodic.yml Disables persisted checkout credentials for improved token hygiene.
.github/workflows/windows-hyperv-periodic-trigger.yml Adds zizmor suppression for intentionally unpinned reusable workflow reference.
.github/workflows/stale.yml Tightens default permissions to contents: read while retaining required job permissions.
.github/workflows/scorecards.yml Tightens default permissions to contents: read and disables persisted checkout credentials.
.github/workflows/release.yml Disables persisted checkout credentials and improves shell variable usage/quoting for tag handling.
.github/workflows/node-e2e.yml Disables persisted checkout credentials for both containerd and Kubernetes checkouts.
.github/workflows/nightly.yml Disables persisted checkout credentials across nightly jobs.
.github/workflows/links.yml Disables persisted checkout credentials for the link-check workflow.
.github/workflows/images.yml Disables persisted checkout credentials and quotes shell variables/arguments used with ctr.
.github/workflows/fuzz.yml Disables persisted checkout credentials for fuzzing workflow.
.github/workflows/codeql.yml Disables persisted checkout credentials for CodeQL workflow checkout.
.github/workflows/ci.yml Disables persisted checkout credentials across CI jobs and additional checkouts.
.github/workflows/build-test-images.yml Disables persisted checkout credentials and quotes interpolated values passed to make.
.github/workflows/buf-breaking.yml Pins actions by SHA and disables persisted checkout credentials for the buf breaking check.
.github/workflows/api-release.yml Disables persisted checkout credentials and improves shell variable usage/quoting for tag handling.
.github/dependabot.yml Adds Dependabot cooldown settings to delay updates from very recent releases.

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

@thaJeztah

Copy link
Copy Markdown
Member Author

Most Links failures will be addressed in #13598

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]>
Copilot AI review requested due to automatic review settings June 26, 2026 16:53
@kubernetes-prow kubernetes-prow Bot added size/L and removed size/M labels Jun 26, 2026

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.

@thaJeztah

Copy link
Copy Markdown
Member Author

@AkihiroSuda @mxpv PTAL (I think we can ignore the Link failure for now, as it's unrelated)

@github-project-automation github-project-automation Bot moved this from Needs Triage to Review In Progress in Pull Request Review Jul 1, 2026
@samuelkarp
samuelkarp added this pull request to the merge queue Jul 1, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 1, 2026
@samuelkarp
samuelkarp added this pull request to the merge queue Jul 1, 2026
Merged via the queue into containerd:main with commit 2294496 Jul 1, 2026
53 of 55 checks passed
@github-project-automation github-project-automation Bot moved this from Review In Progress to Done in Pull Request Review Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants