fix(config): ignore jquery/swagger w/o version (#1607)

This commit is contained in:
Richard Gomez authored and GitHub committed 2024-10-28 08:18:42 -05:00
1 parent 722e7d8e73
commit b6e0eeeb0a
3 files changed
+3 -2

No files matched your search

+1 -1
View File
@@ -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.
+1
View File
@@ -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": {
+1 -1
View File
@@ -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)?/).+$''',