add --max-target-megabytes : maximum size for a file/blob to be scanned (#1003)

* add --max-target-megabytes : maximum size for a file/blob to be scanned

* add --max-target-megabytes : maximum size for a file/blob to be scanned

* add --max-target-megabytes : maximum size for a file/blob to be scanned

* adjust readme comment

* fix on prem
This commit is contained in:
roma8389 authored and GitHub committed 2022-10-10 16:07:06 -05:00
1 parent 81c92c78ca
commit c0caab0355
4 files changed
+24 -3

No files matched your search

+3
View File
@@ -70,6 +70,9 @@ func runDetect(cmd *cobra.Command, args []string) {
if detector.Redact, err = cmd.Flags().GetBool("redact"); err != nil {
log.Fatal().Err(err).Msg("")
}
if detector.MaxTargetMegaBytes, err = cmd.Flags().GetInt("max-target-megabytes"); err != nil {
log.Fatal().Err(err).Msg("")
}
if fileExists(filepath.Join(source, ".gitleaksignore")) {
if err = detector.AddGitleaksIgnore(filepath.Join(source, ".gitleaksignore")); err != nil {