Repository navigation
ci: audit npm dependencies in Security Audit, and clear main's high and critical advisories - #242
Merged
Merged
Conversation
The weekly Security Audit covered Go (govulncheck), cargo-deny and cargo-audit, but nothing read pnpm-lock.yaml, so main carried 107 npm advisories (63 high, 2 critical) unseen; #233's push audit found them. - New job `pnpm-audit`: `pnpm audit --audit-level=high` against the lockfile alone (nothing installed, so no package script runs); every workspace importer counts, examples and benchmark/app included. - Pull requests that touch any package.json, pnpm-lock.yaml or pnpm-workspace.yaml now trigger the workflow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`pnpm audit` on main (dc9db0d) found 107 advisories: 2 critical, 63 high, 34 moderate, 8 low. After this commit, `pnpm audit --audit-level=high` exits 0 with 4 left, all below the gate (1 low esbuild, 3 moderate vitest). - examples/playground: electron ^41.2.2 -> ^44.9.3 (44.10.0); the 41 line has an advisory patched only at >=42.11.16, and from 42 on electron unpacks with @electron-internal/extract-zip, which drops extract-zip. electron-builder ^25.1.8 -> ^26.18.0 (app-builder-lib >=26.15.0, tar 7); electron-vite 6.0.0-beta.1 -> ^6.0.0. - @napi-rs/cli 3.6.2 -> 3.10.9 (js-yaml 5). It regenerates index.d.ts with one added declaration, `__napiBindingTarget`, and the generated, gitignored index.js loader that ships in @vibecook/truffle-native carries it from the next release. - In range, the floors raised by `pnpm update`: vite ^8.3.5, express ^4.22.3 (proxy-addr 2.0.8, body-parser 1.20.9), @typescript-eslint/* and typescript-eslint ^8.72.1. - The lock was regenerated by pnpm and never edited by hand: `install --lockfile-only`, `update`, then electron-builder removed and re-added (its auto-installed squirrel-windows peer stayed at 25.1.8 and kept app-builder-lib 25 alive), then `dedupe`. No overrides. - Locally (pnpm 10.20.0): frozen install, release:check, lint, format, build, test, and the playground typecheck all exit 0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
jamesyong-42
pushed a commit
that referenced
this pull request
Nov 1, 2026
#242 bumped @napi-rs/cli 3.6.2 -> 3.10.9 in crates/truffle-napi/package.json and regenerated pnpm-lock.yaml, but not the standalone npm lockfile that the NAPI Build workflow installs with `npm ci`. The 0.7.25 release's NAPI Build failed on every target ("lock file's @napi-rs/cli@3.6.2 does not satisfy @napi-rs/cli@3.10.9"), so @vibecook/truffle-native@0.7.25 was never published and the npm publish timed out waiting for it. Regenerated with `npm install --package-lock-only --ignore-scripts`; `npm ci` now installs @napi-rs/cli 3.10.9, and check-release-versions passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JZwaBuXD1phVAJsq2NMXu5
2 of 5 tasks
jamesyong-42
added a commit
that referenced
this pull request
Nov 1, 2026
#242 bumped @napi-rs/cli 3.6.2 -> 3.10.9 in crates/truffle-napi/package.json and pnpm-lock.yaml but not in the standalone npm lockfile that NAPI Build installs with `npm ci`, so the 0.7.25 NAPI Build failed on every target and @vibecook/truffle-native@0.7.25 was never published. Regenerated with `npm install --package-lock-only --ignore-scripts`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JZwaBuXD1phVAJsq2NMXu5
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.
truffle's Security Audit checked Go (govulncheck), cargo-deny and cargo-audit, but nothing read
pnpm-lock.yaml.maintherefore carried 107 npm advisories unseen: 2 critical (tar,proxy-addr), 63 high, 34 moderate and 8 low. #233's push audit found them.This PR adds a
pnpm auditjob and clears every high and critical advisory. After it,pnpm audit --audit-level=highexits 0, with 4 advisories left below the gate.The job (
ci:commit)pnpm-auditinsecurity-audit.ymlrunspnpm audit --audit-level=highagainst the lockfile alone. Nothing is installed, so no package script runs.benchmark/app.package.json,pnpm-lock.yamlorpnpm-workspace.yamlnow run the workflow, alongside its existing triggers.Where the high and critical findings came from (main dc9db0d)
examples/playgroundbenchmark/appcrates/truffle-napiexamples/express-over-meshThe bumps (
chore(deps):commit)@electron-internal/extract-zipinstead ofextract-zip, which has no patched version.crates/truffle-napi/index.d.tswith one added declaration,__napiBindingTarget: 'native' | 'wasm32-wasi' | 'wasm32-wasip1'. The generatedindex.jsloader is gitignored but ships in@vibecook/truffle-native, and from the next release it is 3.10.9's loader, which exports that constant.pnpm updateraised the floors to what it resolved): vite ^8.3.5; express ^4.22.3 (proxy-addr 2.0.8, body-parser 1.20.9); @typescript-eslint/eslint-plugin, @typescript-eslint/parser and typescript-eslint ^8.72.1.pnpm.overrides. The lockfile was regenerated by pnpm, never edited by hand.install --lockfile-only,update, then a remove and re-add of electron-builder, thendedupe.electron-builder-squirrel-windowspeer stayed locked at 25.1.8 throughupdate, and it kept the whole app-builder-lib 25 tree alive.Left below the gate
Tests
Run locally on 2026-10-27 (macOS arm64, pnpm 10.20.0) as CI
checkruns them. Every step exited 0:pnpm install --frozen-lockfile --ignore-scriptspnpm run release:check,pnpm run lint,pnpm run format:checkpnpm run build: all six packages, includingnapi build --platform --releasewith CLI 3.10.9 and the playground'selectron-vite buildpnpm run testpnpm --filter @vibecook/example-playground typecheckpnpm audit --audit-level=high: exit 0, with 4 vulnerabilities (1 low, 3 moderate)A choice for review
electron 44 rather than 45. 45.0.0 was published on 2026-10-21. 42.11.18, 43.8.3, 44.9.3 and 45.0.0 all came out that day with the same fixed dependency set, so 44 is the mature line that clears the audit.
🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.