@@ -27,6 +27,13 @@ private class RemoteControlHandlerParameter extends RemoteControlAPISource, Call
2727 }
2828}
2929
30+ /**
31+ * A remote flow source representing user-provided data fetched from UI5 input controls.
32+ *
33+ * This class models data obtained from control references (such as `HTML` or `CodeEditor`)
34+ * or from handler parameters, via property reads or getter methods like `getValue()` or
35+ * `getCurrentValue()`. These represent user input that could potentially be tainted.
36+ */
3037private class UserDataFromRemoteControlAPISource extends RemoteFlowSource {
3138 UserDataFromRemoteControlAPISource ( ) {
3239 exists ( RemoteControlAPISource remoteControlAPISource |
@@ -143,42 +150,23 @@ class ODataServiceModel extends UI5ExternalModel {
143150 override string getSourceType ( ) { result = "ODataServiceModel" }
144151
145152 ODataServiceModel ( ) {
146- exists ( MethodCallNode setModelCall , CustomController controller |
147- /*
148- * 1. This flows from a DF node corresponding to the parent component's model
149- * to the `this.setModel` call. e.g.
150- *
151- * `this.getOwnerComponent().getModel("someModelName")` as in
152- * `this.getView().setModel(this.getOwnerComponent().getModel("someModelName"))`.
153- */
154-
155- modelName = this .getArgument ( 0 ) .getALocalSource ( ) .asExpr ( ) .( StringLiteral ) .getValue ( ) and
153+ exists ( CustomController controller |
156154 this .getCalleeName ( ) = "getModel" and
157- controller .getOwnerComponentRef ( ) .flowsTo ( this .( MethodCallNode ) .getReceiver ( ) ) and
158- this .flowsTo ( setModelCall .getArgument ( 0 ) ) and
159- setModelCall = controller .getAViewReference ( ) .getAMemberCall ( "setModel" ) and
160- /*
161- * 2. The component's `manifest.json` declares the DataSource as being of OData type.
162- */
163-
155+ modelName = this .getArgument ( 0 ) .getALocalSource ( ) .getStringValue ( ) and
164156 controller .getOwnerComponent ( ) .getExternalModelDef ( modelName ) .getDataSource ( ) instanceof
165- ODataDataSourceManifest
157+ ODataDataSourceManifest // A component's `manifest.json` declares the data source as being of OData type.
166158 )
167159 or
168160 /*
169- * A constructor call to sap.ui.model.odata.v2.ODataModel or sap.ui.model.odata.v4.ODataModel.
161+ * A constructor call to ` sap.ui.model.odata.v2.ODataModel` or ` sap.ui.model.odata.v4.ODataModel` .
170162 */
171163
172164 this instanceof NewNode and
173- (
174- exists ( RequiredObject oDataModel |
175- oDataModel .asSourceNode ( ) .flowsTo ( this .getCalleeNode ( ) ) and
176- oDataModel .getDependency ( ) in [
177- "sap/ui/model/odata/v2/ODataModel" , "sap/ui/model/odata/v4/ODataModel"
178- ]
179- )
180- or
181- this .getCalleeName ( ) = "ODataModel"
165+ exists ( RequiredObject oDataModel |
166+ oDataModel .asSourceNode ( ) .flowsTo ( this .getCalleeNode ( ) ) and
167+ oDataModel .getDependency ( ) in [
168+ "sap/ui/model/odata/v2/ODataModel" , "sap/ui/model/odata/v4/ODataModel"
169+ ]
182170 ) and
183171 modelName = "<no name>"
184172 }
0 commit comments