isaacs/minimatch

a glob matcher in javascript

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 43 minutes ago
Type:Library / SDKCategory(s):Core & Utility LibrariesLanguages & Runtimes
Added to GitGenius on September 19th, 2026
Created on July 16th, 2011
Open Issues & Pull Requests: 18 (+0)
GitHub issues: Enabled
Number of forks: 387
Total Stargazers: 3,521 (+0)
Total Subscribers: 58 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 13.8 hours
Mean response time: 28.7 days
90th percentile: 124.4 days
Tracked items: 45

Most active contributors

Sign in to see contributor activity.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 7
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 473 days
Stale 30+ days: 5
Stale 90+ days: 5

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

minimatch is a glob matcher in JavaScript that converts glob expressions into regular expressions for pattern matching.

The library solves the problem of matching file paths and strings against glob patterns by translating bash-compatible glob syntax into JavaScript RegExp objects. This approach enables npm and other tools to perform glob matching natively in JavaScript environments. The tool supports standard glob features including brace expansion, extended glob matching, globstar double-asterisk patterns, and POSIX character classes that work across Unicode ranges.

Developers should adopt minimatch when they need reliable glob pattern matching in JavaScript without external dependencies. It suits projects that require bash-compatible glob semantics, particularly those handling file operations or pattern-based filtering. The library is production-tested through its use within npm itself. However, adopters must be aware of a critical security consideration: the library converts glob patterns to regular expressions, which makes it vulnerable to ReDoS attacks if patterns come from untrusted input. The README explicitly warns that any system accepting user-supplied glob patterns and passing them to this library will be compromised by a determined attacker. The maintainers have stated that future versions may use a different matching algorithm to address backtracking problems, but such changes will not be backported to existing versions. In the near term, ReDoS reports will be considered working as intended rather than bugs. On Windows, the tool requires forward-slashes only in glob expressions, though it handles UNC paths specially.

The project maintains active engagement with security concerns, documenting ReDoS limitations prominently rather than attempting incremental fixes. Development shows responsiveness to practical constraints, acknowledging that whack-a-mole security patching is unsustainable and signaling architectural changes for future versions. The codebase reflects careful consideration of edge cases, including Windows path handling and Unicode character class support.