Repository navigation
ci: audit, fix, and baseline zizmor findings in managed workflows - #1185
Merged
Merged
Conversation
…workflows zizmor 1.25.2 over the managed workflow set reported 73 findings. Fix the 8 that are fixable without behavior change: - artipacked (7): set persist-credentials: false on checkouts that only read the tree and never push or fetch from the remote — the ci.yml resolve-toolchain/lint/test/dependency-review checkouts, the codeql.yml analyze checkout (root SSoT, mirrored to the scaffold by sync-manifest), and the renovate-changelog-build/sync-issues resolve-toolchain sparse checkouts. The commit-checks checkout keeps the credential (it fetches the trunk from a possibly-private remote), as do all release/sync checkouts that push. - template-injection (1): move the release-app token interpolation in the sync-main-to-dev stale-branch cleanup step into the step env block so no expansion context reaches the script body. Refs: #1182
Ship a maintained zizmor.yml at the repo root (SSoT) and register it in the sync manifest so it scaffolds into every consumer. It baselines the 65 residual findings in the managed workflow set that cannot be fixed without changing release/CI behavior: artipacked on push/fetch checkouts, the renovate-changelog workflow_run trigger, broadly-scoped github-app release tokens, secrets: inherit release fan-out, and the runtime-resolved toolchain image (unpinned-images). Every exemption is a specific managed-workflow basename — never a glob — so a consumer-authored workflow can never inherit one; consumer baselines for devkit output shrink to zero. Refs: #1182
Run zizmor (pinned 1.25.2 via uvx) over assets/workspace/.github/workflows/ against the shipped zizmor.yml baseline in the project-checks job. A new finding — or a managed workflow that regains a fixed one — now fails devkit CI and must be fixed or triaged upstream instead of reaching consumers. Refs: #1182
Five workflow-shape tests (no zizmor binary needed): the baseline ships at the root SSoT and in the scaffold with identical rules, it is registered in the sync manifest, every exemption is a bare managed-workflow basename that resolves to a shipped file (never a glob or path, so repo-authored workflows can never inherit one), and the project-checks CI gate stays wired to lint the managed set against the shipped baseline. Tests pin the finished config artifacts rather than drive code, so the RED-first TDD sequence does not apply (config/workflow change). Refs: #1182
Add docs/WORKFLOW_SECURITY.md: why devkit audits its generated workflows, the fix-upstream-first policy, the per-audit rationale for every baselined exemption, the basename-only scope rule that keeps consumer-authored workflows always audited, the CI regression gate, and the maintenance contract (baseline updates ride the same PR as managed-workflow changes; the zizmor version in the gate is pinned deliberately). Record the change under Unreleased / Security in the changelog (mirror hook-synced). Refs: #1182
This was referenced Jul 17, 2026
Closed
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
zizmor(v1.25.2) over the 14 devkit-managed workflows inassets/workspace/.github/workflows/reported 73 findings (40 high / 32 medium / 1 informational). Consumers adopting workflow security linting had to baseline devkit-generated code they cannot fix (see vig-os/org-configzizmor.yml, org-config#37). This PR:zizmor.ymlbaseline (root SSoT, scaffolded viascripts/manifest.toml) for the 65 intentional residual findings — consumer baselines for devkit output shrink to zero.project-checksnow runsuvx [email protected] --offline --config zizmor.yml assets/workspace/.github/workflows/.docs/WORKFLOW_SECURITY.md.Audit table
artipackedpersist-credentials: falseon checkouts that only read the tree: ci.yml resolve-toolchain / lint / test / dependency-review, codeql.yml (root SSoT + scaffold mirror), renovate-changelog-build + sync-issues resolve-toolchain sparse checkouts.template-injection${{ }}interpolation into the stepenv:block.artipackedunpinned-imagesimage:is the devkit toolchain image resolved at runtime (needs.*.outputs.image/inputs.toolchain_image); it cannot be SHA-pinned in source.github-appcreate-github-app-tokenintentionally mints a broadly-scoped installation token for multi-repo release/sync orchestration; per-permission scoping breaks those flows.secrets-inheritrelease.yml/prepare-release.ymlfan out to reusable workflows withsecrets: inheritby design.dangerous-triggersrenovate-changelog-commit.ymlruns onworkflow_runby design (commits the built changelog).Totals: 8 fixed, 65 baselined, 0 left for consumers.
Baseline scope rule (enforced by
tests/test_workflow_zizmor_baseline.py): every exemption is a specific managed-workflow basename — never a glob or path — so a consumer-authored workflow can never inherit an exemption.Action pinning / Renovate
All
uses:references in the managed set were already full-SHA-pinned with# vX.Y.Ztrailing comments (enforced by thecheck-action-pinshook), and the reporenovate.jsonhas"enabledManagers": [..., "github-actions", ...]with no path restriction, so digests stay Renovate-fresh — no change needed.Evidence (zizmor 1.25.2)
just precommit(prek run --all-files): green, sync-manifest converged (scaffoldzizmor.yml+ codeql mirror regenerated by the hook).tests/test_workflow_zizmor_baseline.py: 5 passed;test_scaffold_lint.py+test_workflow_sync_checkout.py: 41 passed total.Notes
setup-devkit-toolchaininternals (direnv-mode CI: setup-devkit-toolchain forwards only PATH, shellHook env is silently dropped #1180),justfile.base(direnv-mode CI: uvx tools with native wheels fail (nix CPython cannot load system libs) #1181).Refs: #1182
Refs: vig-os/org-config#15