File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
java/ql/lib/experimental/quantum Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -1047,6 +1047,21 @@ module JCAModel {
10471047 }
10481048 }
10491049
1050+ /**
1051+ * An instance of `java.security.SecureRandom.nextBytes(byte[])` call.
1052+ * This is already generally modeled for Java in CodeQL, but
1053+ * we model it again as part of the crypto API model to have a cohesive model.
1054+ */
1055+ class JavaSecuritySecureRandom extends Crypto:: RandomNumberGenerationInstance instanceof Call {
1056+ JavaSecuritySecureRandom ( ) {
1057+ this .getCallee ( ) .hasQualifiedName ( "java.security" , "SecureRandom" , "nextBytes" )
1058+ }
1059+
1060+ override Crypto:: DataFlowNode getOutputNode ( ) { result .asExpr ( ) = this .( Call ) .getArgument ( 0 ) }
1061+
1062+ override string getGeneratorName ( ) { result = this .( Call ) .getCallee ( ) .getName ( ) }
1063+ }
1064+
10501065 class KeyGeneratorGenerateCall extends Crypto:: KeyGenerationOperationInstance instanceof MethodCall
10511066 {
10521067 Crypto:: KeyArtifactType type ;
You can’t perform that action at this time.
0 commit comments