Skip to content

zizmor: rollout plan and Phase 0 pilot - #159

Open
Denis-Averin wants to merge 23 commits into
mainfrom
claude/nifty-euler-t2swme
Open

Denis-Averin wants to merge 23 commits into
mainfrom
claude/nifty-euler-t2swme

Conversation

@Denis-Averin

@Denis-Averin Denis-Averin commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Adds zizmor (static analysis for GitHub Actions) to this repository as the pilot of a fleet-wide rollout, together with the plan for the nine SDK repositories.

  • doc/zizmor-rollout-plan.md: what zizmor is, measured baseline (95 findings across 30 workflows in 10 repositories with the agreed config), required workflow changes per rule, validated templates, phased rollout, the five decisions taken on 2026-11-04, SHA pins for third-party actions.
  • .github/workflows/zizmor.yml: runs zizmorcore/zizmor-action (SHA-pinned) in plain mode on push, pull_request and weekly schedule. The job fails on any finding; no SARIF upload.
  • .github/zizmor.yml: shared config. actions/* may stay on tags, everything else must be SHA-pinned; TEST_CONFIGURATION_ACCESS_TOKEN allowlisted for secrets-outside-env.
  • check-codegen.yml, check-urls.yml: explicit permissions: contents: read, persist-credentials: false on every checkout, job names, concurrency group. This resolves all 6 zizmor findings this repository had.
  • codegen/github/ templates and scripts/sync-github-templates.bash (Phase 1): the canonical zizmor workflow and config, copied into every SDK by codegen/generate-*.bash and checked by the new "Check shared GitHub config in sync" job.
  • Phase 3: doc/ci-security.md (the CI security requirement and how this repository meets it, new row in cloud-sdk-requirements.md), a make zizmor pre-flight step in ReleaseWorkflow.md, and scripts/enforce-zizmor-check.bash, which an organization owner runs with gh to require the "Run zizmor" check on every default branch (ruleset per repository, admin bypass for the direct release pushes) and to set the organization's default GITHUB_TOKEN to read-only.
  • No Dependabot: decision 5 was revised the same day to roll out zizmor without .github/dependabot.yml for now; the action pins are bumped by hand.

Verification

  • All four .github files audited locally with zizmor 1.30.1: zero findings under regular, pedantic and auditor personas, --strict-collection on.
  • persist-credentials: false on the check-submodules job is the one behavioural change to watch: all submodules are public, so git submodule update --remote should not need the job token. The existing "Check submodules" job on this PR is the test.
  • scripts/enforce-zizmor-check.bash: bash -n, the ruleset JSON parsed, --dry-run prints the intended calls. It could not be run against the API from the sandbox (no gh login), so the first real run is the test; it is idempotent.

Next

Phase 2 (one chore/zizmor PR per SDK) is open in every SDK repository; see the plan's status notes. After those merge, run scripts/enforce-zizmor-check.bash once.

@Denis-Averin
Denis-Averin requested a review from a team as a code owner November 4, 2026 06:53

Denis-Averin commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

CI status note: "Check swagger specification up-to-date" is red, and it is not this PR's.

What fails: the check-swagger job curls https://api.aspose.cloud/v4.0/barcode/swagger/spec and diffs it against spec/aspose-barcode-cloud.json. The diff in the job log shows content the live API now serves that the committed spec does not have: BatchGenerateRequest, BatchGenerateItem, BatchArchiveFormat, a new JapanPost enum value.

Why it is not this PR's: this PR does not touch spec/ or that job's command (only persist-credentials: false on the checkout step, which ran fine). The same strings are absent from spec/aspose-barcode-cloud.json on main as well (fcbac0f, Release 26.10), so main would fail the same way on a re-run. The last green run on main was 2026-10-19; the live API changed after that.

Fix: none inside this PR. The spec is refreshed by make update (scripts/update_swagger_spec.bash), which is the first step of the release flow and regenerates the SDKs, so it belongs in the next release branch rather than here. Until then this check stays red on every PR against main.

Everything else on this head is green: Run zizmor, Check all submodules up-to-date (with persist-credentials: false), Check all URLs, Dependabot config validation.

Document how to adopt zizmor (GitHub Actions static analysis) in the
codegen repository and the nine SDK repositories: what zizmor is, the
measured baseline (156 findings across 30 workflows with zizmor 1.30.1),
the required workflow changes per rule, validated templates for the
zizmor workflow, config and Dependabot file, a phased rollout, open
decisions, and SHA pins for every action currently in use.
Record the five decisions taken on 2026-11-04 and update the plan
accordingly: SHA pins only for third-party actions (actions/* stay on
tags via config policy), plain-mode gate without SARIF upload,
TEST_CONFIGURATION_ACCESS_TOKEN allowlisted in the shared config,
templates synced from codegen through the generate scripts, Dependabot
limited to the github-actions ecosystem. Baseline recomputed with the
agreed configuration (95 findings instead of 156); templates re-validated
with zizmor under all three personas.
Pilot of the zizmor rollout plan in this repository:

- New workflow zizmor.yml runs zizmorcore/zizmor-action in plain mode on
  push, pull_request and weekly schedule; the job fails on any finding.
- New .github/zizmor.yml: actions/* may stay on tags, everything else
  must be SHA-pinned; TEST_CONFIGURATION_ACCESS_TOKEN allowlisted.
- New .github/dependabot.yml for the github-actions ecosystem (weekly,
  grouped, 7-day cooldown).
- check-codegen.yml and check-urls.yml: explicit `permissions:
  contents: read`, `persist-credentials: false` on every checkout,
  job names and a concurrency group.
@Denis-Averin
Denis-Averin force-pushed the claude/nifty-euler-t2swme branch from 573a58a to 09b5bfb Compare November 4, 2026 09:16
@Denis-Averin
Denis-Averin deleted the claude/nifty-euler-t2swme branch November 4, 2026 09:23
@Denis-Averin Denis-Averin reopened this Nov 4, 2026
@Denis-Averin
Denis-Averin force-pushed the claude/nifty-euler-t2swme branch 3 times, most recently from fb6424e to ef9bd67 Compare November 4, 2026 09:40
Canonical copies of the zizmor workflow, zizmor config and Dependabot
config now live in codegen/github/. scripts/sync-github-templates.bash
copies them into a repository checkout and is called from every
codegen/generate-<lang>.bash next to the LICENSE copy, so make sdk keeps
all SDK repositories identical. make sync-github does the same for this
repository and all submodules at once, and make zizmor audits the whole
fleet with the shared config.

check-codegen.yml gets a check-github-templates job that fails when this
repository's .github/ drifts from the templates. AGENTS.md documents the
rules: templates are the source of truth, third-party actions are
SHA-pinned, permissions are explicit, make zizmor before pushing.
Matches the badge added to each SDK repository's README in the Phase 2
pull requests, so the next make sdk reproduces it.

Denis-Averin commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

CI status note: "Check all submodules up-to-date" turned red on the last two pushes, and it is not this PR's.

What fails: the job runs git submodule update --recursive --remote and then git diff --exit-code. Since 11:06 UTC the main branches of two SDKs have moved past the commits this repository points to: .NET (c7b05a3 → 510b4b9, PR Aspose.BarCode-Cloud-SDK-for-.NET#135) and Node.js (04f2af1 → f3e55f2, PR Aspose.BarCode-Cloud-SDK-for-Node.js#159), both the ln -F fixes for the Ubuntu 26.04 runners. The diff is those two pointer changes, so main fails the same way; the previous run on this PR (10:5x UTC, before the merges) was green with the same workflow file.

Why it is not this PR's: the PR does not touch submodules/ or .gitmodules, and the job's own change here (persist-credentials: false) worked on every earlier run.

Fix: a submodule bump, as in the "Update … submodule" commits on main:

git submodule update --remote submodules/dotnet submodules/node
git commit -am "Update dotnet and node submodules"

Not pushed here, since it is unrelated to zizmor; it belongs in its own PR against main, ideally once the Java, PHP and Python ln -F PRs are merged too, so one bump covers all five. "Check swagger specification up-to-date" is skipped while this job is red and remains the separate release item noted above.

Denis-Averin commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor Author

The submodule bump is PR #160 (dotnet, java, node, php and python, all five ln -F fixes are merged now). "Check all submodules up-to-date" stays red here until #160 is merged and main is brought into this branch.

Decision 5 revised: zizmor goes out without Dependabot for the time
being. Remove the template and this repository's copy, stop syncing it,
and note in the plan that the action pins are bumped by hand.
- doc/ci-security.md: the CI security requirement and how this repository
  satisfies it; new row in cloud-sdk-requirements.md.
- ReleaseWorkflow.md: run make zizmor before cutting release branches.
- scripts/enforce-zizmor-check.bash: with an organization owner's gh login,
  creates or updates a "zizmor" ruleset on every repository's default
  branch that requires the "Run zizmor" check (repository admins keep a
  bypass for the direct release pushes) and sets the organization's default
  GITHUB_TOKEN permissions to read-only. Supports --dry-run.
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