Repository navigation
fix(deps): patch high-severity advisories in CMS dependency tree - #29
polylane[bot] wants to merge 3 commits into
Conversation
Co-authored-by: polylane[bot] <277585245+polylane[bot]@users.noreply.github.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
@felixwidjaja Verdict: pass. No production path regresses from this pull request, so the production impact check is green for head Details: The deciding evidence is that no deployed resource node exists for this repository, and every changed module was verified to still load and run. The change reaches only What I checked at this head:
What changed since my last assessment: the head added commit Not run: |
ecv
left a comment
There was a problem hiding this comment.
Approve.
package.json and package-lock.json agree on every dependency, and the lock resolves the advisory packages to the patched versions the PR names. Several resolve across major versions, and the repo has no CI that builds or tests them.
- Majors moved:
nodemailer9.0.1 to 10.1.4,webpack-dev-middleware6.1.3 to 7.4.6, and the@graphql-tools/utilsoverride collapses@apollo/server's nested 9.2.1 and the top-level 10.11.0 into 12.0.2. Upstream manifests did not declare these ranges, so none is covered by a compatibility promise. The PR says GraphQL, Apollo, session, mailer and dev-middleware load and run. engines.nodegoes from>=20.0.0to>=22.19.0. Strapi Cloud reads the Node version from its dashboard, notengines, so confirm that setting is 22.19 or newer before merge or the deploy build breaks.koa-bodyandkoa-sessionstay on nestedzod@3.25.76, as the PR states.
Follow-ups:
- Add a CI job that runs
npm ciand a Strapi build, so an advisory fix like this has a check at its head. - Send a test email and open an admin edit page after deploy, since the mailer and dev-middleware majors have no test coverage.
|
@ecv I can help with this once you have access to the Datum workspace. Already have a Polylane account? Link your GitHub account and I'll pick this up. |
|
Superseded by #35. |
The Strapi SDK pins several transitive dependencies to exact vulnerable versions, so a plain install cannot move them and Dependabot reports seven high alerts. Overrides re-resolve each one to its lowest patched version. Key features/changes: - Override undici 8.12.2, nodemailer 10.1.4, webpack-dev-middleware 7.4.6, @graphql-tools/utils 12.0.2 and zod to the project's own version - Hold zod at 3.25.76 under koa-body and koa-session, which crash on v4 - Raise the Node floor to 22.19.0, which undici 8 requires Carries the change first proposed in #29, rebuilt on main so the new CI build runs on it.
The CMS resolved known high-severity vulnerable versions of several dependencies, including its GraphQL library, email sender, HTTP client and build tooling, and Dependabot flagged seven high alerts. After this change those packages resolve to patched versions and the alerts clear, while one nested validation library stays on its current major because the session package that uses it has no compatible release.
Detection evidence
Affected:
int_17ad4b457001o98datdn4tkmWhy this fix
The lockfile held exact vulnerable versions because the Strapi SDK declares them exactly, so a plain install could not move them. Overrides re-resolve each package to its lowest patched version, which clears every high Dependabot alert. I confirmed the changed modules load and that GraphQL schema building, Apollo query execution, nodemailer and the dev server work with the new versions. The remaining risk is zod under the koa session and body middleware: koa-session only accepts zod v3, so moving it to v4 crashes the build. That needs an upstream fix and is recorded on the issue.
Fix walkthrough
Watch the fix explained (1:15). Recorded for commit
e287f0d57e5b5c7efa93c42e75fc8d81264057a4.Out of scope
Production impact: Dependency overrides and the Node floor keep the CMS runtime working
I checked the repository node at head
e287f0d. It has no deploy edges and no cloud account is connected, so no deployed resource node exists in this workspace to regress, and the live traffic read returned empty. The change only re-resolves transitive versions inpackage.jsonandpackage-lock.jsonand raises the declared Node floor. I loaded every changed subtree in the working tree, and the GraphQL schema build, Apollo query execution, session middleware, mailer and dev-middleware all still work. The head addsengines.node >=22.19.0; the base already shipped@strapi/core'sundici8.12.1 declaring the same floor, and Strapi Cloud reads the Node version from the project dashboard rather thanengines, so the floor does not change the runtime.Checked and not affected:
provider#code#account#datum-cloud#region#earth#type#code.repository#id#datum-cloud/datum.net-cms.Observability
npm audit(existing): high-severity entries drop from 33 to the ten that all trace to the single zod-v3 leaf under koa-body/koa-session.Polylane assessed this pull request at
e287f0d.Causal chain
2 files changed (+545/-146)
package-lock.json: modified, +531/-145package.json: modified, +14/-1Generated by Polylane. You can ask follow-ups by mentioning @polylane in a comment.