[Bug 44320] New: Update yarn.lock to fix critical and high npm advisories
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44320 Bug ID: 44320 Summary: Update yarn.lock to fix critical and high npm advisories Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org Target Milestone: --- The Jenkins job Koha_Main_node_audit fails: yarn audit reports many advisories, including critical ones in transitive (mostly development) dependencies: proxy-addr 2.0.7, shell-quote 1.8.3, websocket-driver 0.7.4, protobufjs and handlebars 4.7.8, plus high ones in lodash, body-parser, fast-xml-parser, form-data, mysql2, node-forge, path-to-regexp, ws and others. Most can be fixed by re-resolving yarn.lock within the existing semver ranges, plus a resolutions entry for handlebars (which @redocly/cli pins exactly). With this, advisories go from 662 to 139, critical from 17 to 0, high from 326 to 17. The remaining high ones need major version bumps and are tracked separately. Test plan: 1. yarn install --frozen-lockfile 2. yarn audit: no critical advisories 3. yarn build, then check the staff interface and OPAC load with CSS and JS intact 4. Run a few Cypress specs and check the REST API spec still bundles (yarn api:bundle) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44320 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |44322 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 212759 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212759&action=edit Bug 44320: Update yarn.lock to fix critical and high npm advisories Koha_Main_node_audit fails. This re-resolves the vulnerable transitive packages within their existing semver ranges (no package.json range changes) and pins handlebars with a resolution, as @redocly/cli depends on exactly 4.7.8: critical: proxy-addr 2.0.7 -> 2.0.8, shell-quote 1.8.3 -> 1.12.0, websocket-driver 0.7.4 -> 0.7.5 / 0.8.0, protobufjs -> 7.6.x, handlebars 4.7.8 -> 4.7.10 (resolution) high: lodash, body-parser, fast-xml-parser, form-data, mysql2, node-forge, path-to-regexp, ws, picomatch, js-yaml, nanoid, undici and others Advisories (yarn audit): 662 -> 139, critical 17 -> 0, high 326 -> 17. Remaining highs need major bumps: @faker-js/faker (>=10.5), @vue/server-renderer / vue (>=3.5.42), browserslist via gulp-autoprefixer, decode-uri-component via gulp-sourcemaps, postcss via @redocly/cli and gulp-autoprefixer, webpack-dev-middleware via webpack-dev-server, @opentelemetry/propagator-jaeger via @redocly/cli. Test plan: 1. yarn install --frozen-lockfile 2. yarn audit --groups dependencies devDependencies: no critical 3. yarn build (CSS and JS) and yarn cypress run for a few specs 4. Confirm the REST API spec still bundles (yarn api:bundle) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44322 [Bug 44322] Remaining high npm advisories need major version bumps -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44320 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44320 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44320 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |me@paulderscheid.xyz, | |pedro.amorim@openfifth.co.u | |k -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44320 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44320 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #212759|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44320 --- Comment #2 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 212767 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212767&action=edit Bug 44320: Update yarn.lock to fix critical and high npm advisories Koha_Main_node_audit fails. This re-resolves the vulnerable transitive packages within their existing semver ranges (no package.json range changes) and pins handlebars with a resolution, as @redocly/cli depends on exactly 4.7.8: critical: proxy-addr 2.0.7 -> 2.0.8, shell-quote 1.8.3 -> 1.12.0, websocket-driver 0.7.4 -> 0.7.5 / 0.8.0, protobufjs -> 7.6.x, handlebars 4.7.8 -> 4.7.10 (resolution) high: lodash, body-parser, fast-xml-parser, form-data, mysql2, node-forge, path-to-regexp, ws, picomatch, js-yaml, nanoid, undici and others Advisories (yarn audit): 662 -> 139, critical 17 -> 0, high 326 -> 17. Remaining highs need major bumps: @faker-js/faker (>=10.5), @vue/server-renderer / vue (>=3.5.42), browserslist via gulp-autoprefixer, decode-uri-component via gulp-sourcemaps, postcss via @redocly/cli and gulp-autoprefixer, webpack-dev-middleware via webpack-dev-server, @opentelemetry/propagator-jaeger via @redocly/cli. Test plan: 1. yarn install --frozen-lockfile 2. yarn audit --groups dependencies devDependencies: no critical 3. yarn build (CSS and JS) and yarn cypress run for a few specs 4. Confirm the REST API spec still bundles (yarn api:bundle) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44320 --- Comment #3 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 212768 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212768&action=edit Bug 44320: (follow-up) Remove stale yarn resolutions Several resolutions no longer do anything useful, and two of them force packages below the ranges their dependents ask for: - serialize-javascript is no longer in the dependency tree. - lodash and qs resolve to the same or newer versions without them. - @cypress/request ^3.0.0 forces Cypress's ^4.0.0 down to 3.0.10. - fast-xml-parser ^4.5.4 forces dependents asking for ^5 onto 4.5.x. Dropping them leaves the advisory counts unchanged (one low advisory fewer) and lets these packages resolve within their declared ranges. The remaining resolutions (handlebars, minimatch, form-data, braces, micromatch, js-yaml, undici) still prevent advisories and are kept. Test plan: 1. yarn install --frozen-lockfile 2. yarn audit --summary Expect no critical and 17 high advisories, as with the previous patch. 3. yarn build 4. yarn cypress run --spec 't/cypress/integration/ERM/Agreements_spec.ts' and a few other specs; they pass as before. Assisted-by: Opus 5.5 (Anthropic) Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org