Python: Adjust InsecureRandomnessCustomizations.qll

This commit is contained in:
Rasmus Wriedt Larsen
2022-08-16 09:12:21 +02:00
parent ed70e118a9
commit 2e2cee06c3

View File

@@ -59,12 +59,11 @@ module InsecureRandomness {
*/
class RandomFnSink extends Sink {
RandomFnSink() {
exists(DataFlowCallable randomFn |
randomFn
.getName()
exists(Function func |
func.getName()
.regexpMatch("(?i).*(gen(erate)?|make|mk|create).*(nonce|salt|pepper|Password).*")
|
this.getEnclosingCallable() = randomFn
this.asExpr().getScope() = func
)
}
}