Skip to content

CI hardening: pinned actions, wasm image, lint, Renovate - #115

Merged
Kinflou merged 1 commit into
masterfrom
ci-hardening
Nov 12, 2026
Merged

Kinflou merged 1 commit into
masterfrom
ci-hardening

Conversation

@Kinflou

@Kinflou Kinflou commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

Phase 4 of the org CI overhaul for the playground.

What changed

  • deploy.yml:
    • The build job runs in the ci-wasm image (by digest): Rust 1.99.1 with both wasm32 targets, wasm-bindgen 0.2.127, wasm-pack 0.15.1, binaryen. This removes rustup target add and the curl ... | sh wasm-pack installer. wasm-bindgen 0.2.127 is the version comline-simulator's prepare.sh asks for, so it installs nothing either.
    • Node 22.23.5 (was 22) through SHA-pinned setup-node; corepack enable provides yarn, which hands over to the committed Yarn 4.18.0 release (yarnPath).
    • Every action is pinned by SHA with a version comment. runs-on: ubuntu-24.04, timeout-minutes on every job, top-level permissions: contents: read, persist-credentials: false.
    • pages: write and id-token: write are on the deploy job only. harden-runner (audit) on that VM job; the build job is a container job, where harden-runner doesn't work.
    • Concurrency is keyed on workflow and ref and cancels in-progress runs on pull requests only; a push to master queues behind a running deploy instead of cancelling it (was cancel-in-progress: true for everything).
    • The build, tests and site build still run on pull requests. The Pages artifact upload and the deploy job are now gated to master as well as non-PR events, so a workflow_dispatch from another branch no longer deploys.
    • The cargo cache now holds /usr/local/cargo/{registry,git} and wasm/target, not ~/.cargo/bin (the tools live in the image).
  • New lint.yml (the org's reusable lint, actionlint plus renovate.json --strict).
  • New renovate.json extending the org preset. The preset already covers npm, Cargo and GitHub Actions. This repo adds two rules: npm git dependencies (comline-simulator, comline-examples) stay manual, like the Cargo rev = pins, and npm updates wait 3 days, which respects Yarn's npmMinimalAgeGate (one day by default in 4.18; it is not overridden).

What stayed as it was, and why

  • yarn install without --immutable, and checksumBehavior: update in .yarnrc.yml: the sim's WASM isn't byte-reproducible, per the existing comment.
  • The git clone of comline-rust at the pinned rev for the WASI generator: a source checkout, not a package install.
  • No Cargo.lock is committed (it is gitignored), so wasm-bindgen = "0.2" floats. wasm-pack used the image's CLI here (no download). If a 0.2.x newer than 0.2.127 is released, wasm-pack will fetch the matching CLI until the image is bumped.

Verified on this PR

The build job is green (wasm-pack, cargo tests, both wasip1 builds, sim install with its WASM build, yarn test, yarn build), as are lint and CodeQL. deploy is skipped, as it should be on a PR.

Only verifiable after merge

The first push to master runs the real upload-pages-artifact and deploy-pages (new SHAs, and Pages permissions now on the deploy job alone). No settings change is needed if Pages already deploys from Actions.

@Kinflou
Kinflou marked this pull request as ready for review November 12, 2026 01:00
@Kinflou
Kinflou merged commit d71775d into master Nov 12, 2026
8 checks passed
@Kinflou
Kinflou deleted the ci-hardening branch November 12, 2026 01:00
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