Repository navigation
CI guardrails: standard as code, ci-auditor, reusable policy/rust/image/dry-run workflows (WI-3087) - #9
Merged
Conversation
The CI guardrails standard as code: 24 rules (CI-01..CI-24) with a machine check each, runner capability classes, and an exemptions file with a schema (repo, rule, reason, owner, expiry; at most 180 days; expired entries suppress nothing). auditor/ is the one checker: `ci-auditor lint` runs the static rules in a checkout (the policy gate), `ci-auditor serve` audits every org repository hourly and exports Prometheus metrics and JSON finding lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…flows (WI-3087) policy.yml runs actionlint, ci-auditor lint and the author/committer identity check in the caller's repository, report-only until the caller sets enforce. rust-ci.yml, image.yml and release-dry-run.yml are the minimal shared builds the standard points at. ci-auditor.yml tests the auditor, dogfoods the lint, and publishes the ci-auditor image on tags. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dupe findings Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…own standard (WI-3087) ci-standard/README.md: the rule table, runner classes, exemption format, auditor design (Python exporter, why not CronJob+pushgateway), what a read-only token cannot see (admin:org gaps), and the report-then-enforce rollout with the per-repo migration order and the 16 quick wins folded in. This repository now passes its own lint in enforce mode: timeouts and concurrency on the legacy workflows, no CI re-run on push to main, the self-audit on ubuntu-24.04 (public repo), and three dated exemptions for the legacy gate, self-pinning and the image dry run. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…3087) The legacy runner-policy gate (still the required check here) predates the 2026-11-02 decision allowing hosted runners in public repos, and its line-based parser reads a reusable workflow's `runs-on` input key as a runner selection. Dated exceptions until the legacy gate is retired; ci-auditor CI-05 judges these files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
CI guardrails framework, part 1 of 2 (WI-3087). The ops side, which deploys the auditor and adds dashboards and alerts, is a separate PR on Forgejo
indexarr/ops.How this lands: github-policy isn't on graft, so this goes as a
vogt-agent/branch plus PR, per the WI-3087 brief. Rebase-merge it, so each commit lands as its own commit.What's in it
ci-standard/rules.yamlhas 24 rules,CI-01…CI-24. Each has a statement, severity, kind (static, settings or runtime), a machine check and a fix. It also holds the runner capability classes: ci-small, rust-heavy, docker, bigmem, publish, tailnet, windows, graft-dev, and hosted (public repos only, pinned images).ci-standard/exemptions.yamlplus its JSON schema. Each exemption names one repo, one rule, a reason, an owner, and created/expires dates (at most 180 days apart). An expired entry suppresses nothing. The 4runner-exceptions.jsonentries are carried over. The graft CI-10 exemption (squash queue) expires 2026-11-16.ci-standard/README.mdcovers the rule table, auditor design, visibility gaps (admin:org) and the rollout plan with the per-repo migration order, with the 16 quick wins folded in.auditor/isci-auditor(Python 3.13,mypy --strict, 53 pytest tests, ruff):lintis the in-repo gate;serveis the org-wide exporter;validatechecks rules and exemptions;identitychecks author, committer, paths and content, never commit bodies.policy.yml: actionlint (pinned, checksum-verified),ci-auditor lintand identity. Report-only untilenforce: true.rust-ci.yml: rust-cache withsave-ifmain only, and nextest.image.yml: BuildKit registry cache written from main only, and push by digest.release-dry-run.yml: release preflight.templates/ci-gate.yml(the standard CI shape, withcias the only required context),policy-stub.ymlandrelease-dry-run-stub.yml..github/workflows/ci-auditor.ymlruns this repo's own checks onubuntu-24.04. It builds the image in the merge queue and pushesghcr.io/thedancingdeveloper-org/ci-auditor:<tag>on tags.[self-hosted], self-pinning, and the image dry run.The legacy
runner-policy-reusable.ymlandrunner_policy.pyare unchanged, apart from a timeout. Existing callers see no difference.Verified
uv run ruff check,ruff format --check,mypy(strict) andpytest(53 passed) inauditor/.actionlint -config-file ci-standard/actionlint.yamlis clean on every workflow here.ci-auditor validate: 24 rules, 9 classes, 8 exemptions.docker build -f auditor/Dockerfile .builds, andvalidateruns in the image.serve --once): 80 repos in 391 s, 1,920 results, 608 failing.Not verified
policy.ymlhasn't run in a caller yet; the first adopter is the test.ci-smallrunner may not havepython3-venv. If it doesn't, the policy job's install step fails, and it should run on[self-hosted, rust-heavy]via theruns-oninput until the image is updated.After merge (oversight)
v1.0.0. The tag push builds and pushesghcr.io/thedancingdeveloper-org/ci-auditor:v1.0.0.🤖 Generated with Claude Code