Skip to content

ci: audit, fix, and baseline zizmor findings in managed workflows - #1185

Merged
c-vigo merged 5 commits into
devfrom
feature/1182-zizmor-managed-workflows
Jul 17, 2026
Merged

c-vigo merged 5 commits into
devfrom
feature/1182-zizmor-managed-workflows

Conversation

@c-vigo

@c-vigo c-vigo commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

zizmor (v1.25.2) over the 14 devkit-managed workflows in assets/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-config zizmor.yml, org-config#37). This PR:

  1. Fixes the 8 fixable findings upstream, behavior-preserving.
  2. Ships a devkit-owned zizmor.yml baseline (root SSoT, scaffolded via scripts/manifest.toml) for the 65 intentional residual findings — consumer baselines for devkit output shrink to zero.
  3. Gates regressions in devkit CI: project-checks now runs uvx [email protected] --offline --config zizmor.yml assets/workspace/.github/workflows/.
  4. Documents the policy in docs/WORKFLOW_SECURITY.md.

Audit table

Audit Severity Count Disposition Why
artipacked Medium 7 Fixed persist-credentials: false on 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 Informational 1 Fixed sync-main-to-dev stale-branch cleanup: release-app token moved from inline ${{ }} interpolation into the step env: block.
artipacked Medium 21 Baselined Remaining checkouts push or fetch from a (possibly private) remote and need the persisted git credential (release/sync branch work; ci.yml commit-checks fetches the trunk for the base diff).
unpinned-images High 20 Baselined image: is the devkit toolchain image resolved at runtime (needs.*.outputs.image / inputs.toolchain_image); it cannot be SHA-pinned in source.
github-app High 19 Baselined create-github-app-token intentionally mints a broadly-scoped installation token for multi-repo release/sync orchestration; per-permission scoping breaks those flows.
secrets-inherit Medium 4 Baselined release.yml / prepare-release.yml fan out to reusable workflows with secrets: inherit by design.
dangerous-triggers High 1 Baselined renovate-changelog-commit.yml runs on workflow_run by 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.Z trailing comments (enforced by the check-action-pins hook), and the repo renovate.json has "enabledManagers": [..., "github-actions", ...] with no path restriction, so digests stay Renovate-fresh — no change needed.

Evidence (zizmor 1.25.2)

$ zizmor --offline --config zizmor.yml assets/workspace/.github/workflows/
No findings to report. Good job! (65 ignored, 119 suppressed)
$ echo $?
0
  • just precommit (prek run --all-files): green, sync-manifest converged (scaffold zizmor.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

Refs: #1182
Refs: vig-os/org-config#15

c-vigo added 5 commits July 17, 2026 14:40
…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
@c-vigo
c-vigo merged commit c8192bd into dev Jul 17, 2026
13 checks passed
@c-vigo
c-vigo deleted the feature/1182-zizmor-managed-workflows branch July 17, 2026 12:59
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.

1 participant