From 92bb4ea6fc64aba4966ad0eecde5c5a6a33fb7d2 Mon Sep 17 00:00:00 2001 From: Cristhian Amaya Date: Tue, 11 Dec 2018 18:33:11 +0100 Subject: [PATCH 1/3] Write report only when leaks are found --- main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/main.go b/main.go index 476fc24f..0a834b75 100644 --- a/main.go +++ b/main.go @@ -345,6 +345,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") { From 734befb555696a4e312e6ff6baca72df6389cc29 Mon Sep 17 00:00:00 2001 From: Zachary Rice Date: Tue, 25 Dec 2018 09:31:58 -0600 Subject: [PATCH 2/3] bad cops bad cops --- README.md | 2 ++ 1 file changed, 2 insertions(+) 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/ From af2e99ef457e8cc5e4850984326e7ece45b88850 Mon Sep 17 00:00:00 2001 From: Arbaz Hussain <13177578+arbazkiraak@users.noreply.github.com> Date: Thu, 27 Dec 2018 21:45:39 +0530 Subject: [PATCH 3/3] Adding Strip API Regex MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` → printf ' Stripe.api_key = "Sk_test_41u0zAKbiWmTVhvHcS6gAjp9" Stripe.api_key = "sk_live_VhYCleaZwuUBGSFYFc7WUboz" STRIPE_PUBLIC_KEY= "pk_live_8sCPFZoLtW5pXuVHGrRKrROs"' | grep -P "(?i)(sk|pk)_(test|live)_[0-9a-zA-Z]{10,32}" Stripe.api_key = "Sk_test_41u0zAKbiWmTVhvHcS6gAjp9" Stripe.api_key = "sk_live_VhYCleaZwuUBGSFYFc7WUboz" STRIPE_PUBLIC_KEY= "pk_live_8sCPFZoLtW5pXuVHGrRKrROs" ``` --- gitleaks.toml | 3 +++ 1 file changed, 3 insertions(+) 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 = [