Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Match expected chunks to actual
Bill Rich6b183424f568
diff --git a/pkg/sources/git/git_test.go b/pkg/sources/git/git_test.goindex 6b4487c3c..089e4b203 100644--- a/pkg/sources/git/git_test.go+++ b/pkg/sources/git/git_test.go@@ -169,17 +169,17 @@ func TestSource_Chunks_Integration(t *testing.T) {},expectedChunkData: map[string]*byteCompare{"70001020fab32b1fcf2f1f0e5c66424eae649826-aws": {B: []byte("[default]\naws_access_key_id = AKIAXYZDQCEN4B6JSJQI\naws_secret_access_key = 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\noutput = json\nregion = us-east-2\n")},- "a6f8aa55736d4a85be31a0048a4607396898647a-bump": {B: []byte("f\n")},- "73ab4713057944753f1bdeb80e757380e64c6b5b-bump": {B: []byte(" s \n")},- "2f251b8c1e72135a375b659951097ec7749d4af9-bump": {B: []byte(" \n")},- "90c75f884c65dc3638ca1610bd9844e668f213c2-aws": {B: []byte("this is the secret: [Default]\nAccess key Id: AKIAILE3JG6KMS3HZGCA\nSecret Access Key: 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\nokay thank you bye\n")},- "e6c8bbabd8796ea3cd85bfc2e55b27e0a491747f-bump": {B: []byte("oops \n")},- "735b52b0eb40610002bb1088e902bd61824eb305-bump": {B: []byte("oops\n")},+ "a6f8aa55736d4a85be31a0048a4607396898647a-bump": {B: []byte(" s \noops \nf\n")},+ "73ab4713057944753f1bdeb80e757380e64c6b5b-bump": {B: []byte(" s \noops \n")},+ "2f251b8c1e72135a375b659951097ec7749d4af9-bump": {B: []byte(" \noops \n")},+ "90c75f884c65dc3638ca1610bd9844e668f213c2-aws": {B: []byte("blah blaj\n\nthis is the secret: [Default]\nAccess key Id: AKIAILE3JG6KMS3HZGCA\nSecret Access Key: 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\n\nokay thank you bye\n")},+ "e6c8bbabd8796ea3cd85bfc2e55b27e0a491747f-bump": {B: []byte("\noops \n")},+ "735b52b0eb40610002bb1088e902bd61824eb305-bump": {B: []byte("\noops\n")},"ce62d79908803153ef6e145e042d3e80488ef747-bump": {B: []byte("\n")},- "27fbead3bf883cdb7de9d7825ed401f28f9398f1-slack": {B: []byte("yup, just did that\n\ngithub_lol: \"ffc7e0f9400fb6300167009e42d2f842cd7956e2\"\n\noh, goodness. there's another one!")},+ "27fbead3bf883cdb7de9d7825ed401f28f9398f1-slack": {B: []byte("oops might drop a slack token here\n\ngithub_secret=\"369963c1434c377428ca8531fbc46c0c43d037a0\"\n\nyup, just did that\n\ngithub_lol: \"ffc7e0f9400fb6300167009e42d2f842cd7956e2\"\n\noh, goodness. there's another one!")},"8afb0ecd4998b1179e428db5ebbcdc8221214432-slack": {B: []byte("oops might drop a slack token here\n\ngithub_secret=\"369963c1434c377428ca8531fbc46c0c43d037a0\"\n\nyup, just did that")},"8fe6f04ef1839e3fc54b5147e3d0e0b7ab971bd5-aws": {B: []byte("blah blaj\n\nthis is the secret: AKIA2E0A8F3B244C9986\n\nokay thank you bye")},- "84e9c75e388ae3e866e121087ea2dd45a71068f2-aws": {B: []byte("this is the secret: [Default]\nAccess key Id: AKIAILE3JG6KMS3HZGCA\nSecret Access Key: 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\nokay thank you bye\n")},+ "84e9c75e388ae3e866e121087ea2dd45a71068f2-aws": {B: []byte("blah blaj\n\nthis is the secret: [Default]\nAccess key Id: AKIAILE3JG6KMS3HZGCA\nSecret Access Key: 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\n\nokay thank you bye\n")},},},}