Skip to content

Conversation

jeongsoolee09
Copy link
Contributor

@jeongsoolee09 jeongsoolee09 commented Mar 18, 2024

What this PR contributes

Cover new XSS vulnerability

Cover an XSS vulnerability previously not covered, which required these changes:

Add new tests

Bump versions

  • Bump versions across UI5 qlpack.yml from 0.5.0 to 0.6.0.

Limitations

The two APIs, sap.ui.core.routing.Target.attachDisplay and sap.base.i18n.ResourceBundle.getText, cannot be expressed as MaD rows since the type of the object that this points to cannot be resolved using MaD. The former is obtained via access path this.getOwnerComponent().getRouter().getTarget("...").attachDisplay() and the latter via this.getOwnerComponent().getModel("...").getResourceBundle(). Here, both this points to the sap.ui.core.Component that is being imported, and the relationship between the two cannot be automatically resolved through the mechanism used in MaD.

Future Work

If possible:

  • Recognize all other APIs similar to sap.base.i18n.ResourceBundle.getText and sap.ui.core.routing.Target.attachDisplay, respectively.

1. Model `Router.getTarget()`,
2. Model `DisplayEventHandler` (as 0-th argument to `attachDisplay` and `detachDisplay` method calls)
3. Model `DisplayEventHandler`'s 0-th parameter as `DisplayEventHandlerParameterAccess` in `RemoteFlowSources.qll`
@jeongsoolee09 jeongsoolee09 requested a review from mbaluda March 18, 2024 19:14
Copy link
Contributor

@mbaluda mbaluda left a comment

Choose a reason for hiding this comment

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

Looks good to me!
You could add a test for the added flow steps

@jeongsoolee09 jeongsoolee09 merged commit 5862e5d into main Mar 21, 2024
@jeongsoolee09 jeongsoolee09 deleted the jeongsoolee09/cover-missing-xss branch March 21, 2024 03:07
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