Skip to content

🐛 fix(ci): unbreak pre-commit and finish zizmor lockdown#26

Merged
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix-ci-zizmor-config
May 12, 2026
Merged

🐛 fix(ci): unbreak pre-commit and finish zizmor lockdown#26
gaborbernat merged 1 commit into
tox-dev:mainfrom
gaborbernat:fix-ci-zizmor-config

Conversation

@gaborbernat
Copy link
Copy Markdown
Member

@gaborbernat gaborbernat commented May 12, 2026

CI on main is red for every job because the zizmor hook added in #25 cannot parse .pre-commit-config.yaml. The file mixes 2- and 4-space list indentation, so pre-commit aborts with InvalidConfigError before any hook runs. 🔧

#25 also enabled zizmor without running it against action.yml or .github/dependabot.yaml, which carry five real findings: astral-sh/setup-uv and actions/cache are referenced by floating tag rather than commit SHA, ${{ inputs.extra_args }} is interpolated directly into a run: block (template injection), and the Dependabot config has no cooldown. Pinning to SHAs matches the policy already applied in .github/workflows/main.yml. Moving inputs.extra_args into the step's env: and referencing it as ${INPUTS_EXTRA_ARGS} removes the injection path while preserving word splitting, so callers passing multiple flags keep working.

The workflow jobs are also renamed from main-* to self-test-* and the workflow gains a top-level name: CI, so PR status checks read as CI / self-test-uvx instead of main / main-uvx. ✨

Indentation in .pre-commit-config.yaml mixed two-space and four-space
styles, so pre-commit failed to parse it. Normalize to two-space.

Also resolve zizmor findings that PR tox-dev#25 missed in action.yml and
dependabot.yaml: pin third-party actions to SHA, move inputs.extra_args
into the env block to avoid template injection, and add a Dependabot
cooldown.

Rename the workflow jobs from main-* to self-test-* and add a top-level
'CI' name so PR status checks are self-describing.
@gaborbernat gaborbernat added the bug Something isn't working label May 12, 2026
@gaborbernat gaborbernat changed the title 🐛 fix(ci): repair pre-commit config and remaining zizmor findings 🐛 fix(ci): unbreak pre-commit and finish zizmor lockdown May 12, 2026
@gaborbernat gaborbernat merged commit 3c0e45b into tox-dev:main May 12, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant