diff --git a/README.md b/README.md index 53ece63a..05ab30c1 100644 --- a/README.md +++ b/README.md @@ -128,6 +128,8 @@ From C-U at Home: Donate: https://www.cuathome.us/give/ +#### Speaking of Community +Please read this https://corruptcu.com/ diff --git a/gitleaks.toml b/gitleaks.toml index a6f929df..67d22979 100644 --- a/gitleaks.toml +++ b/gitleaks.toml @@ -29,6 +29,9 @@ regex = '''-----BEGIN PGP PRIVATE KEY BLOCK-----''' [[regexes]] description = "Slack token" regex = '''xox[baprs]-.*''' +[[regexes]] +description = "Strip API Key" +regex = '''(?i)(sk|pk)_(test|live)_[0-9a-zA-Z]{10,32}''' [whitelist] regexes = [ diff --git a/main.go b/main.go index cda203f4..fbabad96 100644 --- a/main.go +++ b/main.go @@ -346,6 +346,10 @@ func run() ([]Leak, error) { // writeReport writes a report to a file specified in the --report= option. // Default format for report is JSON. You can use the --csv option to write the report as a csv func writeReport(leaks []Leak) error { + if len(leaks) == 0 { + return nil + } + var err error log.Infof("writing report to %s", opts.Report) if strings.HasSuffix(opts.Report, ".csv") {