Repository navigation
fix(release): state which jobs block egress, check the package's own prepare scripts, measure install size - #214
Merged
Conversation
…prepare scripts, measure install size - standalone.yml: the macOS build job runs Harden-Runner in audit mode (GitHub's macOS and Windows runners support no block mode); smoke blocks on Linux and audits elsewhere. SECURITY.md, RELEASING.md and the release.yml header name the jobs that block. - pack-check checks the published package as a project, the way the Homebrew formula's `npm ci` installs it: prepublish, preprepare, prepare, postprepare and dependencies too. publishedManifest drops the scripts pnpm pack leaves out. - SECURITY.md and the install pages: npm ignores the shrinkwrap for a downloaded tarball. - bench/install-size.mjs and its first result (turno-cli 0.1.1, 0.2.0, 0.6.3); the 0.2.0 release page cites it.
…s, add the tap bump - RELEASING.md: which jobs block, which audit and which run without Harden-Runner (the macOS jobs of ci, install and bench, and ci's Windows job); the Homebrew formula bump after every turno-cli release. - SECURITY.md and standalone.yml: only the embedded Node.js archives are checked against a checksum; setup-node and action-setup are pinned by action SHA. - The shrinkwrap test checks pack-check's view of the published manifest instead of the list. - bench/install-size.mjs records the load average; rerun result, and the 0.2.0 page cites the file sizes, which do not vary between runs as disk usage does.
william-monroy
force-pushed
the
fix/release-hardening-claims
branch
from
November 30, 2026 08:00
162918d to
4c50c76
Compare
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.
What and why
Four release claims checked against what actually happens, then fixed where they were wrong.
1. Egress: "every release job can reach only the hosts on its allow list" (false)
Harden-Runner's README (compatibility matrix, v2.23.0) lists GitHub-hosted macOS and Windows runners as audit mode only; block mode needs Linux. The standalone
buildjob runs onmacos-15and had no Harden-Runner step at all, and the macOS and Windows smoke jobs skipped it.standalone.yml: the macOSbuildjob now runs Harden-Runner inauditmode (connections logged in the insights page, not limited), with a comment on what protects it instead:contents: read, no id-token, no secrets. The smoke job usesblockon Linux andauditon macOS and Windows (it used to skip Harden-Runner there).release.ymlheader,SECURITY.mdanddocs/RELEASING.mdnow list Harden-Runner per job:release.yml, the Linux smoke job and the upload job ofstandalone.yml;ci.yml,install.yml,bench.yml,docs.yml,scorecard.ymlandzizmor.yml;ci.yml,install.ymlandbench.yml, and the Windows job ofci.yml(no steps added to CI workflows).2. Homebrew installs the tested versions (true, plus a caveat)
The formula (
wimo-dev/homebrew-turno,Formula/turno.rb, turno-cli 0.6.1) does not install the tarball withnpm install. It unpacks the package, removesdevDependenciesand runsnpm ci --omit=dev --ignore-scripts, andnpm cifollowsnpm-shrinkwrap.json. Reproduced with Node 26.13.0 and npm 11.20.0, each run in its own empty prefix with a throwaway HOME, npm cache and npmrc:npm ciin the package folder)npm install -g turno-cli@<v>(registry)npm install -g ./turno-cli-<v>.tgzhono4.13.17 to 4.13.23,router2.2.0 to 2.3.0, ...)So the README and install page claim holds, and the formula recipe needs no change. Nothing bumps the tap automatically, though: 0.6.2 and 0.6.3 never got a bump, so
brew install turnostill gives 0.6.1. wimo-dev/homebrew-turno#10 bumps it to 0.6.3 (the tarball's sha512 matches npm'sdist.integrity), anddocs/RELEASING.mdnow lists the tap bump as a step after every turno-cli release. The only exception is installing a downloaded.tgzby hand. The install pages (en, es) andSECURITY.mdnow name that case, since SECURITY.md tells readers tonpm packa tarball to verify it.3. Install-script check misses
prepare(partly true)What npm runs depends on how the package is installed. Sources: npm docs ("Life Cycle Operation Order",
npm install-scripts), arboristrebuild.js, pacotedir.jsandgit.js, and a run with npm 11.20 using a package that logs every lifecycle event:preinstall,install,postinstallonly.prepare,prepack,preprepare,postprepareandprepublishdo not run.prepare. A published tree never has one: every shrinkwrap entry resolves to a registry tarball.npm cior a barenpm installin its folder (the Homebrew formula's mode): alsoprepublish,preprepare,prepare,postprepareanddependencies.The check on dependencies was already complete. Adding
prepare/prepublishthere would fail on about 30 current dependencies (qs,ajv,express-rate-limit, ...) whose scripts npm never runs. The real gap was the published package itself.pack-checknow checks it against the project set.publishedManifestdrops the scriptspnpm packleaves out (prepare,prepack,postpack,prepublishOnly,publish,postpublish, checked with pnpm 12.2), so the check sees the manifest that actually ships. The new test inscripts/shrinkwrap.test.mjschecks pack-check's view: a source manifest with onlyprepareandprepackpasses once pnpm drops them, and apostpreparethat would ship is flagged.4. Package sizes (measured)
bench/install-size.mjsinstalls each version into an empty prefix with an empty cache, a throwaway HOME and empty npmrc files (--ignore-scripts). It records the load average at the start. Result:bench/results/2026-11-30-m3-16gb-install-size.json. Machine: Apple M3, 16 GB, macOS 27.2.1, Node v26.13.0, npm 11.20.0. Started 2026-11-30 06:41 UTC, load average 181.6 / 95.0 / 79.7 (shared machine). The load only affects the timings.du)An earlier run at 06:20 UTC had byte-identical file sizes and package counts, but
dugave 51.4 / 27.7 / 28.2 MiB. Disk usage varies between runs of the same tree; file sizes do not.The changelog's "about 52 MB down to 27 MB" matches disk usage in MiB, not MB of files. The 0.2.0 release page now cites the stable numbers (18.5 MB of files in 97 packages, down from 43.1 MB in 100) and links the result. The changelog files are left as published.
Changesets
None: no package code changes. Only release tooling (
scripts/), a bench script, workflows and docs change, as in earlier docs and bench pull requests.Checks
pnpm build && TURNO_SKIP_E2E=1 pnpm check(typecheck, Biome, knip, tests, em dash scan, node floor, changeset names, patchright guard, licenses)node scripts/pack-check.mjsactionlintonrelease.ymlandstandalone.yml. zizmor runs in CI on this pull request.standalone.yml, so CI runs the standalone dry run, macOS build with the new audit step included.