Merged
Conversation
This comment has been minimized.
This comment has been minimized.
d3vco
previously approved these changes
Apr 6, 2026
Contributor
d3vco
left a comment
There was a problem hiding this comment.
lgtm, thanks for the clear pr description
2057f50 to
992597f
Compare
PR Reviewer Guide 🔍
|
d3vco
approved these changes
Apr 6, 2026
|
🎉 This PR is included in version 9.5.7 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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.
What does this PR do?
Upgrades
minimatchfrom v3 to v9 and drops@types/minimatchsince v9 ships its own types. The import style changes fromimport * as minimatchto a named import since v9 uses a different module export style.Two options are now passed to
generatePathMatcherto preserve existing behavior across the v3→v9 breaking changes:windowsPathsNoEscape: true— In v9, backslashes are treated as escape characters by default (e.g.\*means a literal*). This option restores the v3 behavior where backslashes are path separators only, replaced with/before matching. Since we match file paths inside container layers (which can include\from Windows images), leaving this off would cause v9 to misinterpret those backslashes and break glob matching.optimizationLevel: 0— v9 defaults to level1, which rewrites patterns containing..(e.g.a/b/../*becomesa/*). Level0disables that rewriting so patterns are matched literally against the path string rather than being silently transformed.Also bumps the
.snykignore expiry dates for thetarvulns (fromsnyk-nodejs-lockfile-parser > @yarnpkg/core > tar). They expired April 3 and were blocking CI. Still waiting on an upstream fix.Where should the reviewer start?
lib/inputs/file-pattern/static.ts— only file that uses minimatch.How should this be manually tested?
The glob matching tests already cover what
generatePathMatcherdoes. If you want to poke at it more, try scanning an image with files that have backslashes in their layer paths.Any background context you want to provide?
minimatch v3 is from 2014. The v9 README documents
windowsPathsNoEscapeexplicitly as restoring the "buggy" behavior of earlier versions on Windows — so we're intentionally opting into it to stay compatible with how this code has always worked.What are the relevant tickets?
CN-1004
Screenshots
N/A
Additional questions
None