You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Model manifest-created UI5 client data models - #447
Infers JSON model types from referenced JSON data sources through MaD client-data-model types.
Associates each model with the nearest owning UI5 component, including standalone and nested components.
Tracks path-specific, bidirectional model flow through declarative bindings:
Resolves relative paths through nested items binding contexts.
Keeps unrelated model paths separate to avoid false-positive flows.
Honors setDefaultBindingMode(BindingMode.OneWay) and component, view, control, and ancestor-control model overrides.
Represents bindings in .view.json files with synthesized data-flow nodes, enabling manifest-backed Input-to-HTML XSS flows in JSON views.
Reorganizes UI5 model support into focused libraries:
UI5DataModels.qll owns model references, concrete JSON/XML/resource/OData models, manifest model declarations, binding modes, and binding-path resolution.
JsonBindingTarget.qll provides local-overlay data-flow nodes for JSON-view property bindings.
UI5.qll, UI5View.qll, and RemoteFlowSources.qll retain their component, view, and remote-source responsibilities.
Adds focused regression coverage for manifest-created models in XML and JSON views, nested components, overrides, one-way binding, and path isolation.
Demonstrates the detected XSS flows in code scanning:
Remove cross-controller model-binding edges after resolving each binding against its owning model.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Route repeated bindings through one canonical component/path hub and add a regression that enumerates each hub once.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Propagate model content to controls for all bindings and allow control-to-model flow only for two-way modes, using a non-source canonical hub.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Require JSON-view source and sink bindings to target the specific modeled member, with tooltip and visible false-positive coverage.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Default manifest-model references cannot pass this predicate: getModel() has no model name, and getResolvedModel() only follows an explicit setModel call. The existing LocalModelSetPropertyStep/LocalModelGetPropertyStep therefore skip calls such as this.getView().getModel().setProperty("/value", input) for the newly modeled auto-created model, so imperative reads/writes never connect to its declarative bindings. Resolve unmatched default references to the owning DefaultManifestJsonModel and add path-specific flow steps and regression cases for setProperty and getProperty.
Resolve inherited control models before applying binding mode changes
Checking only for a setModel call on the exact receiver misclassifies inherited control models. For example, if an ancestor control has a local model, this.byId("child").getModel().setDefaultBindingMode(OneWay) changes that inherited local model, but this predicate associates the call with the manifest model and can disable two-way flow for unrelated manifest bindings elsewhere in the component. Resolve the reference through the same control/view/component hierarchy used by resolveModel before applying its binding mode.
This only recognizes an items property whose value is directly a binding string. A real JSONView aggregation binding is object-shaped (for example, "items": { "path": "/groups", "template": { ... } }), so Bindings.qll creates no JsonBindingPath for items and descendants in the template never acquire the collection context. The added fixture masks this by using a nonstandard string items property with controls in a separate content array. Support object-form aggregation bindings and test with a valid path/template JSONView so nested relative paths work in deployed applications.
Fix reversed location parameter order in UI5Control.hasLocationInfo
These expected locations have line and column positions swapped: the outer object spans 4:5–14:5, and the nested object spans 9:19–12:9 (the file has only 16 lines, so 19:9–9:12 cannot be valid). This exposes the reversed integer parameters in UI5Control.hasLocationInfo; accepting these results preserves incorrect locations for JSON controls and downstream alerts. Change that predicate to the standard (startline, startcolumn, endline, endcolumn) order and regenerate this expected file.
JavaScript-view controls are omitted from this hierarchy. JsViewBindingPath.getControlDeclaration() returns an asJsControl(), so a setModel(...) on that control is never considered by getControlSetModelCall or hasDefaultModelOverride; bindings can therefore resolve to a view/component/manifest model instead of the closer control model. Include the JS control itself here (and any representable JS-control ancestry).
Recognize positional JavaScript control IDs and include the JS control itself when selecting the nearest setModel assignment.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
A valid root-array aggregation uses items="{/}". For a relative child such as {value}, this concatenation produces //value instead of /value, so path-specific model flow no longer matches other bindings to the same runtime property. Normalize the separator when the enclosing absolute path is /.
Honor effective binding mode for reverse edges and source classification
This reverse edge uses only the model's default mode. A property binding can explicitly set mode: 'OneWay' or OneTime, overriding a TwoWay model; such a binding is still connected back to the model here and is also classified as a remote source in RemoteFlowSources.qll, producing false-positive XSS flow. Compute the effective mode per binding and apply it both here and when classifying source controls.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What This PR Contributes
manifest.json:sap.ui.model.json.JSONModelinstances.itemsbinding contexts.setDefaultBindingMode(BindingMode.OneWay)and component, view, control, and ancestor-control model overrides..view.jsonfiles with synthesized data-flow nodes, enabling manifest-backedInput-to-HTMLXSS flows in JSON views.UI5DataModels.qllowns model references, concrete JSON/XML/resource/OData models, manifest model declarations, binding modes, and binding-path resolution.JsonBindingTarget.qllprovides local-overlay data-flow nodes for JSON-view property bindings.UI5.qll,UI5View.qll, andRemoteFlowSources.qllretain their component, view, and remote-source responsibilities.