Repository navigation
fix(security): resolve moderate+ audit advisories (v0.1.1) - #3
Merged
Merged
Conversation
Resolve every pnpm audit advisory rated moderate or higher (20 total: 4 critical, 6 high, 8 moderate); the single remaining low (esbuild) is below the fixed threshold. - bump zod ^3.24.2 -> ^4.6.6 (production dep): GHSA-mrhx-c7xc-m3w5 (memory exhaustion) is patched only in the 4.x line, and pnpm overrides do not protect published-package consumers, so the declared range is bumped rather than only overridden - adapt formatZodError to zod 4 ZodIssue.path (ReadonlyArray<PropertyKey>), keeping the DTS build and tests green; public API unchanged - apply pnpm audit --fix (override) for transitive dev deps: handlebars, tinypool, vitest/@vitest/mocker, vite, postcss, source-map-js, nanoid, recorded in pnpm-workspace.yaml - approve build scripts (@biomejs/biome, esbuild, lefthook) via allowBuilds so pnpm install and the lefthook pre-commit hook pass - bump version to 0.1.1 and document the fixes in CHANGELOG
The security fix added a config-only pnpm-workspace.yaml (overrides, allowBuilds, minimumReleaseAgeExclude), which is a pnpm 10.4+/11 feature. pnpm 9 treats any pnpm-workspace.yaml as a workspace and requires a `packages:` field, so `pnpm store path` (run by actions/setup-node cache) failed with "packages field missing or empty". Align CI with the local toolchain (pnpm 11.18, lockfileVersion 9.0 which is compatible) by bumping pnpm/action-setup from 9 to 11 in every workflow that installs dependencies.
pnpm 11 (11.29+) requires Node.js >= 22.13; the workflows ran Node 20, so `pnpm store path` crashed with ERR_UNKNOWN_BUILTIN_MODULE (node:sqlite). Bump actions/setup-node to Node 22 in every workflow, matching the local toolchain. The package's runtime support (engines.node >=20) is unchanged, since the Node 22 requirement is only for the pnpm dev toolchain.
Owner
Author
|
Aprobada |
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
Resolves every
pnpm auditadvisory rated moderate or higher (20 total: 4 critical, 6 high, 8 moderate). The single remaininglowadvisory (esbuild dev-server file read on Windows) is below the requested threshold and left untouched.Version bumped
0.1.0 → 0.1.1(semver security patch) and documented inCHANGELOG.md.Changes
^3.24.2→^4.6.6(production dependency). GHSA-mrhx-c7xc-m3w5 (high: memory exhaustion validating oversized constrained collections) is patched only in the 4.x line — no 3.x fix exists. Sincepnpmoverrides do not protect consumers of the published package, the declared range was bumped, not just overridden.formatZodErrornow types issue paths asReadonlyArray<PropertyKey>and stringifies each segment, matching zod 4'sZodIssue.path(PropertyKey[]). PublicGitCommitConfigAPI unchanged.pnpm audit --fix(override), recorded inpnpm-workspace.yaml: handlebars^4.7.10(JS injection, critical/moderate), tinypool^2.1.1/2(prototype pollution → RCE, critical), vitest/@vitest/mocker^4.1.11/12(code injection, path traversal, moderate), vite^7.3.7(fs.allow bypass, moderate), postcss^8.5.18/23(path traversal, high/moderate), source-map-js^1.2.2(DoS, high), nanoid^3.3.16/18(infinite loop, high).@biomejs/biome,esbuild,lefthook) viaallowBuildsinpnpm-workspace.yamlsopnpm installand the lefthook pre-commit hook pass.Verification
pnpm audit --audit-level moderate→ 0 advisories moderate+ (was 20); 1 low remains.pnpm test→ 21 passed (2 files), with vitest 4 + zod 4.pnpm build(tsup + DTS) → success.pnpm biome checkon changed files → clean.