mirror of
https://github.com/github/codeql.git
synced 2025-12-19 18:33:16 +01:00
This adds Alert annotations for alerts that seem intentional by the test but has not been annotated with 'NOT OK', or the comment was in the wrong place. In a few cases I included 'Source' expectations to make it easier to see what happened. Other 'Source' expectations will be added in bulk a later commit.
36 lines
1.1 KiB
JavaScript
36 lines
1.1 KiB
JavaScript
const {BrowserWindow} = require('electron')
|
|
|
|
function test() {
|
|
var unsafe_used = {
|
|
webPreferences: {
|
|
webSecurity: false, // $ Alert[js/disabling-electron-websecurity]
|
|
allowRunningInsecureContent: true, // $ Alert[js/enabling-electron-insecure-content]
|
|
experimentalFeatures: true,
|
|
enableBlinkFeatures: ['ExecCommandInJavaScript'],
|
|
blinkFeatures: 'CSSVariables'
|
|
}
|
|
};
|
|
|
|
var unsafe_unused = {
|
|
webPreferences: {
|
|
webSecurity: false,
|
|
allowRunningInsecureContent: true,
|
|
experimentalFeatures: true,
|
|
enableBlinkFeatures: ['ExecCommandInJavaScript'],
|
|
blinkFeatures: 'CSSVariables'
|
|
}
|
|
};
|
|
|
|
var safe_used = {
|
|
webPreferences: {
|
|
webSecurity: true,
|
|
allowRunningInsecureContent: false,
|
|
experimentalFeatures: false,
|
|
enableBlinkFeatures: [],
|
|
blinkFeatures: ''
|
|
}
|
|
};
|
|
|
|
new BrowserWindow(unsafe_used);
|
|
new BrowserWindow(safe_used);
|
|
} |