mirror of
https://github.com/github/codeql.git
synced 2026-04-23 07:45:17 +02:00
Add org.apache.commons.lang.RandomStringUtils as a source
This commit is contained in:
@@ -29,6 +29,21 @@ private class JavaRandomSource extends WeakRandomnessSource {
|
||||
}
|
||||
}
|
||||
|
||||
private class ApacheRandomStringUtilsMethodAccessSource extends WeakRandomnessSource {
|
||||
ApacheRandomStringUtilsMethodAccessSource() {
|
||||
exists(MethodAccess ma | this.asExpr() = ma |
|
||||
ma.getMethod()
|
||||
.hasName([
|
||||
"random", "randomAlphabetic", "randomAlphanumeric", "randomAscii", "randomGraph",
|
||||
"randomNumeric", "randomPrint"
|
||||
]) and
|
||||
ma.getMethod()
|
||||
.getDeclaringType()
|
||||
.hasQualifiedName("org.apache.commons.lang", "RandomStringUtils")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The `random` method of `java.lang.Math`.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user