-
Notifications
You must be signed in to change notification settings - Fork 2
Remove FPs of js/ui5-log-injection-to-http
#190
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 13 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
05e9a0b
Checkpoint
jeongsoolee09 80c57ed
Add unit test cases
jeongsoolee09 4e86447
Fix existing cases
jeongsoolee09 476a35d
Remove SapLogger row in typeModel
jeongsoolee09 4d4e9c4
Break up UI5LogInjection into query and library
jeongsoolee09 4002b70
Rename test cases
jeongsoolee09 4792d8f
Checkpoint
jeongsoolee09 744be61
Checkpoint
jeongsoolee09 77f0d9a
Checkpoint
jeongsoolee09 5bc5eb3
Add back UI5LogInjectionConfiguration.isAdditionalTaintStep
jeongsoolee09 d330520
Make it work on non-sap module unit test examples
jeongsoolee09 f5dc5e6
Remove unneeded classes
jeongsoolee09 2c7b6e3
Fix `Parameter` <=> `Argument`
jeongsoolee09 a12eca8
Replace DataFlow::PathGraph with UI5PathGraph
jeongsoolee09 72a5e2c
Explicitly import UI5PathGraph in UI5LogInjection
jeongsoolee09 403b4aa
Update expected results of test
jeongsoolee09 61b8ecc
Fix the dependency path of `CustomControl`
jeongsoolee09 daec825
Remove `LogArgumentToListener` from FlowSteps.qll
jeongsoolee09 2e48e7f
Keep the getLogger
jeongsoolee09 a658843
Update expected test results: line/columns and warning messages
jeongsoolee09 9b49f0a
Debug log-entry-flows-to-sinks/UI5Xss.qlref
jeongsoolee09 6de3114
Minor expected results update
jeongsoolee09 cf73e68
Update expected results of analysis
jeongsoolee09 e2df0c9
Remove unneeded code
jeongsoolee09 154d617
Merge branch 'main' into jeongsoolee09/fix-ui5-loginjection
jeongsoolee09 584ee20
Merge branch 'jeongsoolee09/fix-ui5-loginjection' of github.com:advan…
jeongsoolee09 584e6bc
Remove unused flow label
jeongsoolee09 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
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
12 changes: 12 additions & 0 deletions
12
...t/frameworks/ui5/lib/advanced_security/javascript/frameworks/ui5/UI5LogInjectionQuery.qll
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,12 @@ | ||
import javascript | ||
import advanced_security.javascript.frameworks.ui5.dataflow.DataFlow | ||
private import advanced_security.javascript.frameworks.ui5.dataflow.DataFlow::UI5PathGraph | ||
import semmle.javascript.security.dataflow.LogInjectionQuery as LogInjection | ||
|
||
class UI5LogInjectionConfiguration extends LogInjection::LogInjectionConfiguration { | ||
override predicate isSource(DataFlow::Node node) { node instanceof RemoteFlowSource } | ||
|
||
override predicate isSink(DataFlow::Node node) { | ||
node = ModelOutput::getASinkNode("ui5-log-injection").asSink() | ||
} | ||
} |
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
1 change: 1 addition & 0 deletions
1
...i5/test/queries/UI5LogInjection/log-entry-flows-to-http-getLogEntries/UI5LogsToHttp.qlref
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 @@ | ||
UI5LogInjection/UI5LogsToHttp.ql |
12 changes: 12 additions & 0 deletions
12
.../ui5/test/queries/UI5LogInjection/log-entry-flows-to-http-getLogEntries/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
...works/ui5/test/queries/UI5LogInjection/log-entry-flows-to-http-getLogEntries/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
...rameworks/ui5/test/queries/UI5LogInjection/log-entry-flows-to-http-getLogEntries/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" |
22 changes: 22 additions & 0 deletions
22
...UI5LogInjection/log-entry-flows-to-http-getLogEntries/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,22 @@ | ||
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, | ||
output: null, | ||
}; | ||
var oModel = new JSONModel(oData); | ||
this.getView().setModel(oModel); | ||
|
||
var input = oModel.getProperty("/input"); | ||
jQuery.sap.log.debug(input); //log-injection sink | ||
}, | ||
}); | ||
}, | ||
); |
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think
logged-not-accessed
is unused.