Skip to content

Commit 24c9bb2

Browse files
x-f1v3smowton
authored andcommitted
autoformat
1 parent 168fc41 commit 24c9bb2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsApiCall.ql

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import HardcodedCredentials
1616
import DataFlow::PathGraph
1717
import semmle.code.java.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
1818

19-
2019
class 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) {

0 commit comments

Comments
 (0)