Swift: Clean up the test logic slightly.

This commit is contained in:
Geoffrey White
2023-11-20 14:19:37 +00:00
parent b348dc2a32
commit 06c2c423b3

View File

@@ -7,11 +7,10 @@ module CleartextLogging implements TestSig {
string getARelevantTag() { result = "hasCleartextLogging" }
predicate hasActualResult(Location location, string element, string tag, string value) {
exists(DataFlow::Node source, DataFlow::Node sink, Expr sinkExpr |
exists(DataFlow::Node source, DataFlow::Node sink |
CleartextLoggingFlow::flow(source, sink) and
sinkExpr = sink.asExpr() and
location = sinkExpr.getLocation() and
element = sinkExpr.toString() and
location = sink.getLocation() and
element = sink.toString() and
tag = "hasCleartextLogging" and
value = source.asExpr().getLocation().getStartLine().toString()
)