Skip to content

ci: shared workflows, CI images, hardening (phase 4) - #120

Merged
Kinflou merged 4 commits into
mainfrom
ci-hardening
Nov 11, 2026
Merged

Kinflou merged 4 commits into
mainfrom
ci-hardening

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Phase 4 of the org CI overhaul for runtime: the shared reusable workflows, the CI images by digest, and hardening of every workflow.

Moved to the org's reusable workflows

All pinned to ComlineProject/.github 797d473553d7f2fc50895bb2573acb83ac63c7cb.

  • build_test.yml: rust-ci.yml replaces the stable/beta/nightly matrix, stable on the other platforms and the ubuntu-26.04 canary (the repo's one canary, continue-on-error). Inputs: --locked build and test args, features: tokio for comline-runtime. The separate cargo metadata --locked step is gone; --locked on every build and test covers it.
  • bench.yml: bench.yml runs the instruction-count gate (base and head, same job, limit-percent: 1, the ledger runtime/core/benches/accepted-regressions.toml, the report script's targets, so the FFI bench is gated as before) and the publish to the reports branch. bench-command: cargo +stable bench is how the base override is expressed: base and head are both built with the image's stable (1.99.1), whatever rust-toolchain.toml says. Without it, this PR's base (main, pinned 1.98.0) would be built with another compiler than the head, which moves counts far more than the limit.
  • fuzz.yml: fuzz.yml runs the per-target fuzz jobs, the report and the publish. The target list is still the fuzz crate's [[bin]]s through .github/scripts/fuzz-targets.py (a targets job), so that stays the single source.
  • lint.yml (new): actionlint, and renovate.json checked with --strict.

Kept local, and why

  • properties and sizes (fuzz.yml): runtime's own proptest jobs; they run in the ci-fuzz image. properties writes the fuzz-stats-proptest fragment the reusable report combines, so the fuzz call has needs: [targets, properties] (and if: !cancelled() && needs.targets.result == 'success', since properties is skipped on a pull request).
  • specs (ci-tools: cue), ffi (ci-tools: cbindgen, gcc, make; the wasm32 target is added with rustup target add), wasm32 core (ci-wasm): runtime-specific jobs; each runs in the image that has its tool, so no apt or curl-pipe installs remain.
  • ffi miri: on the VM; no image has miri. ffi_platforms (Windows, macOS, arm Linux): no container possible; cbindgen is built with cargo install --locked there.
  • reports.yml: runtime-specific Observatory reports, on the VM; hardened only.
  • Container jobs have no harden-runner (it hardens the VM; the container's job runs inside it). Every VM job has it as the first step, egress-policy: audit.
  • Jobs that push to the reports branch (the publish jobs) are the only ones with persist-credentials left on, and the only ones with contents: write.

Other changes

  • Rust pin: rust-toolchain.toml 1.98.0 -> 1.99.1 (edited, no cargo update). Container jobs that don't need clippy or rustfmt set RUSTUP_TOOLCHAIN: stable, the image's 1.99.1, so the file's components aren't fetched.
  • Hardening everywhere: runs-on: ubuntu-24.04 (macOS and Windows pinned to macos-15 and windows-2025), top-level permissions: contents: read, concurrency by workflow and ref with cancel-in-progress on pull requests only, timeout-minutes on every job, every uses: a 40-hex SHA with a version comment, and a defaults: run: shell: bash on the workflows with container jobs (container steps default to sh).
  • renovate.json extends github>ComlineProject/.github:renovate-config.
  • grep -rn 'apt-get\|brew install\|choco install\|curl .*| *sh' .github/ is empty. The Windows make step is now a command -v make check: the runner image has MinGW's make.

Bench history

There are no committed baselines. The gate compares base and head inside one job on one image, so the move from Ubuntu valgrind 3.22 to Debian 3.24 doesn't touch it. The published history on the reports branch will step on the first push to main after merge: valgrind 3.24 shifts counts by up to about 0.44%, and rustc 1.98.0 -> 1.99.1 shifts some by more (the PR's report against the published one shows 160 of 173 benchmarks changed, from -32% to +28%, mostly the compiler and code since 7fd4523, which can't be separated from valgrind in this comparison). Nothing is regenerated and no threshold is loosened.

Required checks: names change

The ruleset's required checks need updating at merge time. Old to new:

  • Rust project - stable / beta / nightly -> ci / test (stable) / ci / test (beta) / ci / test (nightly)
  • fuzz (<target>) -> fuzz / fuzz (<target>), for decode_no_panic, ffi_comline2, ffi_feed, ffi_vs_core, framing_decode, packed_canonical, seed_vs_derive, sizes_vs_core, stream_split
  • instruction counts -> bench / instruction-count gate
  • Unchanged: ffi, ffi miri, wasm32 core. New and optional: lint / actionlint, lint / renovate-config.json, conformance specs.

Not exercised on this PR

The nightly-only paths: the properties job (nightly proptest with its report fragment), the fuzz report's publish, and the issue-opening steps. A manual bench run from this branch did the publish as a dry run and passed.

@Kinflou Kinflou closed this Nov 11, 2026
@Kinflou Kinflou reopened this Nov 11, 2026
@Kinflou
Kinflou marked this pull request as ready for review November 11, 2026 22:41
@Kinflou
Kinflou merged commit b070382 into main Nov 11, 2026
58 checks passed
@Kinflou
Kinflou deleted the ci-hardening branch November 11, 2026 22:42
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