Repository navigation
zizmor: rollout plan and Phase 0 pilot - #159
Denis-Averin wants to merge 23 commits into
Conversation
|
CI status note: "Check swagger specification up-to-date" is red, and it is not this PR's. What fails: the Why it is not this PR's: this PR does not touch Fix: none inside this PR. The spec is refreshed by Everything else on this head is green: Run zizmor, Check all submodules up-to-date (with |
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.
573a58a to
09b5bfb
Compare
fb6424e to
ef9bd67
Compare
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.
|
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 Why it is not this PR's: the PR does not touch Fix: a submodule bump, as in the "Update … submodule" commits on 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 |
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.
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: runszizmorcore/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_TOKENallowlisted forsecrets-outside-env.check-codegen.yml,check-urls.yml: explicitpermissions: contents: read,persist-credentials: falseon every checkout, job names, concurrency group. This resolves all 6 zizmor findings this repository had.codegen/github/templates andscripts/sync-github-templates.bash(Phase 1): the canonical zizmor workflow and config, copied into every SDK bycodegen/generate-*.bashand checked by the new "Check shared GitHub config in sync" job.doc/ci-security.md(the CI security requirement and how this repository meets it, new row incloud-sdk-requirements.md), amake zizmorpre-flight step inReleaseWorkflow.md, andscripts/enforce-zizmor-check.bash, which an organization owner runs withghto 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 defaultGITHUB_TOKENto read-only..github/dependabot.ymlfor now; the action pins are bumped by hand.Verification
.githubfiles audited locally with zizmor 1.30.1: zero findings underregular,pedanticandauditorpersonas,--strict-collectionon.persist-credentials: falseon thecheck-submodulesjob is the one behavioural change to watch: all submodules are public, sogit submodule update --remoteshould 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-runprints the intended calls. It could not be run against the API from the sandbox (noghlogin), so the first real run is the test; it is idempotent.Next
Phase 2 (one
chore/zizmorPR per SDK) is open in every SDK repository; see the plan's status notes. After those merge, runscripts/enforce-zizmor-check.bashonce.