mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 13:14:22 +01:00
Added a test for fixed Google and Square config
This commit is contained in:
1 parent
be13bba64c
commit
45c898c5ea
3 files changed
+49
No files matched your search
@@ -533,6 +533,16 @@ func TestScan(t *testing.T) {
|
|||||||
},
|
},
|
||||||
wantEmpty: true,
|
wantEmpty: true,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
description: "test dir two google api key leak AND square oauth leak",
|
||||||
|
opts: options.Options{
|
||||||
|
Path: "../test_data/test_repos/test_dir_2",
|
||||||
|
Report: "../test_data/test_dir_one_google_leak_and_square_leak.json.got",
|
||||||
|
ReportFormat: "json",
|
||||||
|
NoGit: true,
|
||||||
|
},
|
||||||
|
wantPath: "../test_data/test_dir_one_google_leak_and_square_leak.json",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
|
|||||||
@@ -0,0 +1,36 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"line": "SQUARE_OAUTH=sq0csp-QZxqK3fHycIxFsjZ7_HoqRN08qY2by3wLXcfJCfsKEg",
|
||||||
|
"lineNumber": 1,
|
||||||
|
"offender": "sq0csp-QZxqK3fHycIxFsjZ7_HoqRN08qY2by3wLXcfJCfsKEg",
|
||||||
|
"offenderEntropy": -1,
|
||||||
|
"commit": "",
|
||||||
|
"repo": "",
|
||||||
|
"repoURL": "",
|
||||||
|
"leakURL": "",
|
||||||
|
"rule": "Square OAuth secret",
|
||||||
|
"commitMessage": "",
|
||||||
|
"author": "",
|
||||||
|
"email": "",
|
||||||
|
"file": ".",
|
||||||
|
"date": "0001-01-01T00:00:00Z",
|
||||||
|
"tags": "key, square"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"line": "GOOGLE_MAPS_KEY=AIzaSyDtz3Di0ZrzeU5ET3UFU0p-xP4bx2FkSrg",
|
||||||
|
"lineNumber": 3,
|
||||||
|
"offender": "AIzaSyDtz3Di0ZrzeU5ET3UFU0p-xP4bx2FkSrg",
|
||||||
|
"offenderEntropy": -1,
|
||||||
|
"commit": "",
|
||||||
|
"repo": "",
|
||||||
|
"repoURL": "",
|
||||||
|
"leakURL": "",
|
||||||
|
"rule": "Google API key",
|
||||||
|
"commitMessage": "",
|
||||||
|
"author": "",
|
||||||
|
"email": "",
|
||||||
|
"file": ".",
|
||||||
|
"date": "0001-01-01T00:00:00Z",
|
||||||
|
"tags": "key, Google"
|
||||||
|
}
|
||||||
|
]
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
SQUARE_OAUTH=sq0csp-QZxqK3fHycIxFsjZ7_HoqRN08qY2by3wLXcfJCfsKEg
|
||||||
|
|
||||||
|
GOOGLE_MAPS_KEY=AIzaSyDtz3Di0ZrzeU5ET3UFU0p-xP4bx2FkSrg
|
||||||
Reference in new issue
Block a user