From 87d6c588a614df26b8af251dc17534cb7a8d884d Mon Sep 17 00:00:00 2001 From: zach rice Date: Sat, 13 Apr 2019 14:09:16 -0500 Subject: [PATCH] removing validating config, already handled --- gitleaks.toml | 1 - src/core.go | 4 ---- src/options.go | 13 ++++++------- 3 files changed, 6 insertions(+), 12 deletions(-) diff --git a/gitleaks.toml b/gitleaks.toml index ad72b69e..eb812b59 100644 --- a/gitleaks.toml +++ b/gitleaks.toml @@ -4,7 +4,6 @@ title = "sample gitleaks config" # The output you are seeing here is the default gitleaks config. If GITLEAKS_CONFIG environment variable # is set, gitleaks will load configurations from that path. If option --config-path is set, gitleaks will load # configurations from that path. Gitleaks does not whitelist anything by default. - [[rules]] description = "AWS Key" regex = '''AKIA[0-9A-Z]{16}''' diff --git a/src/core.go b/src/core.go index a2ffead3..353a72ac 100644 --- a/src/core.go +++ b/src/core.go @@ -48,10 +48,6 @@ func Run(optsL *Options) (*Report, error) { if err != nil { return nil, err } - if opts.ValidateConfig { - log.Info("valid gitleaks config") - return nil, nil - } if opts.Disk { // temporary directory where all the gitleaks plain clones will reside diff --git a/src/options.go b/src/options.go index 7f98f7f2..75157958 100644 --- a/src/options.go +++ b/src/options.go @@ -45,13 +45,12 @@ type Options struct { // TODO: IncludeMessages string `long:"messages" description:"include commit messages in audit"` // Output options - Log string `short:"l" long:"log" description:"log level"` - Verbose bool `short:"v" long:"verbose" description:"Show verbose output from gitleaks audit"` - Report string `long:"report" description:"path to write report file. Needs to be csv or json"` - Redact bool `long:"redact" description:"redact secrets from log messages and report"` - Version bool `long:"version" description:"version number"` - SampleConfig bool `long:"sample-config" description:"prints a sample config file"` - ValidateConfig bool `long:"validate-config" description:"validate gitleaks config"` + Log string `short:"l" long:"log" description:"log level"` + Verbose bool `short:"v" long:"verbose" description:"Show verbose output from gitleaks audit"` + Report string `long:"report" description:"path to write report file. Needs to be csv or json"` + Redact bool `long:"redact" description:"redact secrets from log messages and report"` + Version bool `long:"version" description:"version number"` + SampleConfig bool `long:"sample-config" description:"prints a sample config file"` } // ParseOpts parses the options