Disable specific checks using eng-disable comments
masterYou can suppress specific security findings by adding eng-disable comments to your code. This works for both single lines and entire files.
Inline (Single Line)
Use // eng-disable, /* eng-disable */, or <!-- eng-disable --> followed by the check ID (snake_case) or construct name (camelCase).
File-wide
Place the eng-disable directive at the top of a .js or .html file to disable the specified checks for the entire file.
Note: Global checks (like CSP_GLOBAL_CHECK) may not be compatible with annotations. For those, use the -x CLI flag to exclude them.
// Disable by snake_case ID or camelCase construct name
const res = eval(safeVariable); /* eng-disable DANGEROUS_FUNCTIONS_JS_CHECK */
// Multiple checks
shell.openExternal(eval(safeVar)); /* eng-disable OPEN_EXTERNAL_JS_CHECK DANGEROUS_FUNCTIONS_JS_CHECK */<!-- Disable in HTML -->
<webview src="https://doyensec.com/" enableblinkfeatures="DangerousFeature"></webview> <!-- eng-disable BLINK_FEATURES_HTML_CHECK -->