CI(security): harden GitHub Actions workflows - #329
Merged
Conversation
Resolves zizmor findings in fluttercandies/security-scanner#11.
AmosHuKe
reviewed
Aug 12, 2026
Move the CodeQL permissions (security-events: write, packages: read,
actions: read, contents: read) back to the analyze job and set the
workflow-level default to permissions: {} (least privilege). This
keeps the zizmor excessive-permissions finding resolved while matching
the repo convention.
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.
Summary
Hardens GitHub Actions workflows to resolve zizmor CI/CD security findings reported in fluttercandies/security-scanner#11.
Changes
All changes are limited to
.github/workflows/.artipacked (Low) —
persist-credentials: falseAdded
persist-credentials: falseto everyactions/checkoutstep across all workflows. None of these workflows push back via git using the checkout's own token, so this is always safe.codeql.yml— 1 checkout steppublish.yml— 1 checkout steppublishable.yml— 1 checkout steprunnable.yml— 3 checkout stepsexcessive-permissions (Medium) — workflow-level
permissions:codeql.yml: hoisted the existing job-levelpermissions:block (under the singleanalyzejob) up to workflow level. The block (security-events: write,packages: read,actions: read,contents: read) is unchanged in content — only its placement moved from job-level to workflow-level.The other three workflows (
publish.yml,publishable.yml,runnable.yml) already have a restrictive workflow-levelpermissions: {}and needed no change.Not addressed
Resolves zizmor findings in fluttercandies/security-scanner#11.