File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,17 @@ func TestShouldNotFlag4CharSafeText(t *testing.T) {
41
41
assert .False (t , results .HasFailures (), "Expected file to not to contain base64 encoded texts" )
42
42
}
43
43
44
+ func TestShouldNotFlagLowEntropyBase64Text (t * testing.T ) {
45
+ const lowEntropyString string = "YWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWEK"
46
+ results := NewDetectionResults ()
47
+ content := []byte (lowEntropyString )
48
+ filename := "filename"
49
+ additions := []git_repo.Addition {git_repo .NewAddition (filename , content )}
50
+
51
+ NewFileContentDetector ().Test (additions , NewIgnores (), results )
52
+ assert .False (t , results .HasFailures (), "Expected file to not to contain base64 encoded texts" )
53
+ }
54
+
44
55
func TestShouldFlagPotentialAWSSecretKeys (t * testing.T ) {
45
56
const awsSecretAccessKey string = "wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY"
46
57
results := NewDetectionResults ()
You can’t perform that action at this time.
0 commit comments