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 11/** Provides classes and predicates for reasoning about insecure randomness. */
22
33import java
4+ private import semmle.code.java.frameworks.OpenSaml
45private import semmle.code.java.frameworks.Servlets
56private import semmle.code.java.security.SensitiveActions
67private import semmle.code.java.security.SensitiveApi
@@ -40,7 +41,7 @@ private class TypeHadoopOsSecureRandom extends SafeRandomImplementation {
4041}
4142
4243/**
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.
4445 */
4546abstract class InsecureRandomnessSink extends DataFlow:: Node { }
4647
You can’t perform that action at this time.
0 commit comments