Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .snyk
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ ignore:
SNYK-JS-TAR-15307072:
- 'snyk-nodejs-lockfile-parser > @yarnpkg/core > tar':
reason: 'Indirect dependency from snyk-nodejs-lockfile-parser, waiting for upstream fix'
expires: 2026-04-03T00:00:00.000Z
expires: 2026-05-06T00:00:00.000Z
SNYK-JS-TAR-15416075:
- 'snyk-nodejs-lockfile-parser > @yarnpkg/core > tar':
reason: 'Indirect dependency from snyk-nodejs-lockfile-parser, waiting for upstream fix'
expires: 2026-04-03T00:00:00.000Z
expires: 2026-05-06T00:00:00.000Z
SNYK-JS-TAR-15456201:
- 'snyk-nodejs-lockfile-parser > @yarnpkg/core > tar':
reason: 'Indirect dependency from snyk-nodejs-lockfile-parser, waiting for upstream fix'
expires: 2026-04-03T00:00:00.000Z
expires: 2026-05-06T00:00:00.000Z
SNYK-JS-LODASH-15869625:
- '*':
reason: 'Indirect dependency, waiting for upstream fix'
Expand Down
11 changes: 8 additions & 3 deletions lib/inputs/file-pattern/static.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as minimatch from "minimatch";
import { minimatch, MinimatchOptions } from "minimatch";
import * as path from "path";

import { ExtractAction, ExtractedLayers } from "../../extractor/types";
Expand All @@ -13,12 +13,17 @@ function generatePathMatcher(
globsInclude: string[],
globsExclude: string[],
): (filePath: string) => boolean {
const matchOptions: MinimatchOptions = {
windowsPathsNoEscape: true,
optimizationLevel: 0,
};

return (filePath: string): boolean => {
if (globsExclude.some((glob) => minimatch(filePath, glob))) {
if (globsExclude.some((glob) => minimatch(filePath, glob, matchOptions))) {
return false;
}

return globsInclude.some((glob) => minimatch(filePath, glob));
return globsInclude.some((glob) => minimatch(filePath, glob, matchOptions));
};
}

Expand Down
Loading
Loading