Skip to content

chore: update bumpy to 1.17.0 + adopt split release workflow#837

Merged
theoephraim merged 6 commits into
mainfrom
chore-update-bumpy
Jun 25, 2026
Merged

chore: update bumpy to 1.17.0 + adopt split release workflow#837
theoephraim merged 6 commits into
mainfrom
chore-update-bumpy

Conversation

@theoephraim

@theoephraim theoephraim commented Jun 25, 2026

Copy link
Copy Markdown
Member

Updates @varlock/bumpy and brings our CI in line with bumpy's current recommended setup.

Version bump

  • Bumps @varlock/bumpy from ^1.10.2 to ^1.17.0.
  • Adds @varlock/bumpy to minimumReleaseAgeExcludes in bunfig.toml so a freshly-published release isn't blocked by the 1-day minimum-release-age check.

Split release workflow

  • Splits release.yaml into dedicated version-pr and publish jobs. plan (read-only) computes the mode; each downstream job runs bumpy ci release --expect-mode <mode> so a mode mismatch fails loudly, and each is scoped to only the permissions it needs.
  • Pins bumpy to the version committed on main across the release jobs.

Hardened PR check (bumpy-check.yaml)

  • New pull_request_target workflow that posts the release-plan comment, including on fork PRs (a plain pull_request gives forks a read-only token, so the comment couldn't post before).
  • Treats PR content as untrusted data only, following bumpy 1.17.0's pattern: checks out the trusted base at the root, the PR head isolated in ./pr, and runs bunx … ci check --cwd ./pr from the root. This stops a malicious fork's bunfig.toml/.npmrc/preload from hijacking package resolution and getting code execution in the elevated job.
  • Removes the inline check from test.yaml and drops its now-unneeded pull-requests: write.

Note: pull_request_target workflows run from the base branch, so bumpy-check.yaml only takes effect once merged — expect no bumpy comment on this PR.

@theoephraim theoephraim changed the title chore: update @varlock/bumpy to ^1.16.0 chore: update @varlock/bumpy to ^1.16.1 Jun 25, 2026
- Split the release workflow into dedicated version-pr and publish jobs,
  each asserting its mode with 'ci release --expect-mode' and scoping
  permissions to what it needs.
- Pin bumpy to the version committed on main across release jobs.
- Move the PR release-plan check into its own pull_request_target workflow
  (bumpy-check.yaml) that runs a base-pinned bumpy with no install step, so
  it posts on fork PRs without executing PR code with write permissions.
@theoephraim theoephraim changed the title chore: update @varlock/bumpy to ^1.16.1 chore: update bumpy to 1.16.1 + adopt split release workflow Jun 25, 2026
Comment thread .github/workflows/bumpy-check.yaml Fixed
Run bumpy from a trusted base checkout and read PR files as data only:
- check out base 'main' at the root (trusted bunfig.toml / lockfile)
- check out PR head isolated in ./pr, never executed
- run bunx from root with 'ci check --cwd ./pr'

Prevents a malicious fork's bunfig.toml/.npmrc/preload from hijacking
package resolution and achieving code execution in the pull_request_target
job (which holds a pull-requests:write token).
@theoephraim theoephraim changed the title chore: update bumpy to 1.16.1 + adopt split release workflow chore: update bumpy to 1.17.0 + adopt split release workflow Jun 25, 2026
Comment thread .github/workflows/bumpy-check.yaml Dismissed
Comment thread .github/workflows/bumpy-check.yaml Fixed
Resolve the pinned bumpy version straight into the bunx invocation instead
of writing it to $GITHUB_ENV. The value comes from the trusted base
package.json, but removing the env write eliminates the env-injection sink
CodeQL flags for pull_request_target workflows.
@theoephraim theoephraim merged commit 4cb25a3 into main Jun 25, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants