-
Notifications
You must be signed in to change notification settings - Fork 4
Adds a local source for separate Control implementations. #329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a40522a
Adds a local source for separate Control implementations.
mbaluda 3e102b1
Remove refereence to Controller
mbaluda 1ef98ef
Merge branch 'main' into mbaluda/control-source
mbaluda 521565e
Adds test for separate control implementation
mbaluda 549a32e
fix expected file
mbaluda 65a8a76
Additional flow steps do not cross application boundaries
mbaluda 066369a
Fix expected file
mbaluda 6d58e86
Fix sarif expected file
mbaluda 48d20ae
Merge branch 'main' into mbaluda/control-source
data-douser File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
237 changes: 129 additions & 108 deletions
237
...ipt/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/dataflow/FlowSteps.qll
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
17 changes: 0 additions & 17 deletions
17
javascript/frameworks/ui5/test/queries/UI5Xss/xss-custom-control-api2/UI5Xss.expected
This file was deleted.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
javascript/frameworks/ui5/test/queries/UI5Xss/xss-custom-control-apis/UI5Xss.expected
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,37 @@ | ||
| nodes | ||
| | xss-custom-control-api3/webapp/control/xss.js:7:23:7:40 | { type: "string" } | | ||
| | xss-custom-control-api3/webapp/control/xss.js:8:24:8:41 | { type: "string" } | | ||
| | xss-custom-control-api3/webapp/control/xss.js:15:32:15:49 | oControl.getText() | | ||
| | xss-custom-control-api3/webapp/control/xss.js:16:32:16:50 | oControl.getText2() | | ||
| | xss-custom-control-api3/webapp/controller/app.controller.js:9:17:9:27 | input: null | | ||
| | xss-custom-control-api3/webapp/view/app.view.xml:5:5:7:28 | value={/input} | | ||
| | xss-custom-control-api3/webapp/view/app.view.xml:8:5:8:38 | text={/input} | | ||
| | xss-custom-control.api2/webapp/control/xss.js:7:23:7:40 | { type: "string" } | | ||
| | xss-custom-control.api2/webapp/control/xss.js:14:32:14:49 | oControl.getText() | | ||
| | xss-custom-control.api2/webapp/controller/app.controller.js:9:17:9:27 | input: null | | ||
| | xss-custom-control.api2/webapp/view/app.view.xml:5:5:7:28 | value={/input} | | ||
| | xss-custom-control.api2/webapp/view/app.view.xml:8:5:8:38 | text={/input} | | ||
| edges | ||
| | xss-custom-control-api3/webapp/control/xss.js:7:23:7:40 | { type: "string" } | xss-custom-control-api3/webapp/control/xss.js:15:32:15:49 | oControl.getText() | | ||
| | xss-custom-control-api3/webapp/control/xss.js:7:23:7:40 | { type: "string" } | xss-custom-control-api3/webapp/controller/app.controller.js:9:17:9:27 | input: null | | ||
| | xss-custom-control-api3/webapp/control/xss.js:8:24:8:41 | { type: "string" } | xss-custom-control-api3/webapp/control/xss.js:16:32:16:50 | oControl.getText2() | | ||
| | xss-custom-control-api3/webapp/controller/app.controller.js:9:17:9:27 | input: null | xss-custom-control-api3/webapp/control/xss.js:7:23:7:40 | { type: "string" } | | ||
| | xss-custom-control-api3/webapp/controller/app.controller.js:9:17:9:27 | input: null | xss-custom-control-api3/webapp/view/app.view.xml:5:5:7:28 | value={/input} | | ||
| | xss-custom-control-api3/webapp/controller/app.controller.js:9:17:9:27 | input: null | xss-custom-control-api3/webapp/view/app.view.xml:8:5:8:38 | text={/input} | | ||
| | xss-custom-control-api3/webapp/view/app.view.xml:5:5:7:28 | value={/input} | xss-custom-control-api3/webapp/controller/app.controller.js:9:17:9:27 | input: null | | ||
| | xss-custom-control-api3/webapp/view/app.view.xml:5:5:7:28 | value={/input} | xss-custom-control-api3/webapp/controller/app.controller.js:11:26:11:45 | new JSONModel(oData) | | ||
| | xss-custom-control-api3/webapp/view/app.view.xml:8:5:8:38 | text={/input} | xss-custom-control-api3/webapp/controller/app.controller.js:9:17:9:27 | input: null | | ||
| | xss-custom-control.api2/webapp/control/xss.js:7:23:7:40 | { type: "string" } | xss-custom-control.api2/webapp/control/xss.js:14:32:14:49 | oControl.getText() | | ||
| | xss-custom-control.api2/webapp/control/xss.js:7:23:7:40 | { type: "string" } | xss-custom-control.api2/webapp/controller/app.controller.js:9:17:9:27 | input: null | | ||
| | xss-custom-control.api2/webapp/controller/app.controller.js:9:17:9:27 | input: null | xss-custom-control.api2/webapp/control/xss.js:7:23:7:40 | { type: "string" } | | ||
| | xss-custom-control.api2/webapp/controller/app.controller.js:9:17:9:27 | input: null | xss-custom-control.api2/webapp/view/app.view.xml:5:5:7:28 | value={/input} | | ||
| | xss-custom-control.api2/webapp/controller/app.controller.js:9:17:9:27 | input: null | xss-custom-control.api2/webapp/view/app.view.xml:8:5:8:38 | text={/input} | | ||
| | xss-custom-control.api2/webapp/view/app.view.xml:5:5:7:28 | value={/input} | xss-custom-control.api2/webapp/controller/app.controller.js:9:17:9:27 | input: null | | ||
| | xss-custom-control.api2/webapp/view/app.view.xml:5:5:7:28 | value={/input} | xss-custom-control.api2/webapp/controller/app.controller.js:11:26:11:45 | new JSONModel(oData) | | ||
| | xss-custom-control.api2/webapp/view/app.view.xml:8:5:8:38 | text={/input} | xss-custom-control.api2/webapp/controller/app.controller.js:9:17:9:27 | input: null | | ||
| #select | ||
| | xss-custom-control-api3/webapp/control/xss.js:15:32:15:49 | oControl.getText() | xss-custom-control-api3/webapp/control/xss.js:7:23:7:40 | { type: "string" } | xss-custom-control-api3/webapp/control/xss.js:15:32:15:49 | oControl.getText() | XSS vulnerability due to $@. | xss-custom-control-api3/webapp/control/xss.js:7:23:7:40 | { type: "string" } | user-provided value | | ||
| | xss-custom-control-api3/webapp/control/xss.js:15:32:15:49 | oControl.getText() | xss-custom-control-api3/webapp/view/app.view.xml:5:5:7:28 | value={/input} | xss-custom-control-api3/webapp/control/xss.js:15:32:15:49 | oControl.getText() | XSS vulnerability due to $@. | xss-custom-control-api3/webapp/view/app.view.xml:5:5:7:28 | value={/input} | user-provided value | | ||
| | xss-custom-control-api3/webapp/control/xss.js:16:32:16:50 | oControl.getText2() | xss-custom-control-api3/webapp/control/xss.js:8:24:8:41 | { type: "string" } | xss-custom-control-api3/webapp/control/xss.js:16:32:16:50 | oControl.getText2() | XSS vulnerability due to $@. | xss-custom-control-api3/webapp/control/xss.js:8:24:8:41 | { type: "string" } | user-provided value | | ||
| | xss-custom-control.api2/webapp/control/xss.js:14:32:14:49 | oControl.getText() | xss-custom-control.api2/webapp/control/xss.js:7:23:7:40 | { type: "string" } | xss-custom-control.api2/webapp/control/xss.js:14:32:14:49 | oControl.getText() | XSS vulnerability due to $@. | xss-custom-control.api2/webapp/control/xss.js:7:23:7:40 | { type: "string" } | user-provided value | | ||
| | xss-custom-control.api2/webapp/control/xss.js:14:32:14:49 | oControl.getText() | xss-custom-control.api2/webapp/view/app.view.xml:5:5:7:28 | value={/input} | xss-custom-control.api2/webapp/control/xss.js:14:32:14:49 | oControl.getText() | XSS vulnerability due to $@. | xss-custom-control.api2/webapp/view/app.view.xml:5:5:7:28 | value={/input} | user-provided value | |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
21 changes: 21 additions & 0 deletions
21
...test/queries/UI5Xss/xss-custom-control-apis/xss-custom-control-api3/webapp/control/xss.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| sap.ui.define([ | ||
| "sap/ui/core/Control" | ||
| ], function (Control) { | ||
| return Control.extend("codeql-sap-js.control.xss", { | ||
| metadata: { | ||
| properties: { | ||
| text: { type: "string" }, | ||
| text2: { type: "string" } | ||
| } | ||
| }, | ||
| renderer: { | ||
| apiVersion: 2, | ||
| render: function (oRm, oControl) { | ||
| oRm.openStart("div", oControl); | ||
| oRm.unsafeHtml(oControl.getText()); // XSS sink RenderManager.unsafeHtml | ||
|
|
||
| oRm.unsafeHtml(oControl.getText2()); // XSS sink RenderManager.unsafeHtml | ||
|
|
||
| oRm.close("div"); | ||
| } | ||
| } | ||
| }); | ||
| }) | ||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions
12
...ui5/test/queries/UI5Xss/xss-custom-control-apis/xss-custom-control.api2/package-lock.json
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
...orks/ui5/test/queries/UI5Xss/xss-custom-control-apis/xss-custom-control.api2/package.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "name": "sap-ui5-xss", | ||
| "version": "1.0.0", | ||
| "main": "index.js" | ||
| } |
7 changes: 7 additions & 0 deletions
7
...ameworks/ui5/test/queries/UI5Xss/xss-custom-control-apis/xss-custom-control.api2/ui5.yaml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| specVersion: '3.0' | ||
| metadata: | ||
| name: sap-ui5-xss | ||
| type: application | ||
| framework: | ||
| name: SAPUI5 | ||
| version: "1.115.0" |
File renamed without changes.
15 changes: 15 additions & 0 deletions
15
...I5Xss/xss-custom-control-apis/xss-custom-control.api2/webapp/controller/app.controller.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| sap.ui.define([ | ||
| "sap/ui/core/mvc/Controller", | ||
| "sap/ui/model/json/JSONModel" | ||
| ], function (Controller, JSONModel) { | ||
| "use strict" | ||
| return Controller.extend("codeql-sap-js.controller.app", { | ||
| onInit: function () { | ||
| var oData = { | ||
| input: null | ||
| }; | ||
| var oModel = new JSONModel(oData); | ||
| this.getView().setModel(oModel); | ||
| } | ||
| }); | ||
| }) |
21 changes: 21 additions & 0 deletions
21
...ui5/test/queries/UI5Xss/xss-custom-control-apis/xss-custom-control.api2/webapp/index.html
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| <!DOCTYPE html> | ||
| <html> | ||
|
|
||
| <head> | ||
|
|
||
| <meta charset="utf-8"> | ||
| <title>SAPUI5 XSS</title> | ||
| <script src="https://sdk.openui5.org/resources/sap-ui-core.js" | ||
| data-sap-ui-libs="sap.m" | ||
| data-sap-ui-onInit="module:codeql-sap-js/index" | ||
| data-sap-ui-resourceroots='{ | ||
| "codeql-sap-js": "./" | ||
| }'> | ||
| </script> | ||
| </head> | ||
|
|
||
| <body class="sapUiBody" id="content"> | ||
|
|
||
| </body> | ||
|
|
||
| </html> |
11 changes: 11 additions & 0 deletions
11
...s/ui5/test/queries/UI5Xss/xss-custom-control-apis/xss-custom-control.api2/webapp/index.js
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| sap.ui.define([ | ||
| "sap/ui/core/mvc/XMLView" | ||
| ], function (XMLView) { | ||
| "use strict"; | ||
| XMLView.create({ | ||
| viewName: "codeql-sap-js.view.app" | ||
| }).then(function (oView) { | ||
| oView.placeAt("content"); | ||
| }); | ||
|
|
||
| }); |
5 changes: 5 additions & 0 deletions
5
.../test/queries/UI5Xss/xss-custom-control-apis/xss-custom-control.api2/webapp/manifest.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "sap.app": { | ||
| "id": "sap-ui5-xss" | ||
| } | ||
| } |
9 changes: 9 additions & 0 deletions
9
...t/queries/UI5Xss/xss-custom-control-apis/xss-custom-control.api2/webapp/view/app.view.xml
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| <mvc:View controllerName="codeql-sap-js.controller.app" | ||
| xmlns="sap.m" | ||
| xmlns:mvc="sap.ui.core.mvc" | ||
| xmlns:xssControl="codeql-sap-js.control"> | ||
| <Input placeholder="Enter Payload" | ||
| description="Try: <img src=x onerror=alert("XSS")>" | ||
| value="{/input}" /> <!--User input source sap.m.Input.value --> | ||
| <xssControl:xss text="{/input}"/> | ||
| </mvc:View> |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.