Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Ignore images and binaries (#2162)
Cody Rose5d0196957fdd
diff --git a/pkg/common/vars.go b/pkg/common/vars.goindex e9317122e..7697565e0 100644--- a/pkg/common/vars.go+++ b/pkg/common/vars.go@@ -7,7 +7,50 @@ import (var (KB, MB, GB, TB, PB = 1e3, 1e6, 1e9, 1e12, 1e15- IgnoredExtensions = []string{"mp4", "avi", "mpeg", "mpg", "mov", "wmv", "m4p", "swf", "mp2", "flv", "vob", "webm", "hdv", "3gp", "ogg", "mp3", "wav", "flac", "webp"}+ IgnoredExtensions = []string{+ // multimedia/containers+ "mp4",+ "avi",+ "mpeg",+ "mpg",+ "mov",+ "wmv",+ "m4p",+ "swf",+ "mp2",+ "flv",+ "vob",+ "webm",+ "hdv",+ "3gp",+ "ogg",+ "mp3",+ "wav",+ "flac",+ "webp",++ // images+ "png",+ "jpg",+ "jpeg",+ "gif",+ "tiff",++ // binaries+ // These can theoretically contain secrets, but need decoding for users to make sense of them, and we don't have+ // any such decoders right now.+ "class",+ "dll",+ "xsb",+ "jdo",+ "jar",+ "ear",+ "war",+ "jks",+ "ser",+ "idx",+ "hprof",+ })func SkipFile(filename string) bool {