Forráskód Böngészése

removing validating config, already handled

zach rice 6 éve
szülő
commit
87d6c588a6
3 módosított fájl, 6 hozzáadás és 12 törlés
  1. 0 1
      gitleaks.toml
  2. 0 4
      src/core.go
  3. 6 7
      src/options.go

+ 0 - 1
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}'''

+ 0 - 4
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

+ 6 - 7
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