Skip to content

Commit f541012

Browse files
committed
Demote LogArgumentToListener to a query-dependent flow step
1 parent 8d7c49c commit f541012

File tree

2 files changed

+3
-22
lines changed

2 files changed

+3
-22
lines changed

javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/UI5LogsToHttpQuery.qll

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ module UI5LogEntryToHttp implements DataFlow::StateConfigSig {
3030
preState = postState
3131
or
3232
/*
33-
* NOTE: This disjunct is a labeled version of LogArgumentToListener in
34-
* FlowSteps.qll, a DataFlow::SharedFlowStep. As the class is considered
35-
* legacy on version 2.4.0, we leave the two here (labeled) and there
36-
* (unlabeled). This is something we should also tidy up when we migrate
37-
* to the newer APIs.
33+
* Jump from any argument of a SAP logging function to the `onLogEntry`
34+
* method of a custom log listener in the same application.
3835
*/
3936

4037
inSameWebApp(start.getFile(), end.getFile()) and

javascript/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/dataflow/FlowSteps.qll

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -341,20 +341,4 @@ class ResourceBundleGetTextCallArgToReturnValueStep extends DataFlow::SharedFlow
341341
end = getTextCall
342342
)
343343
}
344-
}
345-
346-
/**
347-
* A step from any argument of a SAP logging function to the `onLogEntry`
348-
* method of a custom log listener in the same application.
349-
*/
350-
class LogArgumentToListener extends DataFlow::SharedFlowStep {
351-
override predicate step(DataFlow::Node start, DataFlow::Node end) {
352-
inSameWebApp(start.getFile(), end.getFile()) and
353-
start =
354-
ModelOutput::getATypeNode("SapLogger")
355-
.getMember(["debug", "error", "fatal", "info", "trace", "warning"])
356-
.getACall()
357-
.getAnArgument() and
358-
end = ModelOutput::getATypeNode("SapLogEntries").asSource()
359-
}
360-
}
344+
}

0 commit comments

Comments
 (0)