feat: general fp tweaks (#1703)

This commit is contained in:
Richard Gomez authored and GitHub committed 2025-01-17 19:13:33 -06:00
1 parent b2cf03c7e3
commit ad7a4fb4ea
5 files changed
+27 -10

No files matched your search

+2 -1
View File
@@ -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.
+1
View File
@@ -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`,