Java: Improvements to UnsafeAndroidAccess#8537
Conversation
Click to show differences in coveragejavaGenerated file changes for java
- Android,``android.*``,46,416,108,,,3,67,,,
+ Android,``android.*``,57,418,108,,,3,67,,,
- Totals,,183,6225,1441,106,6,10,107,33,1,81
+ Totals,,194,6227,1441,106,6,10,107,33,1,81
- android.webkit,3,2,,,,,,,,,,,,,,,,,,,,,,,,3,,,2,,
+ android.webkit,3,13,2,,,,,,,,,,,,,,,,,,,,,,,3,,,13,2, |
Click to show differences in coveragejavaGenerated file changes for java
- Android,``android.*``,46,416,108,,,3,67,,,
+ Android,``android.*``,57,418,108,,,3,67,,,
- Totals,,183,6225,1441,106,6,10,107,33,1,81
+ Totals,,194,6227,1441,106,6,10,107,33,1,81
- android.webkit,3,2,,,,,,,,,,,,,,,,,,,,,,,,3,,,2,,
+ android.webkit,3,13,2,,,,,,,,,,,,,,,,,,,,,,,3,,,13,2, |
smowton
left a comment
There was a problem hiding this comment.
Please expand the tests to include the new sources and models added here (or is this intended as just reorganisation that doesn't change behaviour?)
Click to show differences in coveragejavaGenerated file changes for java
- Android,``android.*``,46,416,108,,,3,67,,,
+ Android,``android.*``,57,418,108,,,3,67,,,
- Totals,,183,6225,1441,106,6,10,107,33,1,81
+ Totals,,194,6227,1441,106,6,10,107,33,1,81
- android.webkit,3,2,,,,,,,,,,,,,,,,,,,,,,,,3,,,2,,
+ android.webkit,3,13,2,,,,,,,,,,,,,,,,,,,,,,,3,,,13,2, |
No, this indeed adds new functionality with the new sources and steps. Added the tests in |
Click to show differences in coveragejavaGenerated file changes for java
- Android,``android.*``,46,416,108,,,3,67,,,
+ Android,``android.*``,57,418,108,,,3,67,,,
- Totals,,183,6225,1441,106,6,10,107,33,1,81
+ Totals,,194,6227,1441,106,6,10,107,33,1,81
- android.webkit,3,2,,,,,,,,,,,,,,,,,,,,,,,,3,,,2,,
+ android.webkit,3,13,2,,,,,,,,,,,,,,,,,,,,,,,3,,,13,2, |
Click to show differences in coveragejavaGenerated file changes for java
- Android,``android.*``,46,416,108,,,3,67,,,
+ Android,``android.*``,57,418,108,,,3,67,,,
- Totals,,183,6225,1441,106,6,10,107,33,1,81
+ Totals,,194,6227,1441,106,6,10,107,33,1,81
- android.webkit,3,2,,,,,,,,,,,,,,,,,,,,,,,,3,,,2,,
+ android.webkit,3,13,2,,,,,,,,,,,,,,,,,,,,,,,3,,,13,2, |
smowton
left a comment
There was a problem hiding this comment.
Looking good, just wants a DCA and a FP review. DCA will have to wait til next week; have you already checked with an lgtm all-projects run how many new hits we get and how many look like TPs?
java/ql/src/change-notes/2022-03-24-unsafe-android-access-improvements.md
Outdated
Show resolved
Hide resolved
I did, and I don't like the results — the new sources add too many FPs. I've removed the CSV models from this PR and will create a specific PR for that, after giving it a second thought so that the FPs can be reduced. |
e3ac827 to
ef1ef0c
Compare
|
FPs and DCA looking good now. |
|
@smowton this PR was simplified, and FP ratio and performance look good, so I think it should be easy to re-review for a final approval. |
Co-authored-by: Chris Smowton <smowton@github.com>
This reverts commit c6c72eb.
…ovements.md Co-authored-by: Chris Smowton <smowton@github.com>
Co-authored-by: Chris Smowton <smowton@github.com>
1821365 to
8601137
Compare
|
Had to rebase to solve an error in the CI. |
aschackmull
left a comment
There was a problem hiding this comment.
Looks plausible to me now.
Improves the query UnsafeAndroidAccess. When checking that the WebView for which
loadUrlis called also has enabled JavaScript (and optionally file access), we weren't taking into account that it could be aThisAccessinstead of aVariable.There's some code refactoring too (mainly moving predicates from
UnsafeAndroidAccess.qlltoWebView.qll).