Skip to content

ci: harden release build and workflow token permissions - #5359

Merged
JoviDeCroock merged 1 commit into
mainfrom
ci/harden-release-pipeline
Nov 12, 2026
Merged

JoviDeCroock merged 1 commit into
mainfrom
ci/harden-release-pipeline

Conversation

@JoviDeCroock

Copy link
Copy Markdown
Member

Hardens the workflows that build the published package.

  • No dependency cache for release builds. The cache was skipped for main but not for release tags, so tag builds restored a pnpm store written by runs on main. It is now only used for pull request builds.
  • Package before testing. The tarball is packed and uploaded right after pnpm run build, before tests and coverage tooling run in the workspace.
  • Coveralls reporter. Pinned to v0.6.22 instead of latest, and skipped on tag builds.
  • Token permissions. ci, size, benchmarks, run-bench and pr-reporter now declare least-privilege permissions instead of inheriting the repository default.

pr-reporter.yml runs on workflow_run, so its changes only take effect once this is on main.

- Only use the pnpm dependency cache for pull request builds. The previous
  condition excluded main but not release tags, so release builds restored a
  cache written by runs on main.
- Package and upload the npm tarball right after the build, before tests and
  coverage reporting run.
- Pin the Coveralls reporter binary and skip it on tag builds.
- Declare least-privilege GITHUB_TOKEN permissions in every workflow that
  relied on the repository default.
@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 99.858%. remained the same — ci/harden-release-pipeline into main

@JoviDeCroock
JoviDeCroock merged commit a2e03db into main Nov 12, 2026
5 checks passed
@JoviDeCroock
JoviDeCroock deleted the ci/harden-release-pipeline branch November 12, 2026 09:06
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.

3 participants