Skip to content

Commit 06c2c42

Browse files
committed
Swift: Clean up the test logic slightly.
1 parent b348dc2 commit 06c2c42

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

swift/ql/test/query-tests/Security/CWE-312/CleartextLoggingTest.ql

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,10 @@ module CleartextLogging implements TestSig {
77
string getARelevantTag() { result = "hasCleartextLogging" }
88

99
predicate hasActualResult(Location location, string element, string tag, string value) {
10-
exists(DataFlow::Node source, DataFlow::Node sink, Expr sinkExpr |
10+
exists(DataFlow::Node source, DataFlow::Node sink |
1111
CleartextLoggingFlow::flow(source, sink) and
12-
sinkExpr = sink.asExpr() and
13-
location = sinkExpr.getLocation() and
14-
element = sinkExpr.toString() and
12+
location = sink.getLocation() and
13+
element = sink.toString() and
1514
tag = "hasCleartextLogging" and
1615
value = source.asExpr().getLocation().getStartLine().toString()
1716
)

0 commit comments

Comments
 (0)