Skip to content

Commit 0c4e3b1

Browse files
committed
Address review comments
1 parent fb52bfe commit 0c4e3b1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module UI5LogEntryToHttp implements DataFlow::StateConfigSig {
2929
UI5LogInjection::isAdditionalFlowStep(start, end) and
3030
preState = postState
3131
or
32-
stepLogger(start, end) and
32+
logArgumentToListener(start, end) and
3333
preState = "not-logged-not-accessed" and
3434
postState = "logged-and-accessed"
3535
}

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ class ResourceBundleGetTextCallArgToReturnValueStep extends DataFlow::SharedFlow
347347
* A step from any argument of a SAP logging function to the `onLogEntry`
348348
* method of a custom log listener in the same application.
349349
*/
350-
predicate stepLogger(DataFlow::Node start, DataFlow::Node end) {
350+
predicate logArgumentToListener(DataFlow::Node start, DataFlow::Node end) {
351351
inSameWebApp(start.getFile(), end.getFile()) and
352352
start =
353353
ModelOutput::getATypeNode("SapLogger")
@@ -357,6 +357,12 @@ predicate stepLogger(DataFlow::Node start, DataFlow::Node end) {
357357
end = ModelOutput::getATypeNode("SapLogEntries").asSource()
358358
}
359359

360+
/**
361+
* A step from any argument of a SAP logging function to the `onLogEntry`
362+
* method of a custom log listener in the same application.
363+
*/
360364
class LogArgumentToListener extends DataFlow::SharedFlowStep {
361-
override predicate step(DataFlow::Node start, DataFlow::Node end) { stepLogger(start, end) }
365+
override predicate step(DataFlow::Node start, DataFlow::Node end) {
366+
logArgumentToListener(start, end)
367+
}
362368
}

0 commit comments

Comments
 (0)