File tree Expand file tree Collapse file tree
java/ql/src/Security/CWE/CWE-798 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,7 +16,6 @@ import HardcodedCredentials
1616import DataFlow:: PathGraph
1717import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
1818
19-
2019class HardcodedCredentialApiCallConfiguration extends DataFlow:: Configuration {
2120 HardcodedCredentialApiCallConfiguration ( ) { this = "HardcodedCredentialApiCallConfiguration" }
2221
@@ -29,10 +28,14 @@ class HardcodedCredentialApiCallConfiguration extends DataFlow::Configuration {
2928
3029 override predicate isAdditionalFlowStep ( DataFlow:: Node node1 , DataFlow:: Node node2 ) {
3130 node1 .asExpr ( ) .getType ( ) instanceof TypeString and
32- ( exists ( MethodAccess ma | ma .getMethod ( ) .hasName ( [ "getBytes" , "toCharArray" ] ) |
33- node2 .asExpr ( ) = ma and
34- ma .getQualifier ( ) = node1 .asExpr ( ) ) or FlowSummaryImpl:: Private:: Steps:: summaryThroughStep ( node1 , node2 , false ) )
35-
31+ (
32+ exists ( MethodAccess ma | ma .getMethod ( ) .hasName ( [ "getBytes" , "toCharArray" ] ) |
33+ node2 .asExpr ( ) = ma and
34+ ma .getQualifier ( ) = node1 .asExpr ( )
35+ )
36+ or
37+ FlowSummaryImpl:: Private:: Steps:: summaryThroughStep ( node1 , node2 , false )
38+ )
3639 }
3740
3841 override predicate isBarrier ( DataFlow:: Node n ) {
You can’t perform that action at this time.
0 commit comments