@@ -8,8 +8,8 @@ private import semmle.code.java.security.Encryption
88private import semmle.code.java.frameworks.Properties
99private import semmle.code.java.dataflow.RangeUtils
1010
11- private class GetPropertyMethodAccess extends MethodAccess {
12- GetPropertyMethodAccess ( ) { this .getMethod ( ) instanceof PropertiesGetPropertyMethod }
11+ private class GetPropertyMethodCall extends MethodCall {
12+ GetPropertyMethodCall ( ) { this .getMethod ( ) instanceof PropertiesGetPropertyMethod }
1313
1414 private ConfigPair getPair ( ) {
1515 this .getArgument ( 0 ) .( ConstantStringExpr ) .getStringValue ( ) = result .getNameElement ( ) .getName ( )
@@ -25,10 +25,10 @@ private class GetPropertyMethodAccess extends MethodAccess {
2525 * Get the name of the weak cryptographic algorithm represented by `node`.
2626 */
2727string 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
3030 |
31- ma .getArgument ( 0 ) .( ConstantStringExpr ) .getStringValue ( ) = pair .getNameElement ( ) .getName ( ) and
31+ mc .getArgument ( 0 ) .( ConstantStringExpr ) .getStringValue ( ) = pair .getNameElement ( ) .getName ( ) and
3232 pair .getValueElement ( ) .getValue ( ) = result and
3333 not pair .getValueElement ( ) .getValue ( ) .regexpMatch ( getSecureAlgorithmRegex ( ) )
3434 )
@@ -39,8 +39,8 @@ string getWeakHashingAlgorithmName(DataFlow::Node node) {
3939 */
4040module InsecureAlgorithmPropertyConfig implements DataFlow:: ConfigSig {
4141 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
4444 not algo .regexpMatch ( getSecureAlgorithmRegex ( ) )
4545 )
4646 }
0 commit comments