mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
use embed pkg for default config, update deps (#616)
This commit is contained in:
1 parent
3c1751e5c4
commit
abc73e2443
4 files changed
+64
-52
No files matched your search
+5
-1
@@ -1,6 +1,7 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
@@ -16,6 +17,9 @@ import (
|
||||
log "github.com/sirupsen/logrus"
|
||||
)
|
||||
|
||||
//go:embed gitleaks.toml
|
||||
var DefaultConfig string
|
||||
|
||||
// Config is a composite struct of Rules and Allowlists
|
||||
// Each Rule contains a description, regular expression, tags, and allowlists if available
|
||||
type Config struct {
|
||||
@@ -42,7 +46,7 @@ type TomlAllowList struct {
|
||||
}
|
||||
|
||||
// TomlLoader gets loaded with the values from a gitleaks toml config
|
||||
// see the config in config/defaults.go for an example. TomlLoader is used
|
||||
// see the config in config/gitleaks.toml for an example. TomlLoader is used
|
||||
// to generate Config values (compiling regexes, etc).
|
||||
type TomlLoader struct {
|
||||
AllowList TomlAllowList
|
||||
|
||||
Reference in new issue
Block a user