Fix zizmor security issues in GitHub Actions workflows#1328
Merged
Conversation
Adds 7-day cooldown period to the github-actions package ecosystem entry to prevent excessive update frequency. Applied by: zizmor v1.24.1 --fix (dependabot-cooldown rule)
- Add explicit permissions blocks to all workflows (least privilege) - Add persist-credentials: false to checkout steps in init.yml, labels.yml - Fix template injection in init.yml (sed command) and update.yml (curl commands) by using environment variables - Add job-level permissions where write access is needed Detected by: zizmor v1.24.1 (excessive-permissions, artipacked, template-injection rules)
low-risk template-injection findings cla.yml and project.yml use pull_request_target safely (no code checkout). stale.yml echoes action outputs (not attacker input).
Catches GitHub Actions security and syntax issues before they reach CI. Excludes stale.yml from actionlint due to a known expression type mismatch in the stale action outputs.
dbast
approved these changes
May 8, 2026
jakirkham
approved these changes
May 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Audited all workflow files with zizmor v1.24.1 and fixed the findings. These are the upstream source workflows that get synced to other conda repos via
update.yml, so fixing them here propagates the improvements everywhere.What changed
Dependabot cooldowns (
dependabot.yml)Explicit permissions (all workflows)
permissions:blocks tocla.yml,issues.yml,labels.yml,project.yml,update.yml,init.ymlfollowing the principle of least privilege.permissions: contents: readwith job-level escalation where write access is needed.Credential persistence (
init.yml,labels.yml)persist-credentials: falsetoactions/checkoutsteps that don't need git credentials after checkout.update.ymlintentionally keeps credentials for thegit push --force-with-leasestep (suppressed inzizmor.yml).Template injection (
init.yml,update.yml)init.yml: Replaced${{ github.event.inputs.org/repo }}insedcommand with env vars.update.yml: Replaced${{ github.event.issue.pull_request.url }}incurlcommands with env var.Suppressions (
zizmor.yml)cla.ymlandproject.ymldangerous-triggers:pull_request_targetis used safely (no code checkout).stale.ymltemplate-injection: Low confidence, outputs are not attacker-controlled.update.ymlartipacked: Credentials needed for bot push.Pre-commit hooks (
.pre-commit-config.yaml)zizmor(v1.24.1) andactionlint(v1.7.12) hooks.actionlintexcludesstale.ymldue to a known expression type mismatch.Audit result
Downstream impact
Once merged and synced, the corresponding suppressions in
conda/actionsPR #361 (zizmor.yml) can be removed since the source workflows will already be fixed.