@@ -29,6 +29,9 @@ func TestShouldDetectPasswordPatterns(t *testing.T) {
29
29
shouldPassDetectionOfSecretPattern (filename , []byte (values [i ]+ "=UnsafeString" ), t )
30
30
shouldPassDetectionOfSecretPattern (filename , []byte ("." + values [i ]+ "=randomStringGoesHere}" ), t )
31
31
shouldPassDetectionOfSecretPattern (filename , []byte (":" + values [i ]+ " randomStringGoesHere" ), t )
32
+ shouldPassDetectionOfSecretPattern (filename , []byte (values [i ]+ " ,\" randomStringGoesHere\" " ), t )
33
+ shouldPassDetectionOfSecretPattern (filename , []byte ("'" + values [i ]+ "' ,\" randomStringGoesHere\" " ), t )
34
+ shouldPassDetectionOfSecretPattern (filename , []byte ("\" " + values [i ]+ "\" ,\" randomStringGoesHere\" " ), t )
32
35
shouldPassDetectionOfSecretPattern (filename ,
33
36
[]byte ("\" SERVER_" + strings .ToUpper (values [i ])+ "\" : UnsafeString" ),
34
37
t )
@@ -55,7 +58,7 @@ func TestShouldDetectPasswordPatterns(t *testing.T) {
55
58
56
59
shouldFailDetectionOfSecretPattern (filename , []byte ("\" pAsSWoRD\" :1234567" ), t )
57
60
shouldFailDetectionOfSecretPattern (filename , []byte (`setPassword("12345678")` ), t )
58
- shouldFailDetectionOfSecretPattern (filename , []byte (`setenv(password, "12345678" )` ), t )
61
+ shouldFailDetectionOfSecretPattern (filename , []byte (`setenv(password,123456 )` ), t )
59
62
shouldFailDetectionOfSecretPattern (filename , []byte (`random=12345678)` ), t )
60
63
}
61
64
0 commit comments