mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
JavaScript: Autoformat all QL files.
This commit is contained in:
@@ -9,10 +9,10 @@
|
||||
* @id js/enabling-electron-insecure-content
|
||||
*/
|
||||
|
||||
|
||||
import javascript
|
||||
|
||||
from DataFlow::PropWrite allowRunningInsecureContent, Electron::WebPreferences preferences
|
||||
where allowRunningInsecureContent = preferences.getAPropertyWrite("allowRunningInsecureContent")
|
||||
and allowRunningInsecureContent.getRhs().mayHaveBooleanValue(true)
|
||||
where
|
||||
allowRunningInsecureContent = preferences.getAPropertyWrite("allowRunningInsecureContent") and
|
||||
allowRunningInsecureContent.getRhs().mayHaveBooleanValue(true)
|
||||
select allowRunningInsecureContent, "Enabling allowRunningInsecureContent is strongly discouraged."
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
import javascript
|
||||
|
||||
from DataFlow::PropWrite webSecurity, Electron::WebPreferences preferences
|
||||
where webSecurity = preferences.getAPropertyWrite("webSecurity")
|
||||
and webSecurity.getRhs().mayHaveBooleanValue(false)
|
||||
select webSecurity, "Disabling webSecurity is strongly discouraged."
|
||||
where
|
||||
webSecurity = preferences.getAPropertyWrite("webSecurity") and
|
||||
webSecurity.getRhs().mayHaveBooleanValue(false)
|
||||
select webSecurity, "Disabling webSecurity is strongly discouraged."
|
||||
|
||||
@@ -16,19 +16,19 @@ import javascript
|
||||
* Gets a warning message for `pref` if one of the `nodeIntegration` features is enabled.
|
||||
*/
|
||||
string getNodeIntegrationWarning(Electron::WebPreferences pref) {
|
||||
exists (string feature |
|
||||
feature = "nodeIntegration" or
|
||||
feature = "nodeIntegrationInWorker" |
|
||||
pref.getAPropertyWrite(feature).getRhs().mayHaveBooleanValue(true) and
|
||||
result = "The `" + feature + "` feature has been enabled."
|
||||
)
|
||||
or
|
||||
exists (string feature |
|
||||
feature = "nodeIntegration" |
|
||||
not exists(pref.getAPropertyWrite(feature)) and
|
||||
result = "The `" + feature + "` feature is enabled by default."
|
||||
)
|
||||
exists(string feature |
|
||||
feature = "nodeIntegration" or
|
||||
feature = "nodeIntegrationInWorker"
|
||||
|
|
||||
pref.getAPropertyWrite(feature).getRhs().mayHaveBooleanValue(true) and
|
||||
result = "The `" + feature + "` feature has been enabled."
|
||||
)
|
||||
or
|
||||
exists(string feature | feature = "nodeIntegration" |
|
||||
not exists(pref.getAPropertyWrite(feature)) and
|
||||
result = "The `" + feature + "` feature is enabled by default."
|
||||
)
|
||||
}
|
||||
|
||||
from Electron::WebPreferences preferences
|
||||
select preferences, getNodeIntegrationWarning(preferences)
|
||||
select preferences, getNodeIntegrationWarning(preferences)
|
||||
|
||||
Reference in New Issue
Block a user