Skip to content

Conversation

@jeongsoolee09
Copy link
Contributor

@jeongsoolee09 jeongsoolee09 commented Aug 13, 2025

What This PR Contributes

Port over UI5PathGraph and all UI5 queries depending on it

Port UI5 queries from the old data flow API that uses TaintTracking::Configuration to the new one. Porting UI5 queries requires care since it depends on UI5PathGraph that enables UI5 binding paths appearing in UI5 views (e.g. XML views) to be included in the path information.

The implementation of UI5PathGraph previously depended upon the fact that there is only one PathNode type: DataFlow::PathNode. This is no longer the case with the newer API where each data flow configuration module has their own PathNode types. Therefore, the new UI5PathGraph is parameterized on a data flow configuration module like the following:

module UI5PathGraph<DataFlow::PathNodeSig ConfigPathNode, DataFlow::PathGraphSig<ConfigPathNode> ConfigPathGraph> {
  ...
}

One could argue that it could be shortened to module UI5PathGraph<DataFlow::GlobalFlowSig ConfigModule> based on the usage module UI5XssUI5PathGraph = UI5PathGraph<UI5XssFlow::PathNode, UI5XssFlow::PathGraph>, but ConfigModule::PathNode does not expose getNode since there is no type-level constraint on the member PathNode (its declaration is only class PathNode;).

Resolve deprecation warning on AmdModuleDefinition.getDependency/1

Use AmdModuleDefinition.getDependencyExpr/1 instead because of the above being deprecated.

Future Works

  • Write a developer's guideline on using the new UI5PathGraph, as it is easy to forget to import the instantiated UI5PathGraph.
  • Resolve the deprecation warning on PathString.

All of the disappeared edges are circular ones that "circles back"
on itself and does not influence the analysis at all.
- Port over UI5PathInjection.
- Create a UI5PathInjectionQuery file and move the configuration there.
- Update expected results of the query.
@jeongsoolee09 jeongsoolee09 changed the title Port UI5PathGraph to use the newer data flow API Port UI5PathGraph to use the newer data flow API Aug 13, 2025
NOTE: The end-to-end results of the queries are okay (the #select portion is unchanged),
but there are difference in `nodes` and `edges` that probably needs attention.
NOTE: The end-to-end results of the queries are okay (the `#select` portion is unchanged),
but there are difference in `nodes` and `edges` that probably needs attention.
These are results with changes in only nodes and edges.
We accept it because it means there are no changes in
the overall behavior.
These are results with changes in only nodes and edges.
We accept it because it means there are no changes in
the overall behavior.
…-security/codeql-sap-js into jeongsoolee09/port-UI5PathGraph
@jeongsoolee09 jeongsoolee09 marked this pull request as ready for review August 19, 2025 19:24
Copy link
Contributor

@knewbury01 knewbury01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

other than a few small questions/nitpicks, this looks good to me!

one more last little request/suggestion - maybe we can also open an issue for the future works item: Write a developer's guideline on using the new UI5PathGraph, as it is easy to forget to import the instantiated UI5PathGraph.

…-security/codeql-sap-js into jeongsoolee09/port-UI5PathGraph
@jeongsoolee09
Copy link
Contributor Author

@knewbury01 Issue opened at #229!

Copy link
Contributor

@knewbury01 knewbury01 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! thanks for addressing the comments :)

@jeongsoolee09 jeongsoolee09 merged commit fb69b74 into main Sep 8, 2025
5 checks passed
@jeongsoolee09 jeongsoolee09 deleted the jeongsoolee09/port-UI5PathGraph branch September 8, 2025 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants