-
Notifications
You must be signed in to change notification settings - Fork 1.7k
JavaScript: Add query for Node.js integration in Electron framework #167
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
Conversation
The Jenkins links are not accessible from internet. |
Sorry, we haven't found a good way to enable public access to our Jenkins output. The QHelp-preview check is failing with the following error:
It probably needs to be written The Language-Tests/JavaScript check is failing on 22:35:01 --- expected
22:35:01 +++ actual
22:35:01 @@ -1,5 +1,5 @@
22:35:01 -| EnablingNodeIntegration.js:5:28:11:9 | {\\r\\n ... } | nodeIntegration property may have been enabled on this object that could result in RCE |
22:35:01 -| EnablingNodeIntegration.js:5:28:11:9 | {\\r\\n ... } | nodeIntegrationInWorker property may have been enabled on this object that could result in RCE |
22:35:01 -| EnablingNodeIntegration.js:15:22:20:9 | {\\r\\n ... } | nodeIntegration is enabled by default in WebPreferences object that could result in RCE |
22:35:01 -| EnablingNodeIntegration.js:23:13:27:9 | {\\r\\n ... } | nodeIntegration is enabled by default in WebPreferences object that could result in RCE |
22:35:01 +| EnablingNodeIntegration.js:5:28:11:9 | {\\n ... } | nodeIntegration property may have been enabled on this object that could result in RCE |
22:35:01 +| EnablingNodeIntegration.js:5:28:11:9 | {\\n ... } | nodeIntegrationInWorker property may have been enabled on this object that could result in RCE |
22:35:01 +| EnablingNodeIntegration.js:15:22:20:9 | {\\n ... } | nodeIntegration is enabled by default in WebPreferences object that could result in RCE |
22:35:01 +| EnablingNodeIntegration.js:23:13:27:9 | {\\n ... } | nodeIntegration is enabled by default in WebPreferences object that could result in RCE |
22:35:01 | EnablingNodeIntegration.js:49:71:49:93 | {nodeIn ... : true} | nodeIntegration property may have been enabled on this object that could result in RCE | It looks like a Windows/Unix line endings problem. Try to convert all files into Unix line endings. Alternatively, hand-edit the |
|
||
<example> | ||
<p> | ||
The following example shows insecure and secure uses of </code>webview</code> tag: |
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.
Thanks for the changes. It looks as if the Qhelp preview is just complaining about the typo in this line now.
</code>webview</code>
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.
thanks, will correct it after the code passes Language-Tests/JavaScript test
The diff in the Language-Tests/JavaScript error is now this: 01:46:41 --- expected
01:46:41 +++ actual
01:46:41 @@ -1,5 +1,5 @@
01:46:41 -| EnablingNodeIntegration.js:5:28:11:9 | {\\n ... } | nodeIntegration property may have been enabled on this object that could result in RCE |
01:46:41 -| EnablingNodeIntegration.js:5:28:11:9 | {\\n ... } | nodeIntegrationInWorker property may have been enabled on this object that could result in RCE |
01:46:41 -| EnablingNodeIntegration.js:15:22:20:9 | {\\n ... } | nodeIntegration is enabled by default in WebPreferences object that could result in RCE |
01:46:41 -| EnablingNodeIntegration.js:23:13:27:9 | {\\n ... } | nodeIntegration is enabled by default in WebPreferences object that could result in RCE |
01:46:41 +| EnablingNodeIntegration.js:5:28:11:9 | {\\n ... } | nodeIntegration property may have been enabled on this object that could result in RCE |
01:46:41 +| EnablingNodeIntegration.js:5:28:11:9 | {\\n ... } | nodeIntegrationInWorker property may have been enabled on this object that could result in RCE |
01:46:41 +| EnablingNodeIntegration.js:15:22:20:9 | {\\n ... } | nodeIntegration is enabled by default in WebPreferences object that could result in RCE |
01:46:41 +| EnablingNodeIntegration.js:23:13:27:9 | {\\n ... } | nodeIntegration is enabled by default in WebPreferences object that could result in RCE |
01:46:41 | EnablingNodeIntegration.js:49:71:49:93 | {nodeIn ... : true} | nodeIntegration property may have been enabled on this object that could result in RCE | It looks like the |
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.
@bnxi Thank you for the submission.
I have some stylistic changes that I think you should incorporate, see https://github.com/esben-semmle/ql/commits/NodeIntegration.
Note that I have removed the @precision
attribute, since I do not think we want this query by default on LGTM.com yet. You can still enable the query manually in lgtm.yml or by using a custom query pack.
I note that the examples/WebViewNodeIntegration.html
file contains a BAD
example that is not flagged by the analysis.
We usually only have examples of problems that the analysis can flag. Did you mean to include support for that example as well?
@esben-semmle thanks for the suggestions and improvements. I had included webview example file as an extra piece of information and it was not intended to be detected by this query. I have removed the example file and reference to it from qlhelp file as well. |
@esben-semmle seems to be EOL issue again, please feel free to abandon this PR and add this query in the next release if you find it useful. I'd like to propose the following queries as well:
Thanks |
@bnxi Thank you for the changes. One minor nit: can you revert ecd08d4, please? The leading dots are not necessary, and the commit message does not match the change.
Not this time. The failure was caused by a temporary internal issue.
No need to abandon, you are merging against master, so the feature will land in the next release (1.19) automatically.
Noted, we will aim for inclusion in 1.19. |
This reverts commit ecd08d4.
Thank you @bnxi , your contribution has been merged. |
Implement FLines metrics queries
…ecl-stmt Remove and replace @anonymousclassdeclstmt with @localtypedeclstmt
This query finds instances of Node.js integration being enabled in WebPreferences object that could result in remote code execution when rendering untrusted web content.