ci(workflows): harden workflows with zizmor, add CodeQL and mise tasks#339
Merged
Conversation
…ctions Replicates yamkix#448: adds zizmor static analysis for workflows, tightens token permissions, protects the release path from cache poisoning, pins all third-party actions to full versions, and introduces mise tasks mirroring the make targets. - workflows_checks.yml: run zizmor alongside actionlint; explicit contents: read / checks: write permissions - code_checks.yml: top-level contents: read, persist-credentials: false on all checkouts; dedicated detect-release step reused by downstream conditions; mise and uv caches disabled on release runs; pin pypa/gh-action-pypi-publish to v1.14.0 (was unstable ref); fix deprecated codecov params (files/report_type) - lint_pr_titles.yml: scope token to pull-requests: write, document why pull_request_target is safe (zizmor ignore), pin sticky-comment to v3.0.5 - publish_docs.yml: keep persist-credentials: true explicitly with justification (mkdocs gh-deploy pushes to gh-pages) - zizmor.yml: ignore cache-poisoning in code_checks.yml with rationale - toolbox/mise/tasks/toml: mise tasks (lint, test, dist, docs, venv, precommit, checks) used by the workflows in place of make targets - poe_tasks.toml: split ruff:fmt:run into ruff:isort + ruff:fmt Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replicates yamkix#449: CodeQL code scanning via advanced setup, covering python and actions with build-mode: none, weekly schedule, minimal permissions and pinned action SHAs. Also silence the yamkix pre-commit hook. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
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:
For more information about GitHub Code Scanning, check out the documentation. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #339 +/- ##
=======================================
Coverage 79.14% 79.14%
=======================================
Files 11 11
Lines 235 235
Branches 28 28
=======================================
Hits 186 186
Misses 45 45
Partials 4 4 ☔ View full report in Codecov by Harness. |
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
Replicates the CI hardening done in yamkix (looztra/yamkix#448 and looztra/yamkix#449): zizmor static analysis, tightened token permissions, cache-poisoning protection on the release path, pinned actions, CodeQL code scanning, and mise tasks mirroring the make targets.
Changes
zizmorcore/zizmor-action) alongside actionlint; explicitcontents: read/checks: writepermissionscontents: readpermission andpersist-credentials: falseon all checkouts; dedicateddetect-releasestep reused by downstream conditions; mise and uv caches disabled on release runs so a poisoned cache cannot reach the (Test)PyPI distribution; pinpypa/gh-action-pypi-publishto v1.14.0 (was an unstable ref); fix deprecated codecov params (files/report_type); switch steps frommaketomise runtaskspull-requests: write, document whypull_request_targetis safe here (zizmor ignore), pin sticky-comment action to v3.0.5persist-credentials: trueexplicitly with justification (mkdocs gh-deploypushes to gh-pages)cache-poisoningin code_checks.yml, with rationalepythonandactionswithbuild-mode: none, weekly schedule, minimal permissions and pinned SHAsactionlintandzizmoradded to.mise.tomltoolsruff:fmt:runintoruff:isort+ruff:fmt--silentto the yamkix hookVerification
zizmorv1.26.1: no findings across all six workflows;actionlintcleanvenv:setup,lint:fast,styleand two fullprecommit:runpasses exercised locally (no diffs produced)Note
If the GitHub repo has default CodeQL setup enabled, it must be switched off (Settings → Code security) before the advanced workflow can upload results.
🤖 Generated with Claude Code