mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Adding Membership.GeneratePassword() as a bad source of random data because of the bias.
This commit is contained in:
@@ -59,6 +59,12 @@ module Random {
|
||||
this.getExpr() =
|
||||
any(MethodCall mc |
|
||||
mc.getQualifier().getType().(RefType).hasQualifiedName("System", "Random")
|
||||
or
|
||||
// by using `% 87` on a `byte`, this function has a bias
|
||||
mc.getQualifier()
|
||||
.getType()
|
||||
.(RefType)
|
||||
.hasQualifiedName("System.Web.Security", "GeneratePassword")
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user