chore(ci): harden workflows and bump packageManager to pnpm@11.1.1#451
Closed
AlemTuzlak wants to merge 1 commit into
Closed
chore(ci): harden workflows and bump packageManager to pnpm@11.1.1#451AlemTuzlak wants to merge 1 commit into
AlemTuzlak wants to merge 1 commit into
Conversation
Author
|
Closing in favor of a fresh PR — the original branch picked up a duplicate zizmor workflow already covered by #450. Will re-open with corrected scope (SHA pin / permissions / persist-creds / timeouts / concurrency + pnpm@11.1.1 only). |
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
Hardens GitHub Actions workflows against common CI/CD attack vectors (action pinning, permissions, persist-credentials, timeouts, concurrency) and migrates the package manager to pnpm 11.1.1. Adds a
zizmorworkflow to lint future workflow changes for security weaknesses.Findings & fixes applied
.github/workflows/check-skills.yml(actions/checkout, actions/setup-node).github/workflows/validate-skills.yml(actions/checkout, actions/setup-node).github/workflows/notify-intent.yml(actions/checkout, peter-evans/repository-dispatch).github/workflows/pr.yml(actions/checkout, danielroe/provenance-action, nrwl/nx-set-shas).github/workflows/release.yml(actions/checkout).github/workflows/e2e-opportunistic-matrix.yml(actions/checkout, actions/upload-artifact)permissions: contents: readblocks to 2 workflows that previously inherited the write-all default:validate-skills.yml,notify-intent.yml.persist-credentials: false— added to 5actions/checkoutinvocations in PR/scheduled jobs that do not push back:pr.yml(3 jobs),e2e-opportunistic-matrix.yml,notify-intent.yml,validate-skills.yml. NOT added torelease.yml(release job pushes version updates back) orcheck-skills.yml(opens PR withgh).timeout-minutes:— added to every job that lacked one: 15 min (general), 30 min (unit tests), 45 min (E2E and release).cancel-in-progress: true— added tovalidate-skills.yml(PR-triggered). Existing concurrency onpr.yml,release.yml,e2e-opportunistic-matrix.ymlleft untouched..github/workflows/zizmor.ymlto lint workflows for security weaknesses on push tomainand on every PR.Findings deferred (need maintainer review)
release.ymlhasconcurrency: cancel-in-progress: true— best-practice guidance is to avoid cancelling release/publish workflows mid-run (a cancelledchangeset publishcan leave inconsistent npm/git state). Left as-is because the change is judgmental and could affect existing release semantics; maintainers may want to switch to a queue (e.g. dropcancel-in-progressor set it tofalse).tanstack/config/.github/setup@mainfloats on a branch — used bypr.yml,release.yml,e2e-opportunistic-matrix.yml. This is a TanStack-owned reusable composite action; per blitz policy, internal TanStack actions are left alone. Worth a future pass to pin to a tag/SHA.packages/createhas 2 tests (findFilesRecursively,should create an app - not silent) that fail on Windows because they compare hardcoded POSIX paths againstpath.resolve()output. Verified to fail onmainwithout any of this PR's changes. Unrelated to CI hardening; flagged here for awareness.pnpm bump
packageManager:pnpm@10.24.0->pnpm@11.1.1(integrity hash written bycorepack use pnpm@11.1.1).pnpm install: succeeds.onlyBuiltDependenciesallowlist added with 3 entries:esbuild,nx,unrs-resolver. Rationale:esbuild— native binary used by the build/test toolchain (vitest/tsx transitively).nx— primary monorepo task runner used bypnpm build,pnpm test:unit,pnpm test:e2e.unrs-resolver— native module resolver used by ESLint config / nx; install fails to wire correctly without its postinstall.pnpm.overridesmigration: moved 1 field (overrides, 7 workspace pin entries) frompackage.jsonto top-levelpnpm-workspace.yaml.package.jsonpnpmblock deleted (now empty).pnpm-workspace.yamlis the recommended location in pnpm 11 for workspace repos.tanstack/config/.github/setup@mainwhich derives pnpm frompackageManager; no workflow pins to a pnpm version.Validation
pnpm-workspace.yaml).zizmor.yml.pnpm install: succeeds with no "Ignored build scripts" output.pnpm build: succeeds (all 10 nx targets build).pnpm test:unit: 2 pre-existing Windows-only failures (see deferred). All other 195 tests pass.What I did NOT change
.npmrcedits — pnpm 11 install was clean without warnings.tanstack/config/.github/setup@main(internal reusable action).