Repository navigation
fix(examples): patch Elm middleware and Gatsby redirects - #116
MahmoudElsayad wants to merge 1 commit into
Conversation
miguelcalderon
left a comment
There was a problem hiding this comment.
Thanks, the two fixes look right and the Gatsby workaround is well explained. Two things before merging: Elm still has a follow-redirects 1.16.1 pin, and the fixed date in .npmrc will freeze installs over time. A rolling min-release-age=7 would keep the seven-day rule without anyone having to update a date.
| @@ -36,6 +36,7 @@ | |||
| "follow-redirects": "1.16.1", | |||
There was a problem hiding this comment.
This still pins follow-redirects to 1.16.1, the version this PR calls unsafe. The lockfile gets 1.16.2 only because http-proxy is the sole user and its nested override wins. Can we bump this to 1.16.2 too, like Gatsby?
| @@ -0,0 +1 @@ | |||
| before=2026-10-30T00:00:00Z | |||
There was a problem hiding this comment.
A fixed date never moves, so over time this stops being a seven-day buffer and just freezes new installs at October 2026. People who copy this example and add packages will get old versions without knowing why. npm 11.10+ has a rolling setting, min-release-age=7, that matches the root minimumReleaseAge. Could we use that here and in Gatsby, and drop the README note about moving the date?
|
|
||
| ## Development server security | ||
|
|
||
| Gatsby 5.16.1 requires `webpack-dev-middleware` 5.3.4, which has no patched release within its supported major version. |
There was a problem hiding this comment.
Small wording fix: Gatsby needs ^5.3.4, not exactly 5.3.4, and the real problem is that the whole 5.x line has no fix. Maybe: "Gatsby 5.16.1 uses webpack-dev-middleware 5.x, which has no fixed release."
Why
Elm still locks webpack-dev-middleware 7.4.5, which the upstream advisory lists as vulnerable to CVE-2026-76844. Gatsby still pins follow-redirects 1.16.1, affected by cross-realm credential disclosure. These remain after #114.
What changed
Pin Elm middleware to 7.4.6 and Gatsby follow-redirects to 1.16.2, then regenerate their npm lockfiles. Add a seven-day age floor for root pnpm tooling and conservative npm resolution cutoffs for the two examples. Their READMEs explain how to advance the cutoff while preserving seven days.
Scope
Gatsby 5.16.1 still requires middleware ^5.3.4. No patched 5.x release exists, so this PR documents the upstream trailing-slash workaround instead of forcing an unsupported major override. Gatsby defaults to
/; customGATSBY_WEBPACK_PUBLICPATHvalues must also end with/. https://github.com/PSPDFKit/nutrient-web-examples/security/dependabot/1691 remains open.The middleware advisory is GHSA-g84c-rxfj-3j2c. The redirect alert is https://github.com/PSPDFKit/nutrient-web-examples/security/dependabot/1864. npm published the selected fixes on September 3 and October 25, respectively. Both pass the seven-day cooldown on November 6. No new cooldown exemption is added.
Verification
git diff --checkpasses.The local security harness lives outside the repository. npm audit reports two moderate findings for Elm and 20 findings for Gatsby, including four high findings. Neither updated dependency has an audit finding in its updated example. Gatsby middleware remains one of the high findings. Other agents own the remaining security work.