mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Python: avoid missing cryptography uses due to unhandled encryption modes
Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
@@ -195,9 +195,9 @@ private module CryptographyModel {
|
||||
call.getArg(0), call.getArgByName("algorithm")
|
||||
] and
|
||||
exists(DataFlow::Node modeArg | modeArg in [call.getArg(1), call.getArgByName("mode")] |
|
||||
modeArg = modeClassRef(modeName).getReturn().getAUse()
|
||||
or
|
||||
modeArg.asExpr() instanceof None and modeName = "<none>"
|
||||
if modeArg = modeClassRef(modeName).getReturn().getAUse()
|
||||
then any()
|
||||
else modeName = "<None or unknown>"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user