Skip to content

ci: zizmor security checks#6602

Open
ndonkoHenri wants to merge 6 commits into
flet-0.86from
zizmor
Open

ci: zizmor security checks#6602
ndonkoHenri wants to merge 6 commits into
flet-0.86from
zizmor

Conversation

@ndonkoHenri

@ndonkoHenri ndonkoHenri commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Summary by Sourcery

Tighten GitHub Actions permissions, pin third‑party actions to specific SHAs, and improve caching and environment handling across CI, docs, image build, and release workflows.

Build:

  • Pin all GitHub Actions (checkout, setup-node, setup-uv, Flutter/Dart actions, Docker actions, artifact upload/download, gh-release) to specific commit SHAs and updated versions.
  • Enable conditional caching for Node.js, uv, and Flutter/fvm-related steps based on whether the ref is a tag, and standardize related workflow environment usage.

CI:

  • Refine GitHub Actions permissions from broad workflow-level settings to per-job least-privilege scopes (read/write, id-token, packages) across CI, image build, test, docs, integration, and release workflows.
  • Disable credential persistence in checkout steps to avoid leaking the default GITHUB_TOKEN and improve security posture in all workflows.
  • Adjust bash steps to consume GitHub context values via environment variables instead of inline expressions, improving compatibility with security tooling and shell evaluation.

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 workflows by pinning third‑party actions to specific commit SHAs, tightening GITHUB_TOKEN permissions to least privilege (often per-job), and standardizing safer environment usage/caching behavior across CI and ancillary workflows.

Changes:

  • Pin commonly used actions (checkout, setup-node, setup-uv, flutter/dart, docker, artifact upload/download, release) to commit SHAs and disable persist-credentials on checkouts.
  • Move from broad workflow-level permissions to more restrictive per-job permissions across multiple workflows.
  • Make caching behavior conditional (typically disabling caches on tag refs) and reduce inline ${{ }} usage in shell steps by routing values through env.

Reviewed changes

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

Show a summary per file
File Description
.github/workflows/release-pr-changelog.yml Pins checkout and restricts token permissions for the changelog gate workflow.
.github/workflows/macos-integration-tests.yml Pins actions, disables checkout credential persistence, and makes caching conditional.
.github/workflows/flet-build-test.yml Applies least-privilege permissions, pins actions, disables checkout credential persistence, and makes caching conditional.
.github/workflows/flet-build-image.yml Shifts to per-job permissions, pins docker/actions dependencies, and routes context into env vars for shell steps.
.github/workflows/docs.yml Pins actions, disables checkout credential persistence, and adds conditional caching.
.github/workflows/ci.yml Broadly pins actions, tightens per-job permissions, disables checkout credential persistence, and standardizes conditional caching/env usage across CI/release jobs.

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

@sourcery-ai sourcery-ai Bot 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.

We've reviewed this pull request using the Sourcery rules engine

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

Comment thread .github/workflows/ci.yml

- name: Setup Node.js
uses: actions/setup-node@v4
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
Comment thread .github/workflows/ci.yml

- name: Create/Update GitHub Release
uses: softprops/action-gh-release@v2
uses: softprops/action-gh-release@b4309332981a82ec1c5618f44dd2e27cc8bfbfda # v3.0.0
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 18, 2026

Copy link
Copy Markdown

Deploying flet-website-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 5c910cf
Status: ✅  Deploy successful!
Preview URL: https://3c38e54c.flet-website-v2.pages.dev
Branch Preview URL: https://zizmor.flet-website-v2.pages.dev

View logs

Brought in all flet-0.86 changes (multi-Python build matrix, flet clean
command, pubsub typing, secure-storage bump, etc.) and applied zizmor
security fixes to the new flet-build-test-matrix.yml:

- Pinned actions/checkout, setup-uv, upload-artifact, and
  flutter-fvm-config-action/setup to SHA hashes
- Added persist-credentials: false to checkout
- Added permissions: contents: read to the build job
- Moved inputs.python_version into env to fix template-injection
@ndonkoHenri ndonkoHenri changed the base branch from main to flet-0.86 June 18, 2026 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants