username = project.findProperty("repoUsername") as
|
Warning: Hardcoded secrets or credentials found in the source code. Hardcoding sensitive information such as passwords, tokens, and API keys can expose secrets and increase the risk of data leaks.
|
password = project.findProperty("repoPassword") as
|
|
val keyStore = KeyStore.getInstance(KeyStore.getDe
|
|
keyStore.load(null, null)
|
|
trustManagerFactory.init(keyStore)
|
|
private static final Path basePath = Paths.get(Sys
|
|
// Show save dialog and get the user's choice
|
|
int userSelection = fileChooser.showSaveDialog(nul
|
|
this.className = className;
|
|
String className;
|
|
return className;
|
|
itemFiles.add(new ItemFile(specificLocation, ext,
|
|
String className;
|
|
this.className = className;
|
|
return className;
|
|
public static void addToReport(String cweCode, Str
|
|
newItem.setClassName(className);
|
|
.collect(Collectors.groupingBy(ItemReport::getCweC
|
|
String cweCode = entry.getKey();
|
|
// Grouping reports by CWE Code
|
|
.collect(Collectors.groupingBy(ItemReport::getCweC
|
|
String cweCode = entry.getKey();
|
|
String ext = entry.getKey();
|
|
String cweLabels = cweCounts.keySet()
|
|
String cweLabels = cweCounts.keySet()
|
|
// Grouping reports by CWE Code
|
|
.collect(Collectors.groupingBy(ItemReport::getCweC
|
|
.append(entry.getKey())
|
|
String cweCode = entry.getKey();
|
|
// .collect(Collectors.groupingBy(ext -
|
|
.collect(Collectors.groupingBy(ext -> ext, Collect
|
|
String msg = "Warning: Hardcoded secrets or creden
|
|
"and API keys can expose secrets and increase the
|
|
private static final Pattern KEYWORD_PATTERN = Pat
|
|
"(password|pwd|passwd|pass|user_password|user_pwd|
|
|
List sensitiveKeys = Arrays.asList("passwo
|
|
"auth_token", "token", "session_token", "oauth_tok
|
|
"secret_key", "api_token", "jwt_token", "jwt_secre
|
|
"ssh_key", "rsa_key", "dsa_key", "ecdsa_key", "x50
|
|
"secret_access_key", "security_key", "symmetric_ke
|
|
"authentication", "login", "userid", "user_id", "u
|
|
"license_key", "account_number", "bank_account", "
|
|
this.vulnerabilities = Vulnerabilities.HARDCODED_S
|
|
private final List ignoredKeys = Arrays.as
|
|
if (ignoredKeys.stream().noneMatch(line::contains)
|
|
Matcher matcher = KEYWORD_PATTERN.matcher(line);
|
|
new HardCodedSecretDetector(),
|
|
new WeakAlgorithm("(?i)Cipher\\s*\\.\\s*getInstanc
|
|
new WeakAlgorithm("(?i)Cipher\\s*\\.\\s*getInstanc
|
|
new WeakAlgorithm("(?i)KeyPairGenerator\\s*\\.\\s*
|
|
new WeakAlgorithm("(?i)KeyPairGenerator\\s*\\.\\s*
|
|
public String className;
|
|
className = pathStr;
|
|
className = pathStr.replace(SourceSet.SEP, ".")
|
|
Reports.detect("",extName, className);
|
|
return (Config.outputFileFormat == OutputFileForma
|
|
message, priority, className, extName);
|
|
message, vulnerabilities.getPriority(), className,
|
|
HARDCODED_SECRETS("Hardcoded Secrets and Credentia
|
|
INADEQUATE_AUTHENTICATION("Inadequate Authenticati
|
|
public static final String PINK = Config.outputFil
|
|
public static final String BRIGHT_PINK = Config.ou
|
|