Skip to content

Commit 784fb19

Browse files
Cleaned up Glob and fixed a bug in sub org pattern detection (#808)
* cleaned up Glob and fixed a bug in sub org pattern detection * Potential fix for code scanning alert no. 68: Incomplete string escaping or encoding Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * reset to old code that * cleaned up Glob and fixed a bug in sub org pattern detection --------- Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
1 parent ff7a656 commit 784fb19

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/glob.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ class Glob {
44

55
// If not a glob pattern then just match the string.
66
if (!this.glob.includes('*')) {
7-
this.regexp = new RegExp(`.*${this.glob}.*`, 'u')
7+
this.regexp = new RegExp(`\\b${this.glob}\\b`, 'u')
88
return
99
}
1010
this.regexptText = this.globize(this.glob)

0 commit comments

Comments
 (0)