Explorar el Código

Merge branch 'master' of github.com:zricethezav/gitleaks

zricethezav hace 5 años
padre
commit
d0e98416b9

+ 2 - 0
audit/audit_test.go

@@ -270,6 +270,7 @@ func TestAudit(t *testing.T) {
 				Report:       "../test_data/test_local_repo_five_commit.json.got",
 				Commit:       "a4c9fb737d5552fd96fce5cc7eedb23353ba9ed0",
 				ReportFormat: "json",
+				Config:       "../test_data/test_configs/generic.toml",
 			},
 			wantPath: "../test_data/test_local_repo_five_commit.json",
 		},
@@ -280,6 +281,7 @@ func TestAudit(t *testing.T) {
 				Report:       "../test_data/test_local_repo_five_at_latest_commit.json.got",
 				Commit:       "latest",
 				ReportFormat: "json",
+				Config:       "../test_data/test_configs/generic.toml",
 			},
 			wantPath: "../test_data/test_local_repo_five_at_latest_commit.json",
 		},

+ 2 - 2
audit/util.go

@@ -12,11 +12,11 @@ import (
 	"github.com/zricethezav/gitleaks/v4/config"
 	"github.com/zricethezav/gitleaks/v4/manager"
 
-	log "github.com/sirupsen/logrus"
 	"github.com/go-git/go-git/v5"
 	"github.com/go-git/go-git/v5/plumbing"
 	fdiff "github.com/go-git/go-git/v5/plumbing/format/diff"
 	"github.com/go-git/go-git/v5/plumbing/object"
+	log "github.com/sirupsen/logrus"
 )
 
 // Inspect patch accepts a patch, commit, and repo. If the patches contains files that are
@@ -390,7 +390,7 @@ func isFilePathWhiteListed(filepath string, whitelist []config.Whitelist) bool {
 	return false
 }
 
-// RegexMatched matched an interface to a regular expression. The interface f can 
+// RegexMatched matched an interface to a regular expression. The interface f can
 // be a string type or go-git *object.File type.
 func RegexMatched(f interface{}, re *regexp.Regexp) bool {
 	if re == nil {

+ 0 - 5
config/default.go

@@ -66,11 +66,6 @@ title = "gitleaks config"
 	regex = '''-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----'''
 	tags = ["key", "AsymmetricPrivateKey"]
 
-[[rules]]
-	description = "Generic Credential"
-	regex = '''(?i)(api_key|apikey|secret|password|pass|pw|key)(.{0,20})?[0-9a-zA-Z]{16,45}'''
-	tags = ["key", "API", "generic"]
-
 [[rules]]
 	description = "Google API key"
 	regex = '''AIza[0-9A-Za-z\\-_]{35}'''

+ 1 - 1
manager/manager.go

@@ -17,10 +17,10 @@ import (
 	"github.com/zricethezav/gitleaks/v4/config"
 	"github.com/zricethezav/gitleaks/v4/options"
 
+	"github.com/go-git/go-git/v5"
 	"github.com/hako/durafmt"
 	"github.com/mattn/go-colorable"
 	log "github.com/sirupsen/logrus"
-	"github.com/go-git/go-git/v5"
 )
 
 const maxLineLen = 200

+ 2 - 2
options/options.go

@@ -9,11 +9,11 @@ import (
 
 	"github.com/zricethezav/gitleaks/v4/version"
 
-	"github.com/jessevdk/go-flags"
-	log "github.com/sirupsen/logrus"
 	"github.com/go-git/go-git/v5"
 	"github.com/go-git/go-git/v5/plumbing/transport/http"
 	"github.com/go-git/go-git/v5/plumbing/transport/ssh"
+	"github.com/jessevdk/go-flags"
+	log "github.com/sirupsen/logrus"
 )
 
 // No leaks or early exit due to invalid options

+ 4 - 0
test_data/test_configs/generic.toml

@@ -0,0 +1,4 @@
+[[rules]]
+	description = "Generic Credential"
+	regex = '''(?i)(api_key|apikey|secret|password|pass|pw|key)(.{0,20})?[0-9a-zA-Z]{16,45}'''
+	tags = ["key", "API", "generic"]

+ 0 - 273
test_data/test_local_owner_aws_leak.json

@@ -12,32 +12,6 @@
   "date": "2019-10-24T09:29:27-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "    aws_access_key_id='AKIAIO5FODNN7EXAMPLE',",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPLE",
-  "commit": "6557c92612d3b35979bd426d429255b3bf9fab74",
-  "repo": "test_repo_1",
-  "rule": "Generic Credential",
-  "commitMessage": "commit 1 with secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "server.test.py",
-  "date": "2019-10-24T09:29:27-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    aws_secret_access_key='ABCDEF+c2L7yXeGvUyrPgYsDnWRRC1AYEXAMPLE'",
-  "offender": "secret_access_key='ABCDEF+c2L7yXeGvUyrPgYsDnWRRC1AYEXAMPLE",
-  "commit": "6557c92612d3b35979bd426d429255b3bf9fab74",
-  "repo": "test_repo_1",
-  "rule": "Generic Credential",
-  "commitMessage": "commit 1 with secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "server.test.py",
-  "date": "2019-10-24T09:29:27-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
   "offender": "AKIALALEMEL33243OLIB",
@@ -51,32 +25,6 @@
   "date": "2019-10-25T13:12:32-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIBE",
-  "commit": "f61cd8587b7ac1d75a89a0c9af870a2f24c60263",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets again\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:32-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "f61cd8587b7ac1d75a89a0c9af870a2f24c60263",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets again\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:32-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
   "offender": "AKIALALEMEL33243OLIB",
@@ -90,32 +38,6 @@
   "date": "2019-10-25T13:12:08-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIBE",
-  "commit": "b2eb34a61c988afd9b4aaa9dd58c8dd7d5f14dba",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding another one\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:08-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "b2eb34a61c988afd9b4aaa9dd58c8dd7d5f14dba",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding another one\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:08-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -129,19 +51,6 @@
   "date": "2019-10-25T13:07:41-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "996865bb912f3bc45898a370a13aadb315014b55",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "committing pem\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:07:41-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -155,19 +64,6 @@
   "date": "2019-10-25T13:01:27-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "17471a5fda722a9e423f1a0d3f0d267ea009d41c",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "wait this is actually adding an aws secret\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:01:27-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: AKIALALEMEL33243OLIAE",
   "offender": "AKIALALEMEL33243OLIA",
@@ -181,19 +77,6 @@
   "date": "2019-10-25T13:01:27-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: AKIALALEMEL33243OLIAE",
-  "offender": "secret: AKIALALEMEL33243OLIAE",
-  "commit": "17471a5fda722a9e423f1a0d3f0d267ea009d41c",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "wait this is actually adding an aws secret\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:01:27-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "\nHere's an AWS secret: AKIALALEMEL33243OLIAE",
   "offender": "AKIALALEMEL33243OLIA",
@@ -207,19 +90,6 @@
   "date": "2019-10-25T12:58:39-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "\nHere's an AWS secret: AKIALALEMEL33243OLIAE",
-  "offender": "secret: AKIALALEMEL33243OLIAE",
-  "commit": "b10b3e2cb320a8c211fda94c4567299d37de7776",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding aws key\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T12:58:39-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "const AWSKEY = \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -233,32 +103,6 @@
   "date": "2019-10-25T13:54:26-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "const AWSKEY = \"AKIALALEMEL33243OLIAE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIAE",
-  "commit": "cd5eb8bef855f73c46b97b4c088badffdc40ebe9",
-  "repo": "test_repo_3",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:54:26-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "cd5eb8bef855f73c46b97b4c088badffdc40ebe9",
-  "repo": "test_repo_3",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:54:26-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "const AWSKEY = \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -272,32 +116,6 @@
   "date": "2019-10-25T13:54:08-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "const AWSKEY = \"AKIALALEMEL33243OLIAE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIAE",
-  "commit": "84ac4e80d4dbf2c968b64e9d4005f5079795bb81",
-  "repo": "test_repo_3",
-  "rule": "Generic Credential",
-  "commitMessage": "more secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:54:08-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "84ac4e80d4dbf2c968b64e9d4005f5079795bb81",
-  "repo": "test_repo_3",
-  "rule": "Generic Credential",
-  "commitMessage": "more secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:54:08-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "AWS secret: \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -311,19 +129,6 @@
   "date": "2019-10-25T13:36:22-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "64cfcee9aad1c84581631636bfc54f2050718d1a",
-  "repo": "test_repo_3",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:36:22-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "AWS secret: \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -337,32 +142,6 @@
   "date": "2019-10-25T13:35:03-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "deea550dd6c7acaf0e59432600593533984a2125",
-  "repo": "test_repo_3",
-  "rule": "Generic Credential",
-  "commitMessage": "dev branch\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:35:03-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "\nmore_secrets = '99432bfewaf823ec3294e231'",
-  "offender": "secrets = '99432bfewaf823ec3294e231",
-  "commit": "a4c9fb737d5552fd96fce5cc7eedb23353ba9ed0",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "even more secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:30:22-05:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "\naws_access_key_id='AKIAIO5FODNN7EXAMPL2'",
   "offender": "AKIAIO5FODNN7EXAMPL2",
@@ -376,19 +155,6 @@
   "date": "2020-02-01T10:08:04-05:00",
   "tags": "key, AWS"
  },
- {
-  "line": "\naws_access_key_id='AKIAIO5FODNN7EXAMPL2'",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPL2",
-  "commit": "ca71fcdeda15f25f0cc661d90e8785c255925c27",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "introduce more secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:08:04-05:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "aws_access_key_id='AKIAIO5FODNN7EXAMPLE'",
   "offender": "AKIAIO5FODNN7EXAMPLE",
@@ -402,32 +168,6 @@
   "date": "2020-02-01T10:07:34-05:00",
   "tags": "key, AWS"
  },
- {
-  "line": "aws_access_key_id='AKIAIO5FODNN7EXAMPLE'",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPLE",
-  "commit": "1f2a4abc47dabf991e6af6f9770867ce0ac1f360",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "introduce secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:07:34-05:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "db_password: verySecretProductionPassword",
-  "offender": "password: verySecretProductionPassword",
-  "commit": "98b6c7cb3fb29a5993c4c95c56a2dc53050b9247",
-  "repo": "test_repo_6",
-  "rule": "Generic Credential",
-  "commitMessage": "Adding some secrets in config folder\n\n",
-  "author": "Noel Algora",
-  "email": "noealgigu@gmail.com",
-  "file": "application.yaml",
-  "date": "2020-02-24T14:13:15-05:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "aws_access_key_id=AKIAIO5FODNN7EXAMPLE",
   "offender": "AKIAIO5FODNN7EXAMPLE",
@@ -440,18 +180,5 @@
   "file": "config/application.properties",
   "date": "2020-02-24T14:13:15-05:00",
   "tags": "key, AWS"
- },
- {
-  "line": "aws_access_key_id=AKIAIO5FODNN7EXAMPLE",
-  "offender": "key_id=AKIAIO5FODNN7EXAMPLE",
-  "commit": "98b6c7cb3fb29a5993c4c95c56a2dc53050b9247",
-  "repo": "test_repo_6",
-  "rule": "Generic Credential",
-  "commitMessage": "Adding some secrets in config folder\n\n",
-  "author": "Noel Algora",
-  "email": "noealgigu@gmail.com",
-  "file": "config/application.properties",
-  "date": "2020-02-24T14:13:15-05:00",
-  "tags": "key, API, generic"
  }
 ]

+ 0 - 182
test_data/test_local_owner_aws_leak_depth_2.json

@@ -12,32 +12,6 @@
   "date": "2019-10-24T09:29:27-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "    aws_access_key_id='AKIAIO5FODNN7EXAMPLE',",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPLE",
-  "commit": "6557c92612d3b35979bd426d429255b3bf9fab74",
-  "repo": "test_repo_1",
-  "rule": "Generic Credential",
-  "commitMessage": "commit 1 with secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "server.test.py",
-  "date": "2019-10-24T09:29:27-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    aws_secret_access_key='ABCDEF+c2L7yXeGvUyrPgYsDnWRRC1AYEXAMPLE'",
-  "offender": "secret_access_key='ABCDEF+c2L7yXeGvUyrPgYsDnWRRC1AYEXAMPLE",
-  "commit": "6557c92612d3b35979bd426d429255b3bf9fab74",
-  "repo": "test_repo_1",
-  "rule": "Generic Credential",
-  "commitMessage": "commit 1 with secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "server.test.py",
-  "date": "2019-10-24T09:29:27-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
   "offender": "AKIALALEMEL33243OLIB",
@@ -51,32 +25,6 @@
   "date": "2019-10-25T13:12:32-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIBE",
-  "commit": "f61cd8587b7ac1d75a89a0c9af870a2f24c60263",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets again\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:32-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "f61cd8587b7ac1d75a89a0c9af870a2f24c60263",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets again\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:32-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
   "offender": "AKIALALEMEL33243OLIB",
@@ -90,32 +38,6 @@
   "date": "2019-10-25T13:12:08-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIBE",
-  "commit": "b2eb34a61c988afd9b4aaa9dd58c8dd7d5f14dba",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding another one\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:08-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "b2eb34a61c988afd9b4aaa9dd58c8dd7d5f14dba",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding another one\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:08-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "const AWSKEY = \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -129,32 +51,6 @@
   "date": "2019-10-25T13:54:26-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "const AWSKEY = \"AKIALALEMEL33243OLIAE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIAE",
-  "commit": "cd5eb8bef855f73c46b97b4c088badffdc40ebe9",
-  "repo": "test_repo_3",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:54:26-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "cd5eb8bef855f73c46b97b4c088badffdc40ebe9",
-  "repo": "test_repo_3",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:54:26-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "const AWSKEY = \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -168,45 +64,6 @@
   "date": "2019-10-25T13:54:08-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "const AWSKEY = \"AKIALALEMEL33243OLIAE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIAE",
-  "commit": "84ac4e80d4dbf2c968b64e9d4005f5079795bb81",
-  "repo": "test_repo_3",
-  "rule": "Generic Credential",
-  "commitMessage": "more secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:54:08-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "84ac4e80d4dbf2c968b64e9d4005f5079795bb81",
-  "repo": "test_repo_3",
-  "rule": "Generic Credential",
-  "commitMessage": "more secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:54:08-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "\nmore_secrets = '99432bfewaf823ec3294e231'",
-  "offender": "secrets = '99432bfewaf823ec3294e231",
-  "commit": "a4c9fb737d5552fd96fce5cc7eedb23353ba9ed0",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "even more secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:30:22-05:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "\naws_access_key_id='AKIAIO5FODNN7EXAMPL2'",
   "offender": "AKIAIO5FODNN7EXAMPL2",
@@ -220,32 +77,6 @@
   "date": "2020-02-01T10:08:04-05:00",
   "tags": "key, AWS"
  },
- {
-  "line": "\naws_access_key_id='AKIAIO5FODNN7EXAMPL2'",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPL2",
-  "commit": "ca71fcdeda15f25f0cc661d90e8785c255925c27",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "introduce more secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:08:04-05:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "db_password: verySecretProductionPassword",
-  "offender": "password: verySecretProductionPassword",
-  "commit": "98b6c7cb3fb29a5993c4c95c56a2dc53050b9247",
-  "repo": "test_repo_6",
-  "rule": "Generic Credential",
-  "commitMessage": "Adding some secrets in config folder\n\n",
-  "author": "Noel Algora",
-  "email": "noealgigu@gmail.com",
-  "file": "application.yaml",
-  "date": "2020-02-24T14:13:15-05:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "aws_access_key_id=AKIAIO5FODNN7EXAMPLE",
   "offender": "AKIAIO5FODNN7EXAMPLE",
@@ -258,18 +89,5 @@
   "file": "config/application.properties",
   "date": "2020-02-24T14:13:15-05:00",
   "tags": "key, AWS"
- },
- {
-  "line": "aws_access_key_id=AKIAIO5FODNN7EXAMPLE",
-  "offender": "key_id=AKIAIO5FODNN7EXAMPLE",
-  "commit": "98b6c7cb3fb29a5993c4c95c56a2dc53050b9247",
-  "repo": "test_repo_6",
-  "rule": "Generic Credential",
-  "commitMessage": "Adding some secrets in config folder\n\n",
-  "author": "Noel Algora",
-  "email": "noealgigu@gmail.com",
-  "file": "config/application.properties",
-  "date": "2020-02-24T14:13:15-05:00",
-  "tags": "key, API, generic"
  }
 ]

+ 0 - 39
test_data/test_local_repo_five_files_at_commit.json

@@ -24,44 +24,5 @@
   "file": "secrets.py",
   "date": "2020-02-01T10:30:22-05:00",
   "tags": "key, AWS"
- },
- {
-  "line": "aws_access_key_id='AKIAIO5FODNN7EXAMPLE'",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPLE",
-  "commit": "a4c9fb737d5552fd96fce5cc7eedb23353ba9ed0",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "even more secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:30:22-05:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "aws_access_key_id='AKIAIO5FODNN7EXAMPL2'",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPL2",
-  "commit": "a4c9fb737d5552fd96fce5cc7eedb23353ba9ed0",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "even more secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:30:22-05:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "more_secrets = '99432bfewaf823ec3294e231'",
-  "offender": "secrets = '99432bfewaf823ec3294e231",
-  "commit": "a4c9fb737d5552fd96fce5cc7eedb23353ba9ed0",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "even more secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:30:22-05:00",
-  "tags": "key, API, generic"
  }
 ]

+ 0 - 39
test_data/test_local_repo_five_files_at_latest_commit.json

@@ -24,44 +24,5 @@
   "file": "secrets.py",
   "date": "2020-02-01T10:30:22-05:00",
   "tags": "key, AWS"
- },
- {
-  "line": "aws_access_key_id='AKIAIO5FODNN7EXAMPLE'",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPLE",
-  "commit": "a4c9fb737d5552fd96fce5cc7eedb23353ba9ed0",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "even more secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:30:22-05:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "aws_access_key_id='AKIAIO5FODNN7EXAMPL2'",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPL2",
-  "commit": "a4c9fb737d5552fd96fce5cc7eedb23353ba9ed0",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "even more secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:30:22-05:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "more_secrets = '99432bfewaf823ec3294e231'",
-  "offender": "secrets = '99432bfewaf823ec3294e231",
-  "commit": "a4c9fb737d5552fd96fce5cc7eedb23353ba9ed0",
-  "repo": "test_repo_5",
-  "rule": "Generic Credential",
-  "commitMessage": "even more secrets\n",
-  "author": "Zach Rice",
-  "email": "zrice@gitlab.com",
-  "file": "secrets.py",
-  "date": "2020-02-01T10:30:22-05:00",
-  "tags": "key, API, generic"
  }
 ]

+ 0 - 26
test_data/test_local_repo_one_aws_leak.json

@@ -11,31 +11,5 @@
   "file": "server.test.py",
   "date": "2019-10-24T09:29:27-04:00",
   "tags": "key, AWS"
- },
- {
-  "line": "    aws_access_key_id='AKIAIO5FODNN7EXAMPLE',",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPLE",
-  "commit": "6557c92612d3b35979bd426d429255b3bf9fab74",
-  "repo": "test_repo_1",
-  "rule": "Generic Credential",
-  "commitMessage": "commit 1 with secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "server.test.py",
-  "date": "2019-10-24T09:29:27-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    aws_secret_access_key='ABCDEF+c2L7yXeGvUyrPgYsDnWRRC1AYEXAMPLE'",
-  "offender": "secret_access_key='ABCDEF+c2L7yXeGvUyrPgYsDnWRRC1AYEXAMPLE",
-  "commit": "6557c92612d3b35979bd426d429255b3bf9fab74",
-  "repo": "test_repo_1",
-  "rule": "Generic Credential",
-  "commitMessage": "commit 1 with secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "server.test.py",
-  "date": "2019-10-24T09:29:27-04:00",
-  "tags": "key, API, generic"
  }
 ]

+ 0 - 26
test_data/test_local_repo_one_aws_leak_commit.json

@@ -11,31 +11,5 @@
   "file": "server.test.py",
   "date": "2019-10-24T09:29:27-04:00",
   "tags": "key, AWS"
- },
- {
-  "line": "    aws_access_key_id='AKIAIO5FODNN7EXAMPLE',",
-  "offender": "key_id='AKIAIO5FODNN7EXAMPLE",
-  "commit": "6557c92612d3b35979bd426d429255b3bf9fab74",
-  "repo": "test_repo_1",
-  "rule": "Generic Credential",
-  "commitMessage": "commit 1 with secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "server.test.py",
-  "date": "2019-10-24T09:29:27-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    aws_secret_access_key='ABCDEF+c2L7yXeGvUyrPgYsDnWRRC1AYEXAMPLE'",
-  "offender": "secret_access_key='ABCDEF+c2L7yXeGvUyrPgYsDnWRRC1AYEXAMPLE",
-  "commit": "6557c92612d3b35979bd426d429255b3bf9fab74",
-  "repo": "test_repo_1",
-  "rule": "Generic Credential",
-  "commitMessage": "commit 1 with secrets\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "server.test.py",
-  "date": "2019-10-24T09:29:27-04:00",
-  "tags": "key, API, generic"
  }
 ]

+ 0 - 13
test_data/test_local_repo_one_aws_leak_uncommitted.json

@@ -11,18 +11,5 @@
   "file": "server.test.py",
   "date": "1970-01-01T00:00:00Z",
   "tags": "key, AWS"
- },
- {
-  "line": " aws_access_key_id='AKIAIO5FODNN7DXAMPLE'",
-  "offender": "key_id='AKIAIO5FODNN7DXAMPLE",
-  "commit": "0000000000000000000000000000000000000000",
-  "repo": "test_repo_1",
-  "rule": "Generic Credential",
-  "commitMessage": "***STAGED CHANGES***",
-  "author": "",
-  "email": "",
-  "file": "server.test.py",
-  "date": "1970-01-01T00:00:00Z",
-  "tags": "key, API, generic"
  }
 ]

+ 0 - 104
test_data/test_local_repo_two_leaks.json

@@ -12,32 +12,6 @@
   "date": "2019-10-25T13:12:32-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIBE",
-  "commit": "f61cd8587b7ac1d75a89a0c9af870a2f24c60263",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets again\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:32-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "f61cd8587b7ac1d75a89a0c9af870a2f24c60263",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets again\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:32-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
   "offender": "AKIALALEMEL33243OLIB",
@@ -51,32 +25,6 @@
   "date": "2019-10-25T13:12:08-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIBE",
-  "commit": "b2eb34a61c988afd9b4aaa9dd58c8dd7d5f14dba",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding another one\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:08-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "b2eb34a61c988afd9b4aaa9dd58c8dd7d5f14dba",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding another one\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:08-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -90,19 +38,6 @@
   "date": "2019-10-25T13:07:41-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "996865bb912f3bc45898a370a13aadb315014b55",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "committing pem\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:07:41-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -116,19 +51,6 @@
   "date": "2019-10-25T13:01:27-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "17471a5fda722a9e423f1a0d3f0d267ea009d41c",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "wait this is actually adding an aws secret\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:01:27-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: AKIALALEMEL33243OLIAE",
   "offender": "AKIALALEMEL33243OLIA",
@@ -142,19 +64,6 @@
   "date": "2019-10-25T13:01:27-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: AKIALALEMEL33243OLIAE",
-  "offender": "secret: AKIALALEMEL33243OLIAE",
-  "commit": "17471a5fda722a9e423f1a0d3f0d267ea009d41c",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "wait this is actually adding an aws secret\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:01:27-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "\nHere's an AWS secret: AKIALALEMEL33243OLIAE",
   "offender": "AKIALALEMEL33243OLIA",
@@ -167,18 +76,5 @@
   "file": "secrets.md",
   "date": "2019-10-25T12:58:39-04:00",
   "tags": "key, AWS"
- },
- {
-  "line": "\nHere's an AWS secret: AKIALALEMEL33243OLIAE",
-  "offender": "secret: AKIALALEMEL33243OLIAE",
-  "commit": "b10b3e2cb320a8c211fda94c4567299d37de7776",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding aws key\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T12:58:39-04:00",
-  "tags": "key, API, generic"
  }
 ]

+ 0 - 52
test_data/test_local_repo_two_leaks_commit_from.json

@@ -12,19 +12,6 @@
   "date": "2019-10-25T13:07:41-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "996865bb912f3bc45898a370a13aadb315014b55",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "committing pem\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:07:41-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -38,19 +25,6 @@
   "date": "2019-10-25T13:01:27-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "17471a5fda722a9e423f1a0d3f0d267ea009d41c",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "wait this is actually adding an aws secret\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:01:27-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: AKIALALEMEL33243OLIAE",
   "offender": "AKIALALEMEL33243OLIA",
@@ -64,19 +38,6 @@
   "date": "2019-10-25T13:01:27-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: AKIALALEMEL33243OLIAE",
-  "offender": "secret: AKIALALEMEL33243OLIAE",
-  "commit": "17471a5fda722a9e423f1a0d3f0d267ea009d41c",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "wait this is actually adding an aws secret\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:01:27-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "\nHere's an AWS secret: AKIALALEMEL33243OLIAE",
   "offender": "AKIALALEMEL33243OLIA",
@@ -89,18 +50,5 @@
   "file": "secrets.md",
   "date": "2019-10-25T12:58:39-04:00",
   "tags": "key, AWS"
- },
- {
-  "line": "\nHere's an AWS secret: AKIALALEMEL33243OLIAE",
-  "offender": "secret: AKIALALEMEL33243OLIAE",
-  "commit": "b10b3e2cb320a8c211fda94c4567299d37de7776",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding aws key\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T12:58:39-04:00",
-  "tags": "key, API, generic"
  }
 ]

+ 0 - 39
test_data/test_local_repo_two_leaks_commit_range.json

@@ -12,19 +12,6 @@
   "date": "2019-10-25T13:07:41-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "996865bb912f3bc45898a370a13aadb315014b55",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "committing pem\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:07:41-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -38,19 +25,6 @@
   "date": "2019-10-25T13:01:27-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "17471a5fda722a9e423f1a0d3f0d267ea009d41c",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "wait this is actually adding an aws secret\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:01:27-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: AKIALALEMEL33243OLIAE",
   "offender": "AKIALALEMEL33243OLIA",
@@ -63,18 +37,5 @@
   "file": "secrets.md",
   "date": "2019-10-25T13:01:27-04:00",
   "tags": "key, AWS"
- },
- {
-  "line": "Here's an AWS secret: AKIALALEMEL33243OLIAE",
-  "offender": "secret: AKIALALEMEL33243OLIAE",
-  "commit": "17471a5fda722a9e423f1a0d3f0d267ea009d41c",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "wait this is actually adding an aws secret\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:01:27-04:00",
-  "tags": "key, API, generic"
  }
 ]

+ 0 - 65
test_data/test_local_repo_two_leaks_commit_to.json

@@ -12,32 +12,6 @@
   "date": "2019-10-25T13:12:32-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIBE",
-  "commit": "f61cd8587b7ac1d75a89a0c9af870a2f24c60263",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets again\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:32-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "f61cd8587b7ac1d75a89a0c9af870a2f24c60263",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "rm secrets again\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:32-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
   "offender": "AKIALALEMEL33243OLIB",
@@ -51,32 +25,6 @@
   "date": "2019-10-25T13:12:08-04:00",
   "tags": "key, AWS"
  },
- {
-  "line": "    const AWSKEY = \"AKIALALEMEL33243OLIBE\"",
-  "offender": "KEY = \"AKIALALEMEL33243OLIBE",
-  "commit": "b2eb34a61c988afd9b4aaa9dd58c8dd7d5f14dba",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding another one\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:08-04:00",
-  "tags": "key, API, generic"
- },
- {
-  "line": "    const AWSSECRET = \"99432bfewaf823ec3294e231\"",
-  "offender": "SECRET = \"99432bfewaf823ec3294e231",
-  "commit": "b2eb34a61c988afd9b4aaa9dd58c8dd7d5f14dba",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "adding another one\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:12:08-04:00",
-  "tags": "key, API, generic"
- },
  {
   "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
   "offender": "AKIALALEMEL33243OLIA",
@@ -89,18 +37,5 @@
   "file": "secrets.md",
   "date": "2019-10-25T13:07:41-04:00",
   "tags": "key, AWS"
- },
- {
-  "line": "Here's an AWS secret: \"AKIALALEMEL33243OLIAE\"",
-  "offender": "secret: \"AKIALALEMEL33243OLIAE",
-  "commit": "996865bb912f3bc45898a370a13aadb315014b55",
-  "repo": "test_repo_2",
-  "rule": "Generic Credential",
-  "commitMessage": "committing pem\n",
-  "author": "zach rice",
-  "email": "zricer@protonmail.com",
-  "file": "secrets.md",
-  "date": "2019-10-25T13:07:41-04:00",
-  "tags": "key, API, generic"
  }
 ]