mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-29 12:44:22 +01:00
feat: general fp tweaks (#1703)
This commit is contained in:
1 parent
b2cf03c7e3
commit
ad7a4fb4ea
5 files changed
+27
-10
No files matched your search
@@ -5,6 +5,7 @@ import (
|
||||
"strings"
|
||||
|
||||
regexp "github.com/wasilibs/go-re2"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
)
|
||||
|
||||
@@ -80,7 +81,7 @@ func CreateGlobalConfig() config.Config {
|
||||
regexp.MustCompile(`(^|/)(npm-shrinkwrap\.json|package-lock\.json|pnpm-lock\.yaml|yarn\.lock)$`),
|
||||
regexp.MustCompile(`(^|/)bower_components(/.*)?$`),
|
||||
// TODO: Add more common static assets, such as swagger-ui.
|
||||
regexp.MustCompile(`(^|/)(angular|jquery(-?ui)?|plotly|swagger-?ui)[a-zA-Z0-9.-]*(\.min)?\.js(\.map)?$`),
|
||||
regexp.MustCompile(`(^|/)(angular|bootstrap|jquery(-?ui)?|plotly|swagger-?ui)[a-zA-Z0-9.-]*(\.min)?\.js(\.map)?$`),
|
||||
|
||||
// ----------- Python files -----------
|
||||
// Dependencies and lock files.
|
||||
|
||||
@@ -91,6 +91,7 @@ func TestConfigAllowlistPaths(t *testing.T) {
|
||||
}{
|
||||
"javascript - common static assets": {
|
||||
invalid: []string{
|
||||
`tests/e2e/nuget/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js`,
|
||||
`src/main/static/lib/angular.1.2.16.min.js`,
|
||||
`src/main/resources/static/jquery-ui-1.12.1/jquery-ui-min.js`,
|
||||
`src/main/resources/static/js/jquery-ui-1.10.4.min.js`,
|
||||
|
||||
Reference in new issue
Block a user