@@ -8,8 +8,8 @@ private import semmle.code.java.security.Encryption
8
8
private import semmle.code.java.frameworks.Properties
9
9
private import semmle.code.java.dataflow.RangeUtils
10
10
11
- private class GetPropertyMethodAccess extends MethodAccess {
12
- GetPropertyMethodAccess ( ) { this .getMethod ( ) instanceof PropertiesGetPropertyMethod }
11
+ private class GetPropertyMethodCall extends MethodCall {
12
+ GetPropertyMethodCall ( ) { this .getMethod ( ) instanceof PropertiesGetPropertyMethod }
13
13
14
14
private ConfigPair getPair ( ) {
15
15
this .getArgument ( 0 ) .( ConstantStringExpr ) .getStringValue ( ) = result .getNameElement ( ) .getName ( )
@@ -25,10 +25,10 @@ private class GetPropertyMethodAccess extends MethodAccess {
25
25
* Get the name of the weak cryptographic algorithm represented by `node`.
26
26
*/
27
27
string getWeakHashingAlgorithmName ( DataFlow:: Node node ) {
28
- exists ( MethodAccess ma , ConfigPair pair |
29
- node .asExpr ( ) = ma and ma .getMethod ( ) instanceof PropertiesGetPropertyMethod
28
+ exists ( MethodCall mc , ConfigPair pair |
29
+ node .asExpr ( ) = mc and mc .getMethod ( ) instanceof PropertiesGetPropertyMethod
30
30
|
31
- ma .getArgument ( 0 ) .( ConstantStringExpr ) .getStringValue ( ) = pair .getNameElement ( ) .getName ( ) and
31
+ mc .getArgument ( 0 ) .( ConstantStringExpr ) .getStringValue ( ) = pair .getNameElement ( ) .getName ( ) and
32
32
pair .getValueElement ( ) .getValue ( ) = result and
33
33
not pair .getValueElement ( ) .getValue ( ) .regexpMatch ( getSecureAlgorithmRegex ( ) )
34
34
)
@@ -39,8 +39,8 @@ string getWeakHashingAlgorithmName(DataFlow::Node node) {
39
39
*/
40
40
module InsecureAlgorithmPropertyConfig implements DataFlow:: ConfigSig {
41
41
predicate isSource ( DataFlow:: Node n ) {
42
- exists ( GetPropertyMethodAccess ma , string algo | n .asExpr ( ) = ma |
43
- algo = ma .getPropertyValue ( ) and
42
+ exists ( GetPropertyMethodCall mc , string algo | n .asExpr ( ) = mc |
43
+ algo = mc .getPropertyValue ( ) and
44
44
not algo .regexpMatch ( getSecureAlgorithmRegex ( ) )
45
45
)
46
46
}
0 commit comments