mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 12:14:22 +01:00
fix(config): ignore jquery/swagger w/o version (#1607)
This commit is contained in:
1 parent
722e7d8e73
commit
b6e0eeeb0a
3 files changed
+3
-2
No files matched your search
@@ -82,7 +82,7 @@ func CreateGlobalConfig() config.Config {
|
||||
regexp.MustCompile(`(^|/)npm-shrinkwrap\.json$`),
|
||||
regexp.MustCompile(`(^|/)bower_components/.*?$`),
|
||||
// TODO: Add more common static assets, such as swagger-ui.
|
||||
regexp.MustCompile(`(^|/)(jquery(-?ui)?|swagger-?ui)-[a-zA-Z0-9.-]+\.js(\.map)?$`),
|
||||
regexp.MustCompile(`(^|/)(jquery(-?ui)?|swagger-?ui)[a-zA-Z0-9.-]+\.js(\.map)?$`),
|
||||
|
||||
// ----------- Python files -----------
|
||||
// Dependencies and lock files.
|
||||
|
||||
@@ -95,6 +95,7 @@ func TestConfigAllowlistPaths(t *testing.T) {
|
||||
`src/main/resources/static/js/jquery-ui-1.10.4.min.js`,
|
||||
`swagger/swaggerui/swagger-ui-bundle.js.map`,
|
||||
`swagger/swaggerui/swagger-ui-es-bundle.js.map`,
|
||||
`src/main/static/swagger-ui.min.js`,
|
||||
},
|
||||
},
|
||||
"python": {
|
||||
|
||||
@@ -43,7 +43,7 @@ paths = [
|
||||
'''(^|/)pnpm-lock\.yaml$''',
|
||||
'''(^|/)npm-shrinkwrap\.json$''',
|
||||
'''(^|/)bower_components/.*?$''',
|
||||
'''(^|/)(jquery(-?ui)?|swagger-?ui)-[a-zA-Z0-9.-]+\.js(\.map)?$''',
|
||||
'''(^|/)(jquery(-?ui)?|swagger-?ui)[a-zA-Z0-9.-]+\.js(\.map)?$''',
|
||||
'''(^|/)(Pipfile|poetry)\.lock$''',
|
||||
'''(?i)/?(v?env|virtualenv)/lib(64)?/.+$''',
|
||||
'''(?i)(^|/)(lib(64)?/python[23](\.\d{1,2})+/|python/[23](\.\d{1,2})+/lib(64)?/).+$''',
|
||||
|
||||
Reference in new issue
Block a user