chore(ci): security hardening - #20
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR hardens GitHub Actions workflows based on zizmor security findings by reducing supply-chain risk from unpinned actions, preventing credential persistence in local git config, and narrowing secret exposure when calling reusable workflows.
Changes:
- Pinned all referenced GitHub Actions to specific commit SHAs (retaining version tags as comments).
- Added
persist-credentials: falsetoactions/checkoutsteps to avoid leavingGITHUB_TOKENin git config. - Replaced
secrets: inheritwith explicit secret passthrough for reusable workflow calls.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| .github/workflows/publish-pub.yml | Pins actions, disables checkout credential persistence, and switches reusable workflow call to explicit secret passing. |
| .github/workflows/precompile-binaries.yml | Pins actions and disables checkout credential persistence in the reusable workflow. |
| .github/workflows/build-all-platforms.yml | Pins actions, disables checkout credential persistence broadly, and switches reusable workflow call to explicit secret passing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
24
to
26
| - name: Checkout full history | ||
| uses: actions/checkout@v7 | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: |
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.
Closes fluttercandies/security-scanner#79
Addresses zizmor CI/CD security findings across the three workflow files:
unpinned-uses — Pinned all third-party and first-party GitHub Actions to commit SHAs with version tags retained as comments (checkout, flutter-action, rust-toolchain, upload/download-artifact, setup-java, setup-dart, android-emulator-runner, action-gh-release).
artipacked — Added
persist-credentials: falseto everyactions/checkoutstep so the auto-persistedGITHUB_TOKENis not left in the local git config.secrets-inherit — Replaced
secrets: inheriton the reusablepublish-precompiledworkflow calls with explicit secret passthrough (PRECOMPILE_BINARIES_PRIVATE_KEY);GITHUB_TOKENis auto-provided to reusable workflows.