security: harden supply-chain and CI configuration#256
Open
IzumiSy wants to merge 1 commit into
Open
Conversation
e47a58b to
2c8ac68
Compare
commit: |
0bb07c1 to
f6d99f7
Compare
- Add pnpm supply-chain settings (minimumReleaseAge, blockExoticSubdeps, trustPolicy, strictDepBuilds, onlyBuiltDependencies) - Add .npmrc with save-exact=true - SHA pin all GitHub Actions (checkout, setup-node, lychee-action) - Add persist-credentials: false to all checkout steps - Use --frozen-lockfile for all pnpm install in CI - Replace npx turbo with pnpm exec turbo - Remove cache from release job (PR/release cache separation) - Move react/react-dom from dependencies to devDependencies (peerDeps only)
f6d99f7 to
a428f3b
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.
Summary
Harden pnpm configuration and CI workflows against supply-chain attacks, and upgrade to pnpm 11.
Changes
Upgrade to pnpm@11.1.2
packageManagerbumped frompnpm@10.24.0topnpm@11.1.2.npmrc(pnpm 11 only reads auth/registry from.npmrc; other settings moved topnpm-workspace.yaml)pnpm supply-chain settings (
pnpm-workspace.yaml)The following are enabled by default in pnpm@11 and intentionally omitted:
blockExoticSubdeps: truestrictDepBuilds: trueminimumReleaseAge: 1440(1 day)verifyDepsBeforeRun: installExplicitly configured:
minimumReleaseAge: 4320(3 days, stricter than default 1 day)trustPolicy: no-downgrade- detect provenance/publisher trust downgradessaveExact: true- save exact versions when adding dependenciesallowBuilds- explicitly deny all lifecycle scripts (esbuild, @swc/core, sharp, protobufjs, msw, @tailor-platform/sdk, @prisma/engines). pnpm resolves optionalDependencies correctly so these fallback scripts are unnecessary.CI hardening
actions/checkout@v4(11bd719) + addpersist-credentials: falseactions/setup-node@v4(49933ea)lycheeverse/lychee-action@v2(82202e5)npx turbowithpnpm exec turbopackages/corereact/react-domfromdependenciestodevDependencies(existingpeerDependenciesdeclaration is unchanged)