public class SecretDetector extends Object
| Constructor and Description |
|---|
SecretDetector() |
| Modifier and Type | Method and Description |
|---|---|
static String |
filterAccessTokens(String message)
Filter access tokens that might be buried in JSON.
|
static boolean |
isSensitive(String name)
Check whether the name is sensitive
|
static String |
maskAWSSecret(String sql)
mask AWS secret in the input string
|
static String |
maskSASToken(String text)
Masks SAS token(s) in the input string
|
static String |
maskSecrets(String text)
Masks any secrets present in the input string.
|
public static boolean isSensitive(String name)
name - public static String maskAWSSecret(String sql)
sql - The sql text to maskpublic static String maskSASToken(String text)
text - Text which may contain SAS token(s)public static String maskSecrets(String text)
maskSASToken(String)) and AWS keys
(maskAWSSecret(String).text - Text which may contain secretspublic static String filterAccessTokens(String message)
message - the message text which may contain secretsCopyright © 2019. All rights reserved.