Skip to content

ci: zizmor security checks#23

Open
ndonkoHenri wants to merge 4 commits into
mainfrom
zizmor
Open

ci: zizmor security checks#23
ndonkoHenri wants to merge 4 commits into
mainfrom
zizmor

Conversation

@ndonkoHenri

Copy link
Copy Markdown
Contributor

No description provided.

Harden the build workflows to pass zizmor (31 findings -> 0 actionable):
- Pin every action to a commit SHA at its latest release (setup-python v6.2.0,
  upload-artifact v7.0.1, download-artifact v8.0.1, gh-release v3.0.0); checkout
  held at v6.0.3 to match the sibling repos (v7.0.0 is a fresh major — bump all
  together later).
- persist-credentials: false on all checkouts.
- Least-privilege top-level permissions: contents: read on build-python.yml
  (publish-release keeps contents: write).
- template-injection: move inputs/env expansions out of run: blocks (incl. the
  Windows pwsh step -> $env:PYTHON_VERSION).
- Drop secrets: inherit on the reusable-workflow call — the child declares no
  secrets and uses github.token directly.

Add .github/workflows/zizmor.yml (official zizmor-action on push/PR -> code
scanning, with fork-PR SARIF skip) and .github/dependabot.yml (github-actions,
monthly, grouped, 7-day cooldown).

Remaining: 1 informational superfluous-actions (softprops/action-gh-release).
@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/build-python-version.yml Fixed
Comment thread .github/workflows/build-python-version.yml Fixed
Comment thread .github/workflows/build-python-version.yml Fixed
Comment thread .github/workflows/build-python-version.yml Fixed
Comment thread .github/workflows/build-python.yml Fixed
Comment thread .github/workflows/build-python.yml Fixed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Introduces GitHub Actions security scanning with zizmor and hardens existing CI workflows by tightening permissions and pinning action versions.

Changes:

  • Add a new zizmor workflow that runs on pushes and PRs and uploads SARIF when permitted.
  • Harden existing build workflows by setting explicit permissions, pinning actions to SHAs, and disabling persisted checkout credentials.
  • Remove secrets: inherit from the reusable workflow invocation.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/zizmor.yml Adds zizmor-based GitHub Actions security analysis with least-privilege permissions.
.github/workflows/build-python.yml Tightens token permissions, pins actions to SHAs, and adjusts release manifest generation.
.github/workflows/build-python-version.yml Pins actions to SHAs, disables persisted credentials, and refines Windows env var usage.

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

Comment thread .github/workflows/build-python.yml Outdated
- actions/setup-python: v6.2.0 → v6.3.0 (ece7cb06)
- softprops/action-gh-release: v3.0.0 → v3.0.1 (718ea10b)

Both SHAs were behind their version comments, triggering zizmor's
mismatched-hash-comment audit in GitHub Code Scanning.

- name: Publish all artifacts to release
uses: softprops/action-gh-release@v3
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b # v3.0.1
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