File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed
java/ql/lib/semmle/code/java Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change
1
+ /**
2
+ * Provides classes and predicates for working with the OpenSAML libraries.
3
+ */
4
+
5
+ import java
6
+ private import semmle.code.java.security.InsecureRandomnessQuery
7
+
8
+ /** The interface `org.opensaml.saml.saml2.core.RequestAbstractType`. */
9
+ class SamlRequestAbstractType extends Interface {
10
+ SamlRequestAbstractType ( ) {
11
+ this .hasQualifiedName ( "org.opensaml.saml.saml2.core" , "RequestAbstractType" )
12
+ }
13
+ }
14
+
15
+ /** The method `setID` of the interface `RequestAbstractType`. */
16
+ class SamlRequestSetIdMethod extends Method {
17
+ SamlRequestSetIdMethod ( ) {
18
+ this .getDeclaringType ( ) instanceof SamlRequestAbstractType and
19
+ this .hasName ( "setID" )
20
+ }
21
+ }
22
+
23
+ private class SamlRequestSetIdSink extends InsecureRandomnessSink {
24
+ SamlRequestSetIdSink ( ) {
25
+ exists ( MethodCall c | c .getMethod ( ) instanceof SamlRequestSetIdMethod |
26
+ c .getArgument ( 0 ) = this .asExpr ( )
27
+ )
28
+ }
29
+ }
Original file line number Diff line number Diff line change 1
1
/** Provides classes and predicates for reasoning about insecure randomness. */
2
2
3
3
import java
4
+ private import semmle.code.java.frameworks.OpenSaml
4
5
private import semmle.code.java.frameworks.Servlets
5
6
private import semmle.code.java.security.SensitiveActions
6
7
private import semmle.code.java.security.SensitiveApi
@@ -40,7 +41,7 @@ private class TypeHadoopOsSecureRandom extends SafeRandomImplementation {
40
41
}
41
42
42
43
/**
43
- * A node representing an operation which should not use a Insecurely random value.
44
+ * A node representing an operation which should not use an insecurely random value.
44
45
*/
45
46
abstract class InsecureRandomnessSink extends DataFlow:: Node { }
46
47
You can’t perform that action at this time.
0 commit comments