Conversation
A packed tarball carried nothing identifying the source it was built from, so a consumer vendoring the archives could not prove which commit it runs. Every archive now ships dist/provenance.json with the packing commit, and packing refuses a modified build input tree unless --allow-dirty marks the result. packages:pack runs the build in the same Node process as pnpm pack so the flag reaches the build's argv; pnpm appends script arguments to the end of a compound shell command, where they would land on pnpm pack. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
The security policy lived as prose in examples/better-auth/README.md and PACKAGES.md, phrased for a reader rather than a checker. State it once at the repo root as FAIL IF conditions, each naming what to inspect, and end each section with the tests that pin it, so a consumer's nightly audit can execute this file instead of reading the compiled tarballs. The prose stays where it is; it explains the same choices to a human. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Sep 22, 2026
Draft
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.
Stacked on #8 (
peer-dependencies). First of two PRs giving pgstencil its own security validation, so consumers can stop auditing the packed tarballs and verify the link instead.What
SECURITY.md— the packages' security guarantees as auditableFAIL IFrules (11 sections, 29 rules), each pinned to the integration or unit test that proves it. Every rule was checked againstpackages/auth/srcandpackages/pgstencil/srcbefore being written; claims the code does not make (e.g. the Facebook token-app validation, which happens upstream in Better Auth) went under "What is not defended" instead. The legacyAuth/createAuthHttp/native OAuth exports and@pgstencil/stripeare declared out of scope for now.packages:packnow refuses to build from a modified input tree (packages,scripts, tsconfigs, lockfile,compose.yaml,LICENSE,package.json) unless--allow-dirty, and every tarball carriespackage/dist/provenance.json={"commit": "<sha>"}(plus"dirty": trueonly for an allowed-dirty pack).packages:verifyfails when an installed package's provenance is not this checkout'sHEAD.PACKAGES.mddocuments the contract path (tar -xOf <tgz> package/dist/provenance.json).packages:packmoved from a compound shell script toscripts/pack-packages.ts, because pnpm appends--arguments to the last command of a compound script, so--allow-dirtycould never reach the build.Verified
pnpm format:check,typecheck,db:verify,test:unit, fullpnpm test(160 tests, Docker),packages:verify(installed provenance =HEAD), plus the dirty refusal and--allow-dirtypaths by hand. Ran on Node 26 locally; CI is the Node 24 run.Next
PR 2 adds the nightly
security-auditworkflow that executesSECURITY.md; dormouse#742's follow-up verifies the vendored commit's check run.🤖 Generated with Claude Code