Fix lodash, urijs and path-to-regexp advisories in lib - #11
Open
ch-asimakopoulos wants to merge 1 commit into
Open
Fix lodash, urijs and path-to-regexp advisories in lib#11ch-asimakopoulos wants to merge 1 commit into
ch-asimakopoulos wants to merge 1 commit into
Conversation
Chain 2 of 4. Resolves alerts SokratisVidros#55 (lodash, code injection via _.template imports key names), SokratisVidros#21 (urijs, incorrect protocol extraction via \r \n \t) and SokratisVidros#37 (path-to-regexp, backtracking regular expressions) in lib/package-lock.json. lodash 4.17.21 -> 4.18.1 (direct dependency) urijs 1.19.6 -> 1.19.11 (via koa-router) path-to-regexp 1.8.0 -> 1.9.0 (via koa-router) All three are plain semver-compatible updates. koa-router 7.4.0 accepts urijs "^1.19.2" and path-to-regexp "^1.1.1", so both transitive fixes land without overrides; only the direct lodash range needed editing. path-to-regexp deserves a note: the fix for the backtracking advisory was backported to the 1.x line as 1.9.0, so this stays on koa-router 7 rather than needing the koa-router 12 / path-to-regexp 8 jump. lib only consumes lodash/merge and lodash/isEmpty, neither of which is touched by the _.template advisory or by anything in the 4.17 -> 4.18 range. Changes are confined to the intended packages. A full diff of the runtime tree before and after shows only the three bumps above, plus incidental in-range moves of hoek 4.2.1 -> 4.3.1 and topo 2.0.2 -> 2.1.1 underneath koa-joi-validate, which chain 3 removes outright. Verified: the three alerts report clear, 9/9 tests pass, and lib/index still loads. The build.test.js snapshot is unchanged, which is the useful signal here - it captures the router's compiled regexes, so path-to-regexp 1.9.0 produces byte-identical routing output. Remaining in this lockfile: hoek (chain 3), a moderate joi link() issue, and brace-expansion, whose advisory has no patched version at any release. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ch-asimakopoulos
marked this pull request as ready for review
July 31, 2026 14:43
Nikoklis
approved these changes
Jul 31, 2026
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.
Chain 2 of 4. Base:
security/root-high-deps(#10)._.templateimports key names\r,\n,\tAll three are plain semver-compatible updates
No overrides needed.
koa-router@7.4.0acceptsurijs@^1.19.2andpath-to-regexp@^1.1.1, so both transitive fixes land on their own; only the directlodashrange needed editing.path-to-regexpdeserves a note: the backtracking fix was backported to the 1.x line as 1.9.0, so this stays on koa-router 7 rather than needing the koa-router 12 / path-to-regexp 8 jump.lib only consumes
lodash/mergeandlodash/isEmpty— neither touched by the_.templateadvisory nor by anything in the 4.17 → 4.18 range.Verification
lib/indexstill loadsbuild.test.jssnapshot is unchanged — the useful signal here, since it captures the router's compiled regexes. path-to-regexp 1.9.0 produces byte-identical routing output.npm ls --omit=dev --all) before and after shows only the three bumps above, plus incidental in-range moves ofhoek 4.2.1 → 4.3.1andtopo 2.0.2 → 2.1.1underneathkoa-joi-validate— which chain 3 removes outright.Remaining in this lockfile
joilink()RangeErrorbrace-expansion— advisory has no patched version at any release🤖 Generated with Claude Code