eslint-plugin-sdl-2 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5316 -0
- package/LICENSE +21 -0
- package/README.md +133 -0
- package/dist/_internal/ast-utils.d.ts +17 -0
- package/dist/_internal/ast-utils.d.ts.map +1 -0
- package/dist/_internal/ast-utils.js +93 -0
- package/dist/_internal/ast-utils.js.map +1 -0
- package/dist/_internal/config-references.d.ts +5 -0
- package/dist/_internal/config-references.d.ts.map +1 -0
- package/dist/_internal/config-references.js +13 -0
- package/dist/_internal/config-references.js.map +1 -0
- package/dist/_internal/create-rule.d.ts +9 -0
- package/dist/_internal/create-rule.d.ts.map +1 -0
- package/dist/_internal/create-rule.js +6 -0
- package/dist/_internal/create-rule.js.map +1 -0
- package/dist/_internal/domparser.d.ts +19 -0
- package/dist/_internal/domparser.d.ts.map +1 -0
- package/dist/_internal/domparser.js +45 -0
- package/dist/_internal/domparser.js.map +1 -0
- package/dist/_internal/electron-web-preferences.d.ts +14 -0
- package/dist/_internal/electron-web-preferences.d.ts.map +1 -0
- package/dist/_internal/electron-web-preferences.js +63 -0
- package/dist/_internal/electron-web-preferences.js.map +1 -0
- package/dist/_internal/estree-utils.d.ts +51 -0
- package/dist/_internal/estree-utils.d.ts.map +1 -0
- package/dist/_internal/estree-utils.js +112 -0
- package/dist/_internal/estree-utils.js.map +1 -0
- package/dist/_internal/node-tls-config.d.ts +44 -0
- package/dist/_internal/node-tls-config.d.ts.map +1 -0
- package/dist/_internal/node-tls-config.js +101 -0
- package/dist/_internal/node-tls-config.js.map +1 -0
- package/dist/_internal/rules-registry.d.ts +10 -0
- package/dist/_internal/rules-registry.d.ts.map +1 -0
- package/dist/_internal/rules-registry.js +148 -0
- package/dist/_internal/rules-registry.js.map +1 -0
- package/dist/_internal/script-element.d.ts +7 -0
- package/dist/_internal/script-element.d.ts.map +1 -0
- package/dist/_internal/script-element.js +46 -0
- package/dist/_internal/script-element.js.map +1 -0
- package/dist/_internal/worker-code-loading.d.ts +69 -0
- package/dist/_internal/worker-code-loading.d.ts.map +1 -0
- package/dist/_internal/worker-code-loading.js +134 -0
- package/dist/_internal/worker-code-loading.js.map +1 -0
- package/dist/plugin.cjs +6036 -0
- package/dist/plugin.cjs.map +7 -0
- package/dist/plugin.d.cts +11 -0
- package/dist/plugin.d.ts +11 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +235 -0
- package/dist/plugin.js.map +1 -0
- package/dist/rules/no-angular-bypass-sanitizer.d.ts +5 -0
- package/dist/rules/no-angular-bypass-sanitizer.d.ts.map +1 -0
- package/dist/rules/no-angular-bypass-sanitizer.js +32 -0
- package/dist/rules/no-angular-bypass-sanitizer.js.map +1 -0
- package/dist/rules/no-angular-bypass-security-trust-html.d.ts +5 -0
- package/dist/rules/no-angular-bypass-security-trust-html.d.ts.map +1 -0
- package/dist/rules/no-angular-bypass-security-trust-html.js +51 -0
- package/dist/rules/no-angular-bypass-security-trust-html.js.map +1 -0
- package/dist/rules/no-angular-innerhtml-binding.d.ts +5 -0
- package/dist/rules/no-angular-innerhtml-binding.d.ts.map +1 -0
- package/dist/rules/no-angular-innerhtml-binding.js +57 -0
- package/dist/rules/no-angular-innerhtml-binding.js.map +1 -0
- package/dist/rules/no-angular-sanitization-trusted-urls.d.ts +5 -0
- package/dist/rules/no-angular-sanitization-trusted-urls.d.ts.map +1 -0
- package/dist/rules/no-angular-sanitization-trusted-urls.js +32 -0
- package/dist/rules/no-angular-sanitization-trusted-urls.js.map +1 -0
- package/dist/rules/no-angularjs-bypass-sce.d.ts +5 -0
- package/dist/rules/no-angularjs-bypass-sce.d.ts.map +1 -0
- package/dist/rules/no-angularjs-bypass-sce.js +80 -0
- package/dist/rules/no-angularjs-bypass-sce.js.map +1 -0
- package/dist/rules/no-angularjs-enable-svg.d.ts +5 -0
- package/dist/rules/no-angularjs-enable-svg.d.ts.map +1 -0
- package/dist/rules/no-angularjs-enable-svg.js +48 -0
- package/dist/rules/no-angularjs-enable-svg.js.map +1 -0
- package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.d.ts +5 -0
- package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.d.ts.map +1 -0
- package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.js +64 -0
- package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.js.map +1 -0
- package/dist/rules/no-angularjs-sanitization-whitelist.d.ts +5 -0
- package/dist/rules/no-angularjs-sanitization-whitelist.d.ts.map +1 -0
- package/dist/rules/no-angularjs-sanitization-whitelist.js +32 -0
- package/dist/rules/no-angularjs-sanitization-whitelist.js.map +1 -0
- package/dist/rules/no-angularjs-sce-resource-url-wildcard.d.ts +5 -0
- package/dist/rules/no-angularjs-sce-resource-url-wildcard.d.ts.map +1 -0
- package/dist/rules/no-angularjs-sce-resource-url-wildcard.js +69 -0
- package/dist/rules/no-angularjs-sce-resource-url-wildcard.js.map +1 -0
- package/dist/rules/no-child-process-exec.d.ts +5 -0
- package/dist/rules/no-child-process-exec.d.ts.map +1 -0
- package/dist/rules/no-child-process-exec.js +141 -0
- package/dist/rules/no-child-process-exec.js.map +1 -0
- package/dist/rules/no-child-process-shell-true.d.ts +5 -0
- package/dist/rules/no-child-process-shell-true.d.ts.map +1 -0
- package/dist/rules/no-child-process-shell-true.js +89 -0
- package/dist/rules/no-child-process-shell-true.js.map +1 -0
- package/dist/rules/no-cookies.d.ts +5 -0
- package/dist/rules/no-cookies.d.ts.map +1 -0
- package/dist/rules/no-cookies.js +38 -0
- package/dist/rules/no-cookies.js.map +1 -0
- package/dist/rules/no-document-domain.d.ts +5 -0
- package/dist/rules/no-document-domain.d.ts.map +1 -0
- package/dist/rules/no-document-domain.js +41 -0
- package/dist/rules/no-document-domain.js.map +1 -0
- package/dist/rules/no-document-execcommand-insert-html.d.ts +5 -0
- package/dist/rules/no-document-execcommand-insert-html.d.ts.map +1 -0
- package/dist/rules/no-document-execcommand-insert-html.js +57 -0
- package/dist/rules/no-document-execcommand-insert-html.js.map +1 -0
- package/dist/rules/no-document-parse-html-unsafe.d.ts +5 -0
- package/dist/rules/no-document-parse-html-unsafe.d.ts.map +1 -0
- package/dist/rules/no-document-parse-html-unsafe.js +67 -0
- package/dist/rules/no-document-parse-html-unsafe.js.map +1 -0
- package/dist/rules/no-document-write.d.ts +5 -0
- package/dist/rules/no-document-write.d.ts.map +1 -0
- package/dist/rules/no-document-write.js +40 -0
- package/dist/rules/no-document-write.js.map +1 -0
- package/dist/rules/no-domparser-html-without-sanitization.d.ts +5 -0
- package/dist/rules/no-domparser-html-without-sanitization.d.ts.map +1 -0
- package/dist/rules/no-domparser-html-without-sanitization.js +56 -0
- package/dist/rules/no-domparser-html-without-sanitization.js.map +1 -0
- package/dist/rules/no-domparser-svg-without-sanitization.d.ts +5 -0
- package/dist/rules/no-domparser-svg-without-sanitization.d.ts.map +1 -0
- package/dist/rules/no-domparser-svg-without-sanitization.js +56 -0
- package/dist/rules/no-domparser-svg-without-sanitization.js.map +1 -0
- package/dist/rules/no-dynamic-import-unsafe-url.d.ts +5 -0
- package/dist/rules/no-dynamic-import-unsafe-url.d.ts.map +1 -0
- package/dist/rules/no-dynamic-import-unsafe-url.js +47 -0
- package/dist/rules/no-dynamic-import-unsafe-url.js.map +1 -0
- package/dist/rules/no-electron-allow-running-insecure-content.d.ts +5 -0
- package/dist/rules/no-electron-allow-running-insecure-content.d.ts.map +1 -0
- package/dist/rules/no-electron-allow-running-insecure-content.js +30 -0
- package/dist/rules/no-electron-allow-running-insecure-content.js.map +1 -0
- package/dist/rules/no-electron-dangerous-blink-features.d.ts +5 -0
- package/dist/rules/no-electron-dangerous-blink-features.d.ts.map +1 -0
- package/dist/rules/no-electron-dangerous-blink-features.js +89 -0
- package/dist/rules/no-electron-dangerous-blink-features.js.map +1 -0
- package/dist/rules/no-electron-disable-context-isolation.d.ts +5 -0
- package/dist/rules/no-electron-disable-context-isolation.d.ts.map +1 -0
- package/dist/rules/no-electron-disable-context-isolation.js +30 -0
- package/dist/rules/no-electron-disable-context-isolation.js.map +1 -0
- package/dist/rules/no-electron-disable-sandbox.d.ts +5 -0
- package/dist/rules/no-electron-disable-sandbox.d.ts.map +1 -0
- package/dist/rules/no-electron-disable-sandbox.js +30 -0
- package/dist/rules/no-electron-disable-sandbox.js.map +1 -0
- package/dist/rules/no-electron-disable-web-security.d.ts +5 -0
- package/dist/rules/no-electron-disable-web-security.d.ts.map +1 -0
- package/dist/rules/no-electron-disable-web-security.js +30 -0
- package/dist/rules/no-electron-disable-web-security.js.map +1 -0
- package/dist/rules/no-electron-enable-remote-module.d.ts +5 -0
- package/dist/rules/no-electron-enable-remote-module.d.ts.map +1 -0
- package/dist/rules/no-electron-enable-remote-module.js +30 -0
- package/dist/rules/no-electron-enable-remote-module.js.map +1 -0
- package/dist/rules/no-electron-enable-webview-tag.d.ts +5 -0
- package/dist/rules/no-electron-enable-webview-tag.d.ts.map +1 -0
- package/dist/rules/no-electron-enable-webview-tag.js +30 -0
- package/dist/rules/no-electron-enable-webview-tag.js.map +1 -0
- package/dist/rules/no-electron-experimental-features.d.ts +5 -0
- package/dist/rules/no-electron-experimental-features.d.ts.map +1 -0
- package/dist/rules/no-electron-experimental-features.js +30 -0
- package/dist/rules/no-electron-experimental-features.js.map +1 -0
- package/dist/rules/no-electron-expose-raw-ipc-renderer.d.ts +5 -0
- package/dist/rules/no-electron-expose-raw-ipc-renderer.d.ts.map +1 -0
- package/dist/rules/no-electron-expose-raw-ipc-renderer.js +108 -0
- package/dist/rules/no-electron-expose-raw-ipc-renderer.js.map +1 -0
- package/dist/rules/no-electron-insecure-certificate-error-handler.d.ts +5 -0
- package/dist/rules/no-electron-insecure-certificate-error-handler.d.ts.map +1 -0
- package/dist/rules/no-electron-insecure-certificate-error-handler.js +91 -0
- package/dist/rules/no-electron-insecure-certificate-error-handler.js.map +1 -0
- package/dist/rules/no-electron-insecure-certificate-verify-proc.d.ts +5 -0
- package/dist/rules/no-electron-insecure-certificate-verify-proc.d.ts.map +1 -0
- package/dist/rules/no-electron-insecure-certificate-verify-proc.js +75 -0
- package/dist/rules/no-electron-insecure-certificate-verify-proc.js.map +1 -0
- package/dist/rules/no-electron-insecure-permission-request-handler.d.ts +5 -0
- package/dist/rules/no-electron-insecure-permission-request-handler.d.ts.map +1 -0
- package/dist/rules/no-electron-insecure-permission-request-handler.js +75 -0
- package/dist/rules/no-electron-insecure-permission-request-handler.js.map +1 -0
- package/dist/rules/no-electron-node-integration.d.ts +5 -0
- package/dist/rules/no-electron-node-integration.d.ts.map +1 -0
- package/dist/rules/no-electron-node-integration.js +52 -0
- package/dist/rules/no-electron-node-integration.js.map +1 -0
- package/dist/rules/no-electron-permission-check-handler-allow-all.d.ts +5 -0
- package/dist/rules/no-electron-permission-check-handler-allow-all.d.ts.map +1 -0
- package/dist/rules/no-electron-permission-check-handler-allow-all.js +63 -0
- package/dist/rules/no-electron-permission-check-handler-allow-all.js.map +1 -0
- package/dist/rules/no-electron-unchecked-ipc-sender.d.ts +5 -0
- package/dist/rules/no-electron-unchecked-ipc-sender.d.ts.map +1 -0
- package/dist/rules/no-electron-unchecked-ipc-sender.js +90 -0
- package/dist/rules/no-electron-unchecked-ipc-sender.js.map +1 -0
- package/dist/rules/no-electron-unrestricted-navigation.d.ts +5 -0
- package/dist/rules/no-electron-unrestricted-navigation.d.ts.map +1 -0
- package/dist/rules/no-electron-unrestricted-navigation.js +100 -0
- package/dist/rules/no-electron-unrestricted-navigation.js.map +1 -0
- package/dist/rules/no-electron-untrusted-open-external.d.ts +5 -0
- package/dist/rules/no-electron-untrusted-open-external.d.ts.map +1 -0
- package/dist/rules/no-electron-untrusted-open-external.js +92 -0
- package/dist/rules/no-electron-untrusted-open-external.js.map +1 -0
- package/dist/rules/no-electron-webview-allowpopups.d.ts +5 -0
- package/dist/rules/no-electron-webview-allowpopups.d.ts.map +1 -0
- package/dist/rules/no-electron-webview-allowpopups.js +85 -0
- package/dist/rules/no-electron-webview-allowpopups.js.map +1 -0
- package/dist/rules/no-electron-webview-insecure-webpreferences.d.ts +5 -0
- package/dist/rules/no-electron-webview-insecure-webpreferences.d.ts.map +1 -0
- package/dist/rules/no-electron-webview-insecure-webpreferences.js +88 -0
- package/dist/rules/no-electron-webview-insecure-webpreferences.js.map +1 -0
- package/dist/rules/no-electron-webview-node-integration.d.ts +5 -0
- package/dist/rules/no-electron-webview-node-integration.d.ts.map +1 -0
- package/dist/rules/no-electron-webview-node-integration.js +107 -0
- package/dist/rules/no-electron-webview-node-integration.js.map +1 -0
- package/dist/rules/no-html-method.d.ts +5 -0
- package/dist/rules/no-html-method.d.ts.map +1 -0
- package/dist/rules/no-html-method.js +42 -0
- package/dist/rules/no-html-method.js.map +1 -0
- package/dist/rules/no-http-request-to-insecure-protocol.d.ts +5 -0
- package/dist/rules/no-http-request-to-insecure-protocol.d.ts.map +1 -0
- package/dist/rules/no-http-request-to-insecure-protocol.js +94 -0
- package/dist/rules/no-http-request-to-insecure-protocol.js.map +1 -0
- package/dist/rules/no-iframe-srcdoc.d.ts +5 -0
- package/dist/rules/no-iframe-srcdoc.d.ts.map +1 -0
- package/dist/rules/no-iframe-srcdoc.js +144 -0
- package/dist/rules/no-iframe-srcdoc.js.map +1 -0
- package/dist/rules/no-inner-html.d.ts +5 -0
- package/dist/rules/no-inner-html.d.ts.map +1 -0
- package/dist/rules/no-inner-html.js +67 -0
- package/dist/rules/no-inner-html.js.map +1 -0
- package/dist/rules/no-insecure-random.d.ts +5 -0
- package/dist/rules/no-insecure-random.d.ts.map +1 -0
- package/dist/rules/no-insecure-random.js +95 -0
- package/dist/rules/no-insecure-random.js.map +1 -0
- package/dist/rules/no-insecure-tls-agent-options.d.ts +5 -0
- package/dist/rules/no-insecure-tls-agent-options.d.ts.map +1 -0
- package/dist/rules/no-insecure-tls-agent-options.js +73 -0
- package/dist/rules/no-insecure-tls-agent-options.js.map +1 -0
- package/dist/rules/no-insecure-url.d.ts +12 -0
- package/dist/rules/no-insecure-url.d.ts.map +1 -0
- package/dist/rules/no-insecure-url.js +142 -0
- package/dist/rules/no-insecure-url.js.map +1 -0
- package/dist/rules/no-location-javascript-url.d.ts +5 -0
- package/dist/rules/no-location-javascript-url.d.ts.map +1 -0
- package/dist/rules/no-location-javascript-url.js +98 -0
- package/dist/rules/no-location-javascript-url.js.map +1 -0
- package/dist/rules/no-message-event-without-origin-check.d.ts +5 -0
- package/dist/rules/no-message-event-without-origin-check.d.ts.map +1 -0
- package/dist/rules/no-message-event-without-origin-check.js +183 -0
- package/dist/rules/no-message-event-without-origin-check.js.map +1 -0
- package/dist/rules/no-msapp-exec-unsafe.d.ts +5 -0
- package/dist/rules/no-msapp-exec-unsafe.d.ts.map +1 -0
- package/dist/rules/no-msapp-exec-unsafe.js +32 -0
- package/dist/rules/no-msapp-exec-unsafe.js.map +1 -0
- package/dist/rules/no-node-tls-check-server-identity-bypass.d.ts +5 -0
- package/dist/rules/no-node-tls-check-server-identity-bypass.d.ts.map +1 -0
- package/dist/rules/no-node-tls-check-server-identity-bypass.js +95 -0
- package/dist/rules/no-node-tls-check-server-identity-bypass.js.map +1 -0
- package/dist/rules/no-node-tls-legacy-protocol.d.ts +5 -0
- package/dist/rules/no-node-tls-legacy-protocol.d.ts.map +1 -0
- package/dist/rules/no-node-tls-legacy-protocol.js +106 -0
- package/dist/rules/no-node-tls-legacy-protocol.js.map +1 -0
- package/dist/rules/no-node-tls-reject-unauthorized-zero.d.ts +5 -0
- package/dist/rules/no-node-tls-reject-unauthorized-zero.d.ts.map +1 -0
- package/dist/rules/no-node-tls-reject-unauthorized-zero.js +93 -0
- package/dist/rules/no-node-tls-reject-unauthorized-zero.js.map +1 -0
- package/dist/rules/no-node-tls-security-level-zero.d.ts +5 -0
- package/dist/rules/no-node-tls-security-level-zero.d.ts.map +1 -0
- package/dist/rules/no-node-tls-security-level-zero.js +80 -0
- package/dist/rules/no-node-tls-security-level-zero.js.map +1 -0
- package/dist/rules/no-node-vm-run-in-context.d.ts +5 -0
- package/dist/rules/no-node-vm-run-in-context.d.ts.map +1 -0
- package/dist/rules/no-node-vm-run-in-context.js +186 -0
- package/dist/rules/no-node-vm-run-in-context.js.map +1 -0
- package/dist/rules/no-node-vm-source-text-module.d.ts +5 -0
- package/dist/rules/no-node-vm-source-text-module.d.ts.map +1 -0
- package/dist/rules/no-node-vm-source-text-module.js +126 -0
- package/dist/rules/no-node-vm-source-text-module.js.map +1 -0
- package/dist/rules/no-node-worker-threads-eval.d.ts +5 -0
- package/dist/rules/no-node-worker-threads-eval.d.ts.map +1 -0
- package/dist/rules/no-node-worker-threads-eval.js +151 -0
- package/dist/rules/no-node-worker-threads-eval.js.map +1 -0
- package/dist/rules/no-nonnull-assertion-on-security-input.d.ts +5 -0
- package/dist/rules/no-nonnull-assertion-on-security-input.d.ts.map +1 -0
- package/dist/rules/no-nonnull-assertion-on-security-input.js +48 -0
- package/dist/rules/no-nonnull-assertion-on-security-input.js.map +1 -0
- package/dist/rules/no-postmessage-star-origin.d.ts +5 -0
- package/dist/rules/no-postmessage-star-origin.d.ts.map +1 -0
- package/dist/rules/no-postmessage-star-origin.js +58 -0
- package/dist/rules/no-postmessage-star-origin.js.map +1 -0
- package/dist/rules/no-postmessage-without-origin-allowlist.d.ts +5 -0
- package/dist/rules/no-postmessage-without-origin-allowlist.d.ts.map +1 -0
- package/dist/rules/no-postmessage-without-origin-allowlist.js +80 -0
- package/dist/rules/no-postmessage-without-origin-allowlist.js.map +1 -0
- package/dist/rules/no-range-create-contextual-fragment.d.ts +5 -0
- package/dist/rules/no-range-create-contextual-fragment.d.ts.map +1 -0
- package/dist/rules/no-range-create-contextual-fragment.js +64 -0
- package/dist/rules/no-range-create-contextual-fragment.js.map +1 -0
- package/dist/rules/no-script-src-data-url.d.ts +5 -0
- package/dist/rules/no-script-src-data-url.d.ts.map +1 -0
- package/dist/rules/no-script-src-data-url.js +108 -0
- package/dist/rules/no-script-src-data-url.js.map +1 -0
- package/dist/rules/no-script-text.d.ts +5 -0
- package/dist/rules/no-script-text.d.ts.map +1 -0
- package/dist/rules/no-script-text.js +52 -0
- package/dist/rules/no-script-text.js.map +1 -0
- package/dist/rules/no-service-worker-unsafe-script-url.d.ts +5 -0
- package/dist/rules/no-service-worker-unsafe-script-url.d.ts.map +1 -0
- package/dist/rules/no-service-worker-unsafe-script-url.js +52 -0
- package/dist/rules/no-service-worker-unsafe-script-url.js.map +1 -0
- package/dist/rules/no-set-html-unsafe.d.ts +5 -0
- package/dist/rules/no-set-html-unsafe.d.ts.map +1 -0
- package/dist/rules/no-set-html-unsafe.js +48 -0
- package/dist/rules/no-set-html-unsafe.js.map +1 -0
- package/dist/rules/no-trusted-types-policy-pass-through.d.ts +5 -0
- package/dist/rules/no-trusted-types-policy-pass-through.d.ts.map +1 -0
- package/dist/rules/no-trusted-types-policy-pass-through.js +115 -0
- package/dist/rules/no-trusted-types-policy-pass-through.js.map +1 -0
- package/dist/rules/no-unsafe-alloc.d.ts +5 -0
- package/dist/rules/no-unsafe-alloc.d.ts.map +1 -0
- package/dist/rules/no-unsafe-alloc.js +51 -0
- package/dist/rules/no-unsafe-alloc.js.map +1 -0
- package/dist/rules/no-unsafe-cast-to-trusted-types.d.ts +5 -0
- package/dist/rules/no-unsafe-cast-to-trusted-types.d.ts.map +1 -0
- package/dist/rules/no-unsafe-cast-to-trusted-types.js +89 -0
- package/dist/rules/no-unsafe-cast-to-trusted-types.js.map +1 -0
- package/dist/rules/no-window-open-without-noopener.d.ts +5 -0
- package/dist/rules/no-window-open-without-noopener.d.ts.map +1 -0
- package/dist/rules/no-window-open-without-noopener.js +84 -0
- package/dist/rules/no-window-open-without-noopener.js.map +1 -0
- package/dist/rules/no-winjs-html-unsafe.d.ts +5 -0
- package/dist/rules/no-winjs-html-unsafe.d.ts.map +1 -0
- package/dist/rules/no-winjs-html-unsafe.js +32 -0
- package/dist/rules/no-winjs-html-unsafe.js.map +1 -0
- package/dist/rules/no-worker-blob-url.d.ts +5 -0
- package/dist/rules/no-worker-blob-url.d.ts.map +1 -0
- package/dist/rules/no-worker-blob-url.js +64 -0
- package/dist/rules/no-worker-blob-url.js.map +1 -0
- package/dist/rules/no-worker-data-url.d.ts +5 -0
- package/dist/rules/no-worker-data-url.d.ts.map +1 -0
- package/dist/rules/no-worker-data-url.js +67 -0
- package/dist/rules/no-worker-data-url.js.map +1 -0
- package/docs/rules/getting-started.md +70 -0
- package/docs/rules/no-angular-bypass-sanitizer.md +69 -0
- package/docs/rules/no-angular-bypass-security-trust-html.md +59 -0
- package/docs/rules/no-angular-innerhtml-binding.md +59 -0
- package/docs/rules/no-angular-sanitization-trusted-urls.md +64 -0
- package/docs/rules/no-angularjs-bypass-sce.md +64 -0
- package/docs/rules/no-angularjs-enable-svg.md +59 -0
- package/docs/rules/no-angularjs-ng-bind-html-without-sanitize.md +59 -0
- package/docs/rules/no-angularjs-sanitization-whitelist.md +63 -0
- package/docs/rules/no-angularjs-sce-resource-url-wildcard.md +62 -0
- package/docs/rules/no-child-process-exec.md +101 -0
- package/docs/rules/no-child-process-shell-true.md +59 -0
- package/docs/rules/no-cookies.md +61 -0
- package/docs/rules/no-document-domain.md +59 -0
- package/docs/rules/no-document-execcommand-insert-html.md +69 -0
- package/docs/rules/no-document-parse-html-unsafe.md +72 -0
- package/docs/rules/no-document-write.md +64 -0
- package/docs/rules/no-domparser-html-without-sanitization.md +59 -0
- package/docs/rules/no-domparser-svg-without-sanitization.md +71 -0
- package/docs/rules/no-dynamic-import-unsafe-url.md +81 -0
- package/docs/rules/no-electron-allow-running-insecure-content.md +69 -0
- package/docs/rules/no-electron-dangerous-blink-features.md +77 -0
- package/docs/rules/no-electron-disable-context-isolation.md +69 -0
- package/docs/rules/no-electron-disable-sandbox.md +69 -0
- package/docs/rules/no-electron-disable-web-security.md +69 -0
- package/docs/rules/no-electron-enable-remote-module.md +69 -0
- package/docs/rules/no-electron-enable-webview-tag.md +77 -0
- package/docs/rules/no-electron-experimental-features.md +77 -0
- package/docs/rules/no-electron-expose-raw-ipc-renderer.md +79 -0
- package/docs/rules/no-electron-insecure-certificate-error-handler.md +72 -0
- package/docs/rules/no-electron-insecure-certificate-verify-proc.md +63 -0
- package/docs/rules/no-electron-insecure-permission-request-handler.md +67 -0
- package/docs/rules/no-electron-node-integration.md +70 -0
- package/docs/rules/no-electron-permission-check-handler-allow-all.md +66 -0
- package/docs/rules/no-electron-unchecked-ipc-sender.md +62 -0
- package/docs/rules/no-electron-unrestricted-navigation.md +64 -0
- package/docs/rules/no-electron-untrusted-open-external.md +65 -0
- package/docs/rules/no-electron-webview-allowpopups.md +59 -0
- package/docs/rules/no-electron-webview-insecure-webpreferences.md +84 -0
- package/docs/rules/no-electron-webview-node-integration.md +59 -0
- package/docs/rules/no-html-method.md +58 -0
- package/docs/rules/no-http-request-to-insecure-protocol.md +59 -0
- package/docs/rules/no-iframe-srcdoc.md +76 -0
- package/docs/rules/no-inner-html.md +65 -0
- package/docs/rules/no-insecure-random.md +66 -0
- package/docs/rules/no-insecure-tls-agent-options.md +59 -0
- package/docs/rules/no-insecure-url.md +72 -0
- package/docs/rules/no-location-javascript-url.md +59 -0
- package/docs/rules/no-message-event-without-origin-check.md +82 -0
- package/docs/rules/no-msapp-exec-unsafe.md +59 -0
- package/docs/rules/no-node-tls-check-server-identity-bypass.md +88 -0
- package/docs/rules/no-node-tls-legacy-protocol.md +80 -0
- package/docs/rules/no-node-tls-reject-unauthorized-zero.md +61 -0
- package/docs/rules/no-node-tls-security-level-zero.md +77 -0
- package/docs/rules/no-node-vm-run-in-context.md +89 -0
- package/docs/rules/no-node-vm-source-text-module.md +79 -0
- package/docs/rules/no-node-worker-threads-eval.md +82 -0
- package/docs/rules/no-nonnull-assertion-on-security-input.md +59 -0
- package/docs/rules/no-postmessage-star-origin.md +59 -0
- package/docs/rules/no-postmessage-without-origin-allowlist.md +59 -0
- package/docs/rules/no-range-create-contextual-fragment.md +64 -0
- package/docs/rules/no-script-src-data-url.md +83 -0
- package/docs/rules/no-script-text.md +80 -0
- package/docs/rules/no-service-worker-unsafe-script-url.md +85 -0
- package/docs/rules/no-set-html-unsafe.md +64 -0
- package/docs/rules/no-trusted-types-policy-pass-through.md +68 -0
- package/docs/rules/no-unsafe-alloc.md +62 -0
- package/docs/rules/no-unsafe-cast-to-trusted-types.md +59 -0
- package/docs/rules/no-window-open-without-noopener.md +63 -0
- package/docs/rules/no-winjs-html-unsafe.md +60 -0
- package/docs/rules/no-worker-blob-url.md +86 -0
- package/docs/rules/no-worker-data-url.md +85 -0
- package/docs/rules/overview.md +111 -0
- package/docs/rules/presets/angular.md +35 -0
- package/docs/rules/presets/angularjs.md +36 -0
- package/docs/rules/presets/common.md +59 -0
- package/docs/rules/presets/electron.md +51 -0
- package/docs/rules/presets/index.md +26 -0
- package/docs/rules/presets/node.md +43 -0
- package/docs/rules/presets/react.md +33 -0
- package/docs/rules/presets/recommended.md +104 -0
- package/docs/rules/presets/required.md +99 -0
- package/docs/rules/presets/typescript.md +34 -0
- package/package.json +583 -0
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# no-window-open-without-noopener
|
|
2
|
+
|
|
3
|
+
Require `noopener` when calling `window.open` with a `_blank` target.
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
This rule targets `window.open(...)` calls where the second argument is the
|
|
8
|
+
literal target `_blank`.
|
|
9
|
+
|
|
10
|
+
## What this rule reports
|
|
11
|
+
|
|
12
|
+
This rule reports `_blank` `window.open(...)` calls when the third `features`
|
|
13
|
+
argument is missing or does not include `noopener`.
|
|
14
|
+
|
|
15
|
+
## Why this rule exists
|
|
16
|
+
|
|
17
|
+
Opening a new tab/window without `noopener` allows the opened page to access
|
|
18
|
+
`window.opener`, which can enable tabnabbing and opener-based navigation abuse.
|
|
19
|
+
|
|
20
|
+
## ❌ Incorrect
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
window.open("https://example.com", "_blank");
|
|
24
|
+
window.open("https://example.com", "_blank", "noreferrer");
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## ✅ Correct
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
window.open("https://example.com", "_blank", "noopener");
|
|
31
|
+
window.open("https://example.com", "_blank", "noopener,noreferrer");
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## ESLint flat config example
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
import sdl from "eslint-plugin-sdl-2";
|
|
38
|
+
|
|
39
|
+
export default [
|
|
40
|
+
{
|
|
41
|
+
plugins: { sdl },
|
|
42
|
+
rules: {
|
|
43
|
+
"sdl/no-window-open-without-noopener": "error",
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## When not to use it
|
|
50
|
+
|
|
51
|
+
Disable only if your codebase avoids `_blank` navigation entirely or enforces a
|
|
52
|
+
different audited opener-hardening abstraction.
|
|
53
|
+
|
|
54
|
+
## Package documentation
|
|
55
|
+
|
|
56
|
+
- [Rule source](../../src/rules/no-window-open-without-noopener.ts)
|
|
57
|
+
|
|
58
|
+
## Further reading
|
|
59
|
+
|
|
60
|
+
> **Rule catalog ID:** R026
|
|
61
|
+
|
|
62
|
+
- [MDN: Window.open()](https://developer.mozilla.org/docs/Web/API/Window/open)
|
|
63
|
+
- [OWASP: Reverse Tabnabbing](https://owasp.org/www-community/attacks/Reverse_Tabnabbing)
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# no-winjs-html-unsafe
|
|
2
|
+
|
|
3
|
+
Disallow unsafe WinJS HTML helpers that bypass validation.
|
|
4
|
+
|
|
5
|
+
## Targeted pattern scope
|
|
6
|
+
|
|
7
|
+
This rule targets WinJS unsafe sink helpers such as:
|
|
8
|
+
|
|
9
|
+
- `WinJS.Utilities.setInnerHTMLUnsafe(...)`
|
|
10
|
+
- `WinJS.Utilities.setOuterHTMLUnsafe(...)`
|
|
11
|
+
- `WinJS.Utilities.insertAdjacentHTMLUnsafe(...)`.
|
|
12
|
+
|
|
13
|
+
## What this rule reports
|
|
14
|
+
|
|
15
|
+
This rule reports direct use of WinJS unsafe HTML insertion helpers.
|
|
16
|
+
|
|
17
|
+
## Why this rule exists
|
|
18
|
+
|
|
19
|
+
Unsafe HTML helper APIs increase XSS risk when supplied with untrusted content.
|
|
20
|
+
|
|
21
|
+
## ❌ Incorrect
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
WinJS.Utilities.setInnerHTMLUnsafe(element, userSuppliedHtml);
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## ✅ Correct
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
WinJS.Utilities.setInnerHTML(element, trustedTemplateHtml);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## ESLint flat config example
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
import sdl from "eslint-plugin-sdl-2";
|
|
37
|
+
|
|
38
|
+
export default [
|
|
39
|
+
{
|
|
40
|
+
plugins: { sdl },
|
|
41
|
+
rules: {
|
|
42
|
+
"sdl/no-winjs-html-unsafe": "error",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## When not to use it
|
|
49
|
+
|
|
50
|
+
Disable only for fully controlled HTML templates with an audited trust chain.
|
|
51
|
+
|
|
52
|
+
## Package documentation
|
|
53
|
+
|
|
54
|
+
- [Rule source](../../src/rules/no-winjs-html-unsafe.ts)
|
|
55
|
+
|
|
56
|
+
## Further reading
|
|
57
|
+
|
|
58
|
+
> **Rule catalog ID:** R027
|
|
59
|
+
|
|
60
|
+
- [WinJS utilities API overview](https://learn.microsoft.com/en-us/previous-versions/windows/apps/br229839\(v=win.10\))
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: no-worker-blob-url
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# no-worker-blob-url
|
|
6
|
+
|
|
7
|
+
Disallow worker code-loading APIs that use `blob:` URLs or `URL.createObjectURL(...)` for executable scripts.
|
|
8
|
+
|
|
9
|
+
## Targeted pattern scope
|
|
10
|
+
|
|
11
|
+
This rule targets blob-backed worker code-loading through:
|
|
12
|
+
|
|
13
|
+
- `new Worker(...)`
|
|
14
|
+
- `new SharedWorker(...)`
|
|
15
|
+
- `importScripts(...)`
|
|
16
|
+
|
|
17
|
+
The rule reports both static `blob:` string URLs and direct
|
|
18
|
+
`URL.createObjectURL(...)` calls passed into those sinks.
|
|
19
|
+
|
|
20
|
+
## What this rule reports
|
|
21
|
+
|
|
22
|
+
This rule reports worker code-loading expressions that source executable code
|
|
23
|
+
from blob URLs or object URLs.
|
|
24
|
+
|
|
25
|
+
## Why this rule exists
|
|
26
|
+
|
|
27
|
+
Blob-backed worker bootstraps hide executable code behind dynamically generated
|
|
28
|
+
object URLs. That makes code-loading harder to audit and can blur trust
|
|
29
|
+
boundaries in worker startup paths.
|
|
30
|
+
|
|
31
|
+
## ❌ Incorrect
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
new Worker(URL.createObjectURL(workerBlob));
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
self.importScripts("blob:https://example.com/bootstrap");
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## ✅ Correct
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
new Worker("https://cdn.example.com/worker.js");
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```ts
|
|
48
|
+
self.importScripts("https://cdn.example.com/worker-helpers.js");
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Behavior and migration notes
|
|
52
|
+
|
|
53
|
+
This rule intentionally focuses on direct blob-backed worker code-loading
|
|
54
|
+
expressions. Indirect variables and broader blob URL usage are out of scope.
|
|
55
|
+
|
|
56
|
+
## ESLint flat config example
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import sdl from "eslint-plugin-sdl-2";
|
|
60
|
+
|
|
61
|
+
export default [
|
|
62
|
+
{
|
|
63
|
+
plugins: { sdl },
|
|
64
|
+
rules: {
|
|
65
|
+
"sdl/no-worker-blob-url": "error",
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
];
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## When not to use it
|
|
72
|
+
|
|
73
|
+
Disable this rule only if your project intentionally relies on blob-backed
|
|
74
|
+
worker code-loading and that design has been reviewed and approved.
|
|
75
|
+
|
|
76
|
+
## Package documentation
|
|
77
|
+
|
|
78
|
+
- [Rule source](../../src/rules/no-worker-blob-url.ts)
|
|
79
|
+
|
|
80
|
+
## Further reading
|
|
81
|
+
|
|
82
|
+
> **Rule catalog ID:** R067
|
|
83
|
+
|
|
84
|
+
- [MDN: `Worker()`](https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker)
|
|
85
|
+
- [MDN: `URL.createObjectURL()`](https://developer.mozilla.org/en-US/docs/Web/API/URL/createObjectURL_static)
|
|
86
|
+
- [MDN: `importScripts()`](https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts)
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: no-worker-data-url
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# no-worker-data-url
|
|
6
|
+
|
|
7
|
+
Disallow worker code-loading APIs that use static `data:` URLs for executable scripts.
|
|
8
|
+
|
|
9
|
+
## Targeted pattern scope
|
|
10
|
+
|
|
11
|
+
This rule targets static `data:` URLs passed to:
|
|
12
|
+
|
|
13
|
+
- `new Worker(...)`
|
|
14
|
+
- `new SharedWorker(...)`
|
|
15
|
+
- `importScripts(...)`
|
|
16
|
+
|
|
17
|
+
The rule also covers `window`, `self`, and `globalThis` member access forms.
|
|
18
|
+
|
|
19
|
+
## What this rule reports
|
|
20
|
+
|
|
21
|
+
This rule reports `data:` URLs only when they are used as worker code-loading
|
|
22
|
+
inputs. It does not report other non-worker `data:` URL usage.
|
|
23
|
+
|
|
24
|
+
## Why this rule exists
|
|
25
|
+
|
|
26
|
+
A `data:` URL in a worker entrypoint or `importScripts(...)` call embeds
|
|
27
|
+
executable JavaScript directly in the URL value. That makes code loading harder
|
|
28
|
+
to review and can blur trust boundaries in worker bootstrap paths.
|
|
29
|
+
|
|
30
|
+
## ❌ Incorrect
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
new Worker("data:text/javascript,postMessage('hi')");
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
```ts
|
|
37
|
+
self.importScripts("data:text/javascript,bootstrap()");
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## ✅ Correct
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
new Worker("https://cdn.example.com/worker.js");
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
self.importScripts("https://cdn.example.com/worker-helpers.js");
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Behavior and migration notes
|
|
51
|
+
|
|
52
|
+
This rule intentionally focuses on static `data:` URLs in worker code-loading
|
|
53
|
+
APIs. Dynamic worker URLs and other worker-related risks are out of scope.
|
|
54
|
+
|
|
55
|
+
## ESLint flat config example
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
import sdl from "eslint-plugin-sdl-2";
|
|
59
|
+
|
|
60
|
+
export default [
|
|
61
|
+
{
|
|
62
|
+
plugins: { sdl },
|
|
63
|
+
rules: {
|
|
64
|
+
"sdl/no-worker-data-url": "error",
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## When not to use it
|
|
71
|
+
|
|
72
|
+
Disable this rule only if your project intentionally relies on worker code from
|
|
73
|
+
`data:` URLs and that design has been reviewed and approved.
|
|
74
|
+
|
|
75
|
+
## Package documentation
|
|
76
|
+
|
|
77
|
+
- [Rule source](../../src/rules/no-worker-data-url.ts)
|
|
78
|
+
|
|
79
|
+
## Further reading
|
|
80
|
+
|
|
81
|
+
> **Rule catalog ID:** R065
|
|
82
|
+
|
|
83
|
+
- [MDN: `Worker()`](https://developer.mozilla.org/en-US/docs/Web/API/Worker/Worker)
|
|
84
|
+
- [MDN: `importScripts()`](https://developer.mozilla.org/en-US/docs/Web/API/WorkerGlobalScope/importScripts)
|
|
85
|
+
- [MDN: `data:` URLs](https://developer.mozilla.org/en-US/docs/Web/URI/Reference/Schemes/data)
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Overview
|
|
3
|
+
description: README-style overview for eslint-plugin-sdl-2.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# eslint-plugin-sdl-2
|
|
7
|
+
|
|
8
|
+
SDL-focused ESLint plugin with modern flat-config presets and TypeScript-first
|
|
9
|
+
rule implementations.
|
|
10
|
+
|
|
11
|
+
The plugin targets common security pitfalls and risky web/runtime APIs that are
|
|
12
|
+
often surfaced during security reviews.
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install --save-dev eslint-plugin-sdl-2
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Quick start (Flat Config)
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import sdl from "eslint-plugin-sdl-2";
|
|
24
|
+
|
|
25
|
+
export default [...sdl.configs.recommended];
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Available presets
|
|
29
|
+
|
|
30
|
+
- `sdl.configs.common`
|
|
31
|
+
- `sdl.configs.typescript`
|
|
32
|
+
- `sdl.configs.angular`
|
|
33
|
+
- `sdl.configs.angularjs`
|
|
34
|
+
- `sdl.configs.node`
|
|
35
|
+
- `sdl.configs.react`
|
|
36
|
+
- `sdl.configs.electron`
|
|
37
|
+
- `sdl.configs.required`
|
|
38
|
+
- `sdl.configs.recommended`
|
|
39
|
+
|
|
40
|
+
See [Presets](./presets/index.md) for examples and per-preset rule tables.
|
|
41
|
+
|
|
42
|
+
## Rules
|
|
43
|
+
|
|
44
|
+
Custom rules currently documented:
|
|
45
|
+
|
|
46
|
+
- `no-angular-bypass-sanitizer`
|
|
47
|
+
- `no-angular-sanitization-trusted-urls`
|
|
48
|
+
- `no-angularjs-bypass-sce`
|
|
49
|
+
- `no-angularjs-enable-svg`
|
|
50
|
+
- `no-angularjs-sanitization-whitelist`
|
|
51
|
+
- `no-child-process-exec`
|
|
52
|
+
- `no-cookies`
|
|
53
|
+
- `no-document-domain`
|
|
54
|
+
- `no-document-execcommand-insert-html`
|
|
55
|
+
- `no-document-parse-html-unsafe`
|
|
56
|
+
- `no-document-write`
|
|
57
|
+
- `no-domparser-html-without-sanitization`
|
|
58
|
+
- `no-domparser-svg-without-sanitization`
|
|
59
|
+
- `no-dynamic-import-unsafe-url`
|
|
60
|
+
- `no-electron-allow-running-insecure-content`
|
|
61
|
+
- `no-electron-dangerous-blink-features`
|
|
62
|
+
- `no-electron-disable-context-isolation`
|
|
63
|
+
- `no-electron-disable-sandbox`
|
|
64
|
+
- `no-electron-disable-web-security`
|
|
65
|
+
- `no-electron-enable-webview-tag`
|
|
66
|
+
- `no-electron-enable-remote-module`
|
|
67
|
+
- `no-electron-experimental-features`
|
|
68
|
+
- `no-electron-expose-raw-ipc-renderer`
|
|
69
|
+
- `no-electron-insecure-certificate-error-handler`
|
|
70
|
+
- `no-electron-node-integration`
|
|
71
|
+
- `no-electron-permission-check-handler-allow-all`
|
|
72
|
+
- `no-electron-untrusted-open-external`
|
|
73
|
+
- `no-electron-webview-insecure-webpreferences`
|
|
74
|
+
- `no-html-method`
|
|
75
|
+
- `no-http-request-to-insecure-protocol`
|
|
76
|
+
- `no-iframe-srcdoc`
|
|
77
|
+
- `no-inner-html`
|
|
78
|
+
- `no-insecure-random`
|
|
79
|
+
- `no-insecure-tls-agent-options`
|
|
80
|
+
- `no-insecure-url`
|
|
81
|
+
- `no-location-javascript-url`
|
|
82
|
+
- `no-message-event-without-origin-check`
|
|
83
|
+
- `no-msapp-exec-unsafe`
|
|
84
|
+
- `no-node-tls-check-server-identity-bypass`
|
|
85
|
+
- `no-node-tls-legacy-protocol`
|
|
86
|
+
- `no-node-tls-reject-unauthorized-zero`
|
|
87
|
+
- `no-node-tls-security-level-zero`
|
|
88
|
+
- `no-node-vm-run-in-context`
|
|
89
|
+
- `no-node-vm-source-text-module`
|
|
90
|
+
- `no-node-worker-threads-eval`
|
|
91
|
+
- `no-nonnull-assertion-on-security-input`
|
|
92
|
+
- `no-postmessage-star-origin`
|
|
93
|
+
- `no-postmessage-without-origin-allowlist`
|
|
94
|
+
- `no-range-create-contextual-fragment`
|
|
95
|
+
- `no-script-src-data-url`
|
|
96
|
+
- `no-script-text`
|
|
97
|
+
- `no-service-worker-unsafe-script-url`
|
|
98
|
+
- `no-set-html-unsafe`
|
|
99
|
+
- `no-trusted-types-policy-pass-through`
|
|
100
|
+
- `no-unsafe-alloc`
|
|
101
|
+
- `no-unsafe-cast-to-trusted-types`
|
|
102
|
+
- `no-window-open-without-noopener`
|
|
103
|
+
- `no-winjs-html-unsafe`
|
|
104
|
+
- `no-worker-blob-url`
|
|
105
|
+
- `no-worker-data-url`
|
|
106
|
+
|
|
107
|
+
## Next steps
|
|
108
|
+
|
|
109
|
+
- Open [Getting Started](./getting-started.md).
|
|
110
|
+
- Review [Presets](./presets/index.md) for rollout options.
|
|
111
|
+
- Browse rule docs in the sidebar.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Angular preset
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 🅰️ Angular
|
|
6
|
+
|
|
7
|
+
Use for Angular-focused security rules.
|
|
8
|
+
|
|
9
|
+
## Config key
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
sdl.configs.angular;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Flat Config example
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import sdl from "eslint-plugin-sdl-2";
|
|
19
|
+
|
|
20
|
+
export default [...sdl.configs.angular];
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Rules in this preset
|
|
24
|
+
|
|
25
|
+
- `Fix` legend:
|
|
26
|
+
- `🔧` = autofixable
|
|
27
|
+
- `💡` = suggestions available
|
|
28
|
+
- `—` = report only
|
|
29
|
+
|
|
30
|
+
| Rule | Fix |
|
|
31
|
+
| --- | :-: |
|
|
32
|
+
| [`no-angular-bypass-sanitizer`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-bypass-sanitizer) | — |
|
|
33
|
+
| [`no-angular-bypass-security-trust-html`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-bypass-security-trust-html) | — |
|
|
34
|
+
| [`no-angular-innerhtml-binding`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-innerhtml-binding) | — |
|
|
35
|
+
| [`no-angular-sanitization-trusted-urls`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angular-sanitization-trusted-urls) | — |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: AngularJS preset
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 🧭 AngularJS
|
|
6
|
+
|
|
7
|
+
Use for AngularJS-specific sanitization and SCE policy rules.
|
|
8
|
+
|
|
9
|
+
## Config key
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
sdl.configs.angularjs;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Flat Config example
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import sdl from "eslint-plugin-sdl-2";
|
|
19
|
+
|
|
20
|
+
export default [...sdl.configs.angularjs];
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Rules in this preset
|
|
24
|
+
|
|
25
|
+
- `Fix` legend:
|
|
26
|
+
- `🔧` = autofixable
|
|
27
|
+
- `💡` = suggestions available
|
|
28
|
+
- `—` = report only
|
|
29
|
+
|
|
30
|
+
| Rule | Fix |
|
|
31
|
+
| --- | :-: |
|
|
32
|
+
| [`no-angularjs-bypass-sce`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-bypass-sce) | — |
|
|
33
|
+
| [`no-angularjs-enable-svg`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-enable-svg) | — |
|
|
34
|
+
| [`no-angularjs-ng-bind-html-without-sanitize`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-ng-bind-html-without-sanitize) | — |
|
|
35
|
+
| [`no-angularjs-sanitization-whitelist`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-sanitization-whitelist) | — |
|
|
36
|
+
| [`no-angularjs-sce-resource-url-wildcard`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-angularjs-sce-resource-url-wildcard) | — |
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Common preset
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 🟢 Common
|
|
6
|
+
|
|
7
|
+
Use for baseline browser/runtime security checks in JavaScript or TypeScript
|
|
8
|
+
projects.
|
|
9
|
+
|
|
10
|
+
## Config key
|
|
11
|
+
|
|
12
|
+
```ts
|
|
13
|
+
sdl.configs.common;
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Flat Config example
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
import sdl from "eslint-plugin-sdl-2";
|
|
20
|
+
|
|
21
|
+
export default [...sdl.configs.common];
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Rules in this preset
|
|
25
|
+
|
|
26
|
+
- `Fix` legend:
|
|
27
|
+
- `🔧` = autofixable
|
|
28
|
+
- `💡` = suggestions available
|
|
29
|
+
- `—` = report only
|
|
30
|
+
|
|
31
|
+
| Rule | Fix |
|
|
32
|
+
| --- | :-: |
|
|
33
|
+
| [`no-cookies`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-cookies) | — |
|
|
34
|
+
| [`no-document-domain`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-domain) | — |
|
|
35
|
+
| [`no-document-execcommand-insert-html`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-execcommand-insert-html) | — |
|
|
36
|
+
| [`no-document-parse-html-unsafe`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-parse-html-unsafe) | — |
|
|
37
|
+
| [`no-document-write`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-document-write) | — |
|
|
38
|
+
| [`no-domparser-html-without-sanitization`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-domparser-html-without-sanitization) | — |
|
|
39
|
+
| [`no-domparser-svg-without-sanitization`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-domparser-svg-without-sanitization) | — |
|
|
40
|
+
| [`no-dynamic-import-unsafe-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-dynamic-import-unsafe-url) | — |
|
|
41
|
+
| [`no-html-method`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-html-method) | — |
|
|
42
|
+
| [`no-iframe-srcdoc`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-iframe-srcdoc) | — |
|
|
43
|
+
| [`no-inner-html`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-inner-html) | — |
|
|
44
|
+
| [`no-insecure-random`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-random) | — |
|
|
45
|
+
| [`no-insecure-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-url) | 🔧 |
|
|
46
|
+
| [`no-location-javascript-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-location-javascript-url) | — |
|
|
47
|
+
| [`no-message-event-without-origin-check`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-message-event-without-origin-check) | — |
|
|
48
|
+
| [`no-msapp-exec-unsafe`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-msapp-exec-unsafe) | — |
|
|
49
|
+
| [`no-postmessage-star-origin`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-postmessage-star-origin) | 💡 |
|
|
50
|
+
| [`no-postmessage-without-origin-allowlist`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-postmessage-without-origin-allowlist) | — |
|
|
51
|
+
| [`no-range-create-contextual-fragment`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-range-create-contextual-fragment) | — |
|
|
52
|
+
| [`no-script-src-data-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-script-src-data-url) | — |
|
|
53
|
+
| [`no-script-text`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-script-text) | — |
|
|
54
|
+
| [`no-service-worker-unsafe-script-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-service-worker-unsafe-script-url) | — |
|
|
55
|
+
| [`no-set-html-unsafe`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-set-html-unsafe) | — |
|
|
56
|
+
| [`no-window-open-without-noopener`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-window-open-without-noopener) | — |
|
|
57
|
+
| [`no-winjs-html-unsafe`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-winjs-html-unsafe) | — |
|
|
58
|
+
| [`no-worker-blob-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-worker-blob-url) | — |
|
|
59
|
+
| [`no-worker-data-url`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-worker-data-url) | — |
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Electron preset
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# ⚡ Electron
|
|
6
|
+
|
|
7
|
+
Use for Electron security checks around webPreferences and Node integration.
|
|
8
|
+
|
|
9
|
+
## Config key
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
sdl.configs.electron;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Flat Config example
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import sdl from "eslint-plugin-sdl-2";
|
|
19
|
+
|
|
20
|
+
export default [...sdl.configs.electron];
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Rules in this preset
|
|
24
|
+
|
|
25
|
+
- `Fix` legend:
|
|
26
|
+
- `🔧` = autofixable
|
|
27
|
+
- `💡` = suggestions available
|
|
28
|
+
- `—` = report only
|
|
29
|
+
|
|
30
|
+
| Rule | Fix |
|
|
31
|
+
| --- | :-: |
|
|
32
|
+
| [`no-electron-allow-running-insecure-content`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-allow-running-insecure-content) | 🔧 |
|
|
33
|
+
| [`no-electron-dangerous-blink-features`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-dangerous-blink-features) | — |
|
|
34
|
+
| [`no-electron-disable-context-isolation`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-context-isolation) | 🔧 |
|
|
35
|
+
| [`no-electron-disable-sandbox`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-sandbox) | 🔧 |
|
|
36
|
+
| [`no-electron-disable-web-security`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-disable-web-security) | 🔧 |
|
|
37
|
+
| [`no-electron-enable-remote-module`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-enable-remote-module) | 🔧 |
|
|
38
|
+
| [`no-electron-enable-webview-tag`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-enable-webview-tag) | 🔧 |
|
|
39
|
+
| [`no-electron-experimental-features`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-experimental-features) | 🔧 |
|
|
40
|
+
| [`no-electron-expose-raw-ipc-renderer`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-expose-raw-ipc-renderer) | — |
|
|
41
|
+
| [`no-electron-insecure-certificate-error-handler`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-certificate-error-handler) | — |
|
|
42
|
+
| [`no-electron-insecure-certificate-verify-proc`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-certificate-verify-proc) | — |
|
|
43
|
+
| [`no-electron-insecure-permission-request-handler`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-insecure-permission-request-handler) | — |
|
|
44
|
+
| [`no-electron-node-integration`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-node-integration) | 🔧 |
|
|
45
|
+
| [`no-electron-permission-check-handler-allow-all`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-permission-check-handler-allow-all) | — |
|
|
46
|
+
| [`no-electron-unchecked-ipc-sender`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-unchecked-ipc-sender) | — |
|
|
47
|
+
| [`no-electron-unrestricted-navigation`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-unrestricted-navigation) | — |
|
|
48
|
+
| [`no-electron-untrusted-open-external`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-untrusted-open-external) | — |
|
|
49
|
+
| [`no-electron-webview-allowpopups`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-allowpopups) | 🔧 |
|
|
50
|
+
| [`no-electron-webview-insecure-webpreferences`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-insecure-webpreferences) | — |
|
|
51
|
+
| [`no-electron-webview-node-integration`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-electron-webview-node-integration) | 🔧 |
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Presets
|
|
3
|
+
description: Preset reference and selection guide for eslint-plugin-SDL-2.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Presets
|
|
7
|
+
|
|
8
|
+
Use these presets to compose SDL-oriented linting in flat config.
|
|
9
|
+
|
|
10
|
+
## Preset catalog
|
|
11
|
+
|
|
12
|
+
- [Common](./common.md)
|
|
13
|
+
- [TypeScript](./typescript.md)
|
|
14
|
+
- [Angular](./angular.md)
|
|
15
|
+
- [AngularJS](./angularjs.md)
|
|
16
|
+
- [Node](./node.md)
|
|
17
|
+
- [React](./react.md)
|
|
18
|
+
- [Electron](./electron.md)
|
|
19
|
+
- [Required](./required.md)
|
|
20
|
+
- [Recommended](./recommended.md)
|
|
21
|
+
|
|
22
|
+
Each preset page in this section includes:
|
|
23
|
+
|
|
24
|
+
- when to use it
|
|
25
|
+
- exact config key
|
|
26
|
+
- copy/paste flat config snippet
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Node preset
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# 🟩 Node
|
|
6
|
+
|
|
7
|
+
Use for Node.js-specific runtime safety checks.
|
|
8
|
+
|
|
9
|
+
## Config key
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
sdl.configs.node;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Flat Config example
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import sdl from "eslint-plugin-sdl-2";
|
|
19
|
+
|
|
20
|
+
export default [...sdl.configs.node];
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Rules in this preset
|
|
24
|
+
|
|
25
|
+
- `Fix` legend:
|
|
26
|
+
- `🔧` = autofixable
|
|
27
|
+
- `💡` = suggestions available
|
|
28
|
+
- `—` = report only
|
|
29
|
+
|
|
30
|
+
| Rule | Fix |
|
|
31
|
+
| --- | :-: |
|
|
32
|
+
| [`no-child-process-exec`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-child-process-exec) | — |
|
|
33
|
+
| [`no-child-process-shell-true`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-child-process-shell-true) | — |
|
|
34
|
+
| [`no-http-request-to-insecure-protocol`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-http-request-to-insecure-protocol) | 🔧 |
|
|
35
|
+
| [`no-insecure-tls-agent-options`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-insecure-tls-agent-options) | 🔧 |
|
|
36
|
+
| [`no-node-tls-check-server-identity-bypass`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-check-server-identity-bypass) | — |
|
|
37
|
+
| [`no-node-tls-legacy-protocol`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-legacy-protocol) | — |
|
|
38
|
+
| [`no-node-tls-reject-unauthorized-zero`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-reject-unauthorized-zero) | 💡 |
|
|
39
|
+
| [`no-node-tls-security-level-zero`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-tls-security-level-zero) | — |
|
|
40
|
+
| [`no-node-vm-run-in-context`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-vm-run-in-context) | — |
|
|
41
|
+
| [`no-node-vm-source-text-module`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-vm-source-text-module) | — |
|
|
42
|
+
| [`no-node-worker-threads-eval`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-node-worker-threads-eval) | — |
|
|
43
|
+
| [`no-unsafe-alloc`](https://nick2bad4u.github.io/eslint-plugin-SDL-2/docs/rules/no-unsafe-alloc) | 🔧 |
|