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.
Files changed (418) hide show
  1. package/CHANGELOG.md +5316 -0
  2. package/LICENSE +21 -0
  3. package/README.md +133 -0
  4. package/dist/_internal/ast-utils.d.ts +17 -0
  5. package/dist/_internal/ast-utils.d.ts.map +1 -0
  6. package/dist/_internal/ast-utils.js +93 -0
  7. package/dist/_internal/ast-utils.js.map +1 -0
  8. package/dist/_internal/config-references.d.ts +5 -0
  9. package/dist/_internal/config-references.d.ts.map +1 -0
  10. package/dist/_internal/config-references.js +13 -0
  11. package/dist/_internal/config-references.js.map +1 -0
  12. package/dist/_internal/create-rule.d.ts +9 -0
  13. package/dist/_internal/create-rule.d.ts.map +1 -0
  14. package/dist/_internal/create-rule.js +6 -0
  15. package/dist/_internal/create-rule.js.map +1 -0
  16. package/dist/_internal/domparser.d.ts +19 -0
  17. package/dist/_internal/domparser.d.ts.map +1 -0
  18. package/dist/_internal/domparser.js +45 -0
  19. package/dist/_internal/domparser.js.map +1 -0
  20. package/dist/_internal/electron-web-preferences.d.ts +14 -0
  21. package/dist/_internal/electron-web-preferences.d.ts.map +1 -0
  22. package/dist/_internal/electron-web-preferences.js +63 -0
  23. package/dist/_internal/electron-web-preferences.js.map +1 -0
  24. package/dist/_internal/estree-utils.d.ts +51 -0
  25. package/dist/_internal/estree-utils.d.ts.map +1 -0
  26. package/dist/_internal/estree-utils.js +112 -0
  27. package/dist/_internal/estree-utils.js.map +1 -0
  28. package/dist/_internal/node-tls-config.d.ts +44 -0
  29. package/dist/_internal/node-tls-config.d.ts.map +1 -0
  30. package/dist/_internal/node-tls-config.js +101 -0
  31. package/dist/_internal/node-tls-config.js.map +1 -0
  32. package/dist/_internal/rules-registry.d.ts +10 -0
  33. package/dist/_internal/rules-registry.d.ts.map +1 -0
  34. package/dist/_internal/rules-registry.js +148 -0
  35. package/dist/_internal/rules-registry.js.map +1 -0
  36. package/dist/_internal/script-element.d.ts +7 -0
  37. package/dist/_internal/script-element.d.ts.map +1 -0
  38. package/dist/_internal/script-element.js +46 -0
  39. package/dist/_internal/script-element.js.map +1 -0
  40. package/dist/_internal/worker-code-loading.d.ts +69 -0
  41. package/dist/_internal/worker-code-loading.d.ts.map +1 -0
  42. package/dist/_internal/worker-code-loading.js +134 -0
  43. package/dist/_internal/worker-code-loading.js.map +1 -0
  44. package/dist/plugin.cjs +6036 -0
  45. package/dist/plugin.cjs.map +7 -0
  46. package/dist/plugin.d.cts +11 -0
  47. package/dist/plugin.d.ts +11 -0
  48. package/dist/plugin.d.ts.map +1 -0
  49. package/dist/plugin.js +235 -0
  50. package/dist/plugin.js.map +1 -0
  51. package/dist/rules/no-angular-bypass-sanitizer.d.ts +5 -0
  52. package/dist/rules/no-angular-bypass-sanitizer.d.ts.map +1 -0
  53. package/dist/rules/no-angular-bypass-sanitizer.js +32 -0
  54. package/dist/rules/no-angular-bypass-sanitizer.js.map +1 -0
  55. package/dist/rules/no-angular-bypass-security-trust-html.d.ts +5 -0
  56. package/dist/rules/no-angular-bypass-security-trust-html.d.ts.map +1 -0
  57. package/dist/rules/no-angular-bypass-security-trust-html.js +51 -0
  58. package/dist/rules/no-angular-bypass-security-trust-html.js.map +1 -0
  59. package/dist/rules/no-angular-innerhtml-binding.d.ts +5 -0
  60. package/dist/rules/no-angular-innerhtml-binding.d.ts.map +1 -0
  61. package/dist/rules/no-angular-innerhtml-binding.js +57 -0
  62. package/dist/rules/no-angular-innerhtml-binding.js.map +1 -0
  63. package/dist/rules/no-angular-sanitization-trusted-urls.d.ts +5 -0
  64. package/dist/rules/no-angular-sanitization-trusted-urls.d.ts.map +1 -0
  65. package/dist/rules/no-angular-sanitization-trusted-urls.js +32 -0
  66. package/dist/rules/no-angular-sanitization-trusted-urls.js.map +1 -0
  67. package/dist/rules/no-angularjs-bypass-sce.d.ts +5 -0
  68. package/dist/rules/no-angularjs-bypass-sce.d.ts.map +1 -0
  69. package/dist/rules/no-angularjs-bypass-sce.js +80 -0
  70. package/dist/rules/no-angularjs-bypass-sce.js.map +1 -0
  71. package/dist/rules/no-angularjs-enable-svg.d.ts +5 -0
  72. package/dist/rules/no-angularjs-enable-svg.d.ts.map +1 -0
  73. package/dist/rules/no-angularjs-enable-svg.js +48 -0
  74. package/dist/rules/no-angularjs-enable-svg.js.map +1 -0
  75. package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.d.ts +5 -0
  76. package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.d.ts.map +1 -0
  77. package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.js +64 -0
  78. package/dist/rules/no-angularjs-ng-bind-html-without-sanitize.js.map +1 -0
  79. package/dist/rules/no-angularjs-sanitization-whitelist.d.ts +5 -0
  80. package/dist/rules/no-angularjs-sanitization-whitelist.d.ts.map +1 -0
  81. package/dist/rules/no-angularjs-sanitization-whitelist.js +32 -0
  82. package/dist/rules/no-angularjs-sanitization-whitelist.js.map +1 -0
  83. package/dist/rules/no-angularjs-sce-resource-url-wildcard.d.ts +5 -0
  84. package/dist/rules/no-angularjs-sce-resource-url-wildcard.d.ts.map +1 -0
  85. package/dist/rules/no-angularjs-sce-resource-url-wildcard.js +69 -0
  86. package/dist/rules/no-angularjs-sce-resource-url-wildcard.js.map +1 -0
  87. package/dist/rules/no-child-process-exec.d.ts +5 -0
  88. package/dist/rules/no-child-process-exec.d.ts.map +1 -0
  89. package/dist/rules/no-child-process-exec.js +141 -0
  90. package/dist/rules/no-child-process-exec.js.map +1 -0
  91. package/dist/rules/no-child-process-shell-true.d.ts +5 -0
  92. package/dist/rules/no-child-process-shell-true.d.ts.map +1 -0
  93. package/dist/rules/no-child-process-shell-true.js +89 -0
  94. package/dist/rules/no-child-process-shell-true.js.map +1 -0
  95. package/dist/rules/no-cookies.d.ts +5 -0
  96. package/dist/rules/no-cookies.d.ts.map +1 -0
  97. package/dist/rules/no-cookies.js +38 -0
  98. package/dist/rules/no-cookies.js.map +1 -0
  99. package/dist/rules/no-document-domain.d.ts +5 -0
  100. package/dist/rules/no-document-domain.d.ts.map +1 -0
  101. package/dist/rules/no-document-domain.js +41 -0
  102. package/dist/rules/no-document-domain.js.map +1 -0
  103. package/dist/rules/no-document-execcommand-insert-html.d.ts +5 -0
  104. package/dist/rules/no-document-execcommand-insert-html.d.ts.map +1 -0
  105. package/dist/rules/no-document-execcommand-insert-html.js +57 -0
  106. package/dist/rules/no-document-execcommand-insert-html.js.map +1 -0
  107. package/dist/rules/no-document-parse-html-unsafe.d.ts +5 -0
  108. package/dist/rules/no-document-parse-html-unsafe.d.ts.map +1 -0
  109. package/dist/rules/no-document-parse-html-unsafe.js +67 -0
  110. package/dist/rules/no-document-parse-html-unsafe.js.map +1 -0
  111. package/dist/rules/no-document-write.d.ts +5 -0
  112. package/dist/rules/no-document-write.d.ts.map +1 -0
  113. package/dist/rules/no-document-write.js +40 -0
  114. package/dist/rules/no-document-write.js.map +1 -0
  115. package/dist/rules/no-domparser-html-without-sanitization.d.ts +5 -0
  116. package/dist/rules/no-domparser-html-without-sanitization.d.ts.map +1 -0
  117. package/dist/rules/no-domparser-html-without-sanitization.js +56 -0
  118. package/dist/rules/no-domparser-html-without-sanitization.js.map +1 -0
  119. package/dist/rules/no-domparser-svg-without-sanitization.d.ts +5 -0
  120. package/dist/rules/no-domparser-svg-without-sanitization.d.ts.map +1 -0
  121. package/dist/rules/no-domparser-svg-without-sanitization.js +56 -0
  122. package/dist/rules/no-domparser-svg-without-sanitization.js.map +1 -0
  123. package/dist/rules/no-dynamic-import-unsafe-url.d.ts +5 -0
  124. package/dist/rules/no-dynamic-import-unsafe-url.d.ts.map +1 -0
  125. package/dist/rules/no-dynamic-import-unsafe-url.js +47 -0
  126. package/dist/rules/no-dynamic-import-unsafe-url.js.map +1 -0
  127. package/dist/rules/no-electron-allow-running-insecure-content.d.ts +5 -0
  128. package/dist/rules/no-electron-allow-running-insecure-content.d.ts.map +1 -0
  129. package/dist/rules/no-electron-allow-running-insecure-content.js +30 -0
  130. package/dist/rules/no-electron-allow-running-insecure-content.js.map +1 -0
  131. package/dist/rules/no-electron-dangerous-blink-features.d.ts +5 -0
  132. package/dist/rules/no-electron-dangerous-blink-features.d.ts.map +1 -0
  133. package/dist/rules/no-electron-dangerous-blink-features.js +89 -0
  134. package/dist/rules/no-electron-dangerous-blink-features.js.map +1 -0
  135. package/dist/rules/no-electron-disable-context-isolation.d.ts +5 -0
  136. package/dist/rules/no-electron-disable-context-isolation.d.ts.map +1 -0
  137. package/dist/rules/no-electron-disable-context-isolation.js +30 -0
  138. package/dist/rules/no-electron-disable-context-isolation.js.map +1 -0
  139. package/dist/rules/no-electron-disable-sandbox.d.ts +5 -0
  140. package/dist/rules/no-electron-disable-sandbox.d.ts.map +1 -0
  141. package/dist/rules/no-electron-disable-sandbox.js +30 -0
  142. package/dist/rules/no-electron-disable-sandbox.js.map +1 -0
  143. package/dist/rules/no-electron-disable-web-security.d.ts +5 -0
  144. package/dist/rules/no-electron-disable-web-security.d.ts.map +1 -0
  145. package/dist/rules/no-electron-disable-web-security.js +30 -0
  146. package/dist/rules/no-electron-disable-web-security.js.map +1 -0
  147. package/dist/rules/no-electron-enable-remote-module.d.ts +5 -0
  148. package/dist/rules/no-electron-enable-remote-module.d.ts.map +1 -0
  149. package/dist/rules/no-electron-enable-remote-module.js +30 -0
  150. package/dist/rules/no-electron-enable-remote-module.js.map +1 -0
  151. package/dist/rules/no-electron-enable-webview-tag.d.ts +5 -0
  152. package/dist/rules/no-electron-enable-webview-tag.d.ts.map +1 -0
  153. package/dist/rules/no-electron-enable-webview-tag.js +30 -0
  154. package/dist/rules/no-electron-enable-webview-tag.js.map +1 -0
  155. package/dist/rules/no-electron-experimental-features.d.ts +5 -0
  156. package/dist/rules/no-electron-experimental-features.d.ts.map +1 -0
  157. package/dist/rules/no-electron-experimental-features.js +30 -0
  158. package/dist/rules/no-electron-experimental-features.js.map +1 -0
  159. package/dist/rules/no-electron-expose-raw-ipc-renderer.d.ts +5 -0
  160. package/dist/rules/no-electron-expose-raw-ipc-renderer.d.ts.map +1 -0
  161. package/dist/rules/no-electron-expose-raw-ipc-renderer.js +108 -0
  162. package/dist/rules/no-electron-expose-raw-ipc-renderer.js.map +1 -0
  163. package/dist/rules/no-electron-insecure-certificate-error-handler.d.ts +5 -0
  164. package/dist/rules/no-electron-insecure-certificate-error-handler.d.ts.map +1 -0
  165. package/dist/rules/no-electron-insecure-certificate-error-handler.js +91 -0
  166. package/dist/rules/no-electron-insecure-certificate-error-handler.js.map +1 -0
  167. package/dist/rules/no-electron-insecure-certificate-verify-proc.d.ts +5 -0
  168. package/dist/rules/no-electron-insecure-certificate-verify-proc.d.ts.map +1 -0
  169. package/dist/rules/no-electron-insecure-certificate-verify-proc.js +75 -0
  170. package/dist/rules/no-electron-insecure-certificate-verify-proc.js.map +1 -0
  171. package/dist/rules/no-electron-insecure-permission-request-handler.d.ts +5 -0
  172. package/dist/rules/no-electron-insecure-permission-request-handler.d.ts.map +1 -0
  173. package/dist/rules/no-electron-insecure-permission-request-handler.js +75 -0
  174. package/dist/rules/no-electron-insecure-permission-request-handler.js.map +1 -0
  175. package/dist/rules/no-electron-node-integration.d.ts +5 -0
  176. package/dist/rules/no-electron-node-integration.d.ts.map +1 -0
  177. package/dist/rules/no-electron-node-integration.js +52 -0
  178. package/dist/rules/no-electron-node-integration.js.map +1 -0
  179. package/dist/rules/no-electron-permission-check-handler-allow-all.d.ts +5 -0
  180. package/dist/rules/no-electron-permission-check-handler-allow-all.d.ts.map +1 -0
  181. package/dist/rules/no-electron-permission-check-handler-allow-all.js +63 -0
  182. package/dist/rules/no-electron-permission-check-handler-allow-all.js.map +1 -0
  183. package/dist/rules/no-electron-unchecked-ipc-sender.d.ts +5 -0
  184. package/dist/rules/no-electron-unchecked-ipc-sender.d.ts.map +1 -0
  185. package/dist/rules/no-electron-unchecked-ipc-sender.js +90 -0
  186. package/dist/rules/no-electron-unchecked-ipc-sender.js.map +1 -0
  187. package/dist/rules/no-electron-unrestricted-navigation.d.ts +5 -0
  188. package/dist/rules/no-electron-unrestricted-navigation.d.ts.map +1 -0
  189. package/dist/rules/no-electron-unrestricted-navigation.js +100 -0
  190. package/dist/rules/no-electron-unrestricted-navigation.js.map +1 -0
  191. package/dist/rules/no-electron-untrusted-open-external.d.ts +5 -0
  192. package/dist/rules/no-electron-untrusted-open-external.d.ts.map +1 -0
  193. package/dist/rules/no-electron-untrusted-open-external.js +92 -0
  194. package/dist/rules/no-electron-untrusted-open-external.js.map +1 -0
  195. package/dist/rules/no-electron-webview-allowpopups.d.ts +5 -0
  196. package/dist/rules/no-electron-webview-allowpopups.d.ts.map +1 -0
  197. package/dist/rules/no-electron-webview-allowpopups.js +85 -0
  198. package/dist/rules/no-electron-webview-allowpopups.js.map +1 -0
  199. package/dist/rules/no-electron-webview-insecure-webpreferences.d.ts +5 -0
  200. package/dist/rules/no-electron-webview-insecure-webpreferences.d.ts.map +1 -0
  201. package/dist/rules/no-electron-webview-insecure-webpreferences.js +88 -0
  202. package/dist/rules/no-electron-webview-insecure-webpreferences.js.map +1 -0
  203. package/dist/rules/no-electron-webview-node-integration.d.ts +5 -0
  204. package/dist/rules/no-electron-webview-node-integration.d.ts.map +1 -0
  205. package/dist/rules/no-electron-webview-node-integration.js +107 -0
  206. package/dist/rules/no-electron-webview-node-integration.js.map +1 -0
  207. package/dist/rules/no-html-method.d.ts +5 -0
  208. package/dist/rules/no-html-method.d.ts.map +1 -0
  209. package/dist/rules/no-html-method.js +42 -0
  210. package/dist/rules/no-html-method.js.map +1 -0
  211. package/dist/rules/no-http-request-to-insecure-protocol.d.ts +5 -0
  212. package/dist/rules/no-http-request-to-insecure-protocol.d.ts.map +1 -0
  213. package/dist/rules/no-http-request-to-insecure-protocol.js +94 -0
  214. package/dist/rules/no-http-request-to-insecure-protocol.js.map +1 -0
  215. package/dist/rules/no-iframe-srcdoc.d.ts +5 -0
  216. package/dist/rules/no-iframe-srcdoc.d.ts.map +1 -0
  217. package/dist/rules/no-iframe-srcdoc.js +144 -0
  218. package/dist/rules/no-iframe-srcdoc.js.map +1 -0
  219. package/dist/rules/no-inner-html.d.ts +5 -0
  220. package/dist/rules/no-inner-html.d.ts.map +1 -0
  221. package/dist/rules/no-inner-html.js +67 -0
  222. package/dist/rules/no-inner-html.js.map +1 -0
  223. package/dist/rules/no-insecure-random.d.ts +5 -0
  224. package/dist/rules/no-insecure-random.d.ts.map +1 -0
  225. package/dist/rules/no-insecure-random.js +95 -0
  226. package/dist/rules/no-insecure-random.js.map +1 -0
  227. package/dist/rules/no-insecure-tls-agent-options.d.ts +5 -0
  228. package/dist/rules/no-insecure-tls-agent-options.d.ts.map +1 -0
  229. package/dist/rules/no-insecure-tls-agent-options.js +73 -0
  230. package/dist/rules/no-insecure-tls-agent-options.js.map +1 -0
  231. package/dist/rules/no-insecure-url.d.ts +12 -0
  232. package/dist/rules/no-insecure-url.d.ts.map +1 -0
  233. package/dist/rules/no-insecure-url.js +142 -0
  234. package/dist/rules/no-insecure-url.js.map +1 -0
  235. package/dist/rules/no-location-javascript-url.d.ts +5 -0
  236. package/dist/rules/no-location-javascript-url.d.ts.map +1 -0
  237. package/dist/rules/no-location-javascript-url.js +98 -0
  238. package/dist/rules/no-location-javascript-url.js.map +1 -0
  239. package/dist/rules/no-message-event-without-origin-check.d.ts +5 -0
  240. package/dist/rules/no-message-event-without-origin-check.d.ts.map +1 -0
  241. package/dist/rules/no-message-event-without-origin-check.js +183 -0
  242. package/dist/rules/no-message-event-without-origin-check.js.map +1 -0
  243. package/dist/rules/no-msapp-exec-unsafe.d.ts +5 -0
  244. package/dist/rules/no-msapp-exec-unsafe.d.ts.map +1 -0
  245. package/dist/rules/no-msapp-exec-unsafe.js +32 -0
  246. package/dist/rules/no-msapp-exec-unsafe.js.map +1 -0
  247. package/dist/rules/no-node-tls-check-server-identity-bypass.d.ts +5 -0
  248. package/dist/rules/no-node-tls-check-server-identity-bypass.d.ts.map +1 -0
  249. package/dist/rules/no-node-tls-check-server-identity-bypass.js +95 -0
  250. package/dist/rules/no-node-tls-check-server-identity-bypass.js.map +1 -0
  251. package/dist/rules/no-node-tls-legacy-protocol.d.ts +5 -0
  252. package/dist/rules/no-node-tls-legacy-protocol.d.ts.map +1 -0
  253. package/dist/rules/no-node-tls-legacy-protocol.js +106 -0
  254. package/dist/rules/no-node-tls-legacy-protocol.js.map +1 -0
  255. package/dist/rules/no-node-tls-reject-unauthorized-zero.d.ts +5 -0
  256. package/dist/rules/no-node-tls-reject-unauthorized-zero.d.ts.map +1 -0
  257. package/dist/rules/no-node-tls-reject-unauthorized-zero.js +93 -0
  258. package/dist/rules/no-node-tls-reject-unauthorized-zero.js.map +1 -0
  259. package/dist/rules/no-node-tls-security-level-zero.d.ts +5 -0
  260. package/dist/rules/no-node-tls-security-level-zero.d.ts.map +1 -0
  261. package/dist/rules/no-node-tls-security-level-zero.js +80 -0
  262. package/dist/rules/no-node-tls-security-level-zero.js.map +1 -0
  263. package/dist/rules/no-node-vm-run-in-context.d.ts +5 -0
  264. package/dist/rules/no-node-vm-run-in-context.d.ts.map +1 -0
  265. package/dist/rules/no-node-vm-run-in-context.js +186 -0
  266. package/dist/rules/no-node-vm-run-in-context.js.map +1 -0
  267. package/dist/rules/no-node-vm-source-text-module.d.ts +5 -0
  268. package/dist/rules/no-node-vm-source-text-module.d.ts.map +1 -0
  269. package/dist/rules/no-node-vm-source-text-module.js +126 -0
  270. package/dist/rules/no-node-vm-source-text-module.js.map +1 -0
  271. package/dist/rules/no-node-worker-threads-eval.d.ts +5 -0
  272. package/dist/rules/no-node-worker-threads-eval.d.ts.map +1 -0
  273. package/dist/rules/no-node-worker-threads-eval.js +151 -0
  274. package/dist/rules/no-node-worker-threads-eval.js.map +1 -0
  275. package/dist/rules/no-nonnull-assertion-on-security-input.d.ts +5 -0
  276. package/dist/rules/no-nonnull-assertion-on-security-input.d.ts.map +1 -0
  277. package/dist/rules/no-nonnull-assertion-on-security-input.js +48 -0
  278. package/dist/rules/no-nonnull-assertion-on-security-input.js.map +1 -0
  279. package/dist/rules/no-postmessage-star-origin.d.ts +5 -0
  280. package/dist/rules/no-postmessage-star-origin.d.ts.map +1 -0
  281. package/dist/rules/no-postmessage-star-origin.js +58 -0
  282. package/dist/rules/no-postmessage-star-origin.js.map +1 -0
  283. package/dist/rules/no-postmessage-without-origin-allowlist.d.ts +5 -0
  284. package/dist/rules/no-postmessage-without-origin-allowlist.d.ts.map +1 -0
  285. package/dist/rules/no-postmessage-without-origin-allowlist.js +80 -0
  286. package/dist/rules/no-postmessage-without-origin-allowlist.js.map +1 -0
  287. package/dist/rules/no-range-create-contextual-fragment.d.ts +5 -0
  288. package/dist/rules/no-range-create-contextual-fragment.d.ts.map +1 -0
  289. package/dist/rules/no-range-create-contextual-fragment.js +64 -0
  290. package/dist/rules/no-range-create-contextual-fragment.js.map +1 -0
  291. package/dist/rules/no-script-src-data-url.d.ts +5 -0
  292. package/dist/rules/no-script-src-data-url.d.ts.map +1 -0
  293. package/dist/rules/no-script-src-data-url.js +108 -0
  294. package/dist/rules/no-script-src-data-url.js.map +1 -0
  295. package/dist/rules/no-script-text.d.ts +5 -0
  296. package/dist/rules/no-script-text.d.ts.map +1 -0
  297. package/dist/rules/no-script-text.js +52 -0
  298. package/dist/rules/no-script-text.js.map +1 -0
  299. package/dist/rules/no-service-worker-unsafe-script-url.d.ts +5 -0
  300. package/dist/rules/no-service-worker-unsafe-script-url.d.ts.map +1 -0
  301. package/dist/rules/no-service-worker-unsafe-script-url.js +52 -0
  302. package/dist/rules/no-service-worker-unsafe-script-url.js.map +1 -0
  303. package/dist/rules/no-set-html-unsafe.d.ts +5 -0
  304. package/dist/rules/no-set-html-unsafe.d.ts.map +1 -0
  305. package/dist/rules/no-set-html-unsafe.js +48 -0
  306. package/dist/rules/no-set-html-unsafe.js.map +1 -0
  307. package/dist/rules/no-trusted-types-policy-pass-through.d.ts +5 -0
  308. package/dist/rules/no-trusted-types-policy-pass-through.d.ts.map +1 -0
  309. package/dist/rules/no-trusted-types-policy-pass-through.js +115 -0
  310. package/dist/rules/no-trusted-types-policy-pass-through.js.map +1 -0
  311. package/dist/rules/no-unsafe-alloc.d.ts +5 -0
  312. package/dist/rules/no-unsafe-alloc.d.ts.map +1 -0
  313. package/dist/rules/no-unsafe-alloc.js +51 -0
  314. package/dist/rules/no-unsafe-alloc.js.map +1 -0
  315. package/dist/rules/no-unsafe-cast-to-trusted-types.d.ts +5 -0
  316. package/dist/rules/no-unsafe-cast-to-trusted-types.d.ts.map +1 -0
  317. package/dist/rules/no-unsafe-cast-to-trusted-types.js +89 -0
  318. package/dist/rules/no-unsafe-cast-to-trusted-types.js.map +1 -0
  319. package/dist/rules/no-window-open-without-noopener.d.ts +5 -0
  320. package/dist/rules/no-window-open-without-noopener.d.ts.map +1 -0
  321. package/dist/rules/no-window-open-without-noopener.js +84 -0
  322. package/dist/rules/no-window-open-without-noopener.js.map +1 -0
  323. package/dist/rules/no-winjs-html-unsafe.d.ts +5 -0
  324. package/dist/rules/no-winjs-html-unsafe.d.ts.map +1 -0
  325. package/dist/rules/no-winjs-html-unsafe.js +32 -0
  326. package/dist/rules/no-winjs-html-unsafe.js.map +1 -0
  327. package/dist/rules/no-worker-blob-url.d.ts +5 -0
  328. package/dist/rules/no-worker-blob-url.d.ts.map +1 -0
  329. package/dist/rules/no-worker-blob-url.js +64 -0
  330. package/dist/rules/no-worker-blob-url.js.map +1 -0
  331. package/dist/rules/no-worker-data-url.d.ts +5 -0
  332. package/dist/rules/no-worker-data-url.d.ts.map +1 -0
  333. package/dist/rules/no-worker-data-url.js +67 -0
  334. package/dist/rules/no-worker-data-url.js.map +1 -0
  335. package/docs/rules/getting-started.md +70 -0
  336. package/docs/rules/no-angular-bypass-sanitizer.md +69 -0
  337. package/docs/rules/no-angular-bypass-security-trust-html.md +59 -0
  338. package/docs/rules/no-angular-innerhtml-binding.md +59 -0
  339. package/docs/rules/no-angular-sanitization-trusted-urls.md +64 -0
  340. package/docs/rules/no-angularjs-bypass-sce.md +64 -0
  341. package/docs/rules/no-angularjs-enable-svg.md +59 -0
  342. package/docs/rules/no-angularjs-ng-bind-html-without-sanitize.md +59 -0
  343. package/docs/rules/no-angularjs-sanitization-whitelist.md +63 -0
  344. package/docs/rules/no-angularjs-sce-resource-url-wildcard.md +62 -0
  345. package/docs/rules/no-child-process-exec.md +101 -0
  346. package/docs/rules/no-child-process-shell-true.md +59 -0
  347. package/docs/rules/no-cookies.md +61 -0
  348. package/docs/rules/no-document-domain.md +59 -0
  349. package/docs/rules/no-document-execcommand-insert-html.md +69 -0
  350. package/docs/rules/no-document-parse-html-unsafe.md +72 -0
  351. package/docs/rules/no-document-write.md +64 -0
  352. package/docs/rules/no-domparser-html-without-sanitization.md +59 -0
  353. package/docs/rules/no-domparser-svg-without-sanitization.md +71 -0
  354. package/docs/rules/no-dynamic-import-unsafe-url.md +81 -0
  355. package/docs/rules/no-electron-allow-running-insecure-content.md +69 -0
  356. package/docs/rules/no-electron-dangerous-blink-features.md +77 -0
  357. package/docs/rules/no-electron-disable-context-isolation.md +69 -0
  358. package/docs/rules/no-electron-disable-sandbox.md +69 -0
  359. package/docs/rules/no-electron-disable-web-security.md +69 -0
  360. package/docs/rules/no-electron-enable-remote-module.md +69 -0
  361. package/docs/rules/no-electron-enable-webview-tag.md +77 -0
  362. package/docs/rules/no-electron-experimental-features.md +77 -0
  363. package/docs/rules/no-electron-expose-raw-ipc-renderer.md +79 -0
  364. package/docs/rules/no-electron-insecure-certificate-error-handler.md +72 -0
  365. package/docs/rules/no-electron-insecure-certificate-verify-proc.md +63 -0
  366. package/docs/rules/no-electron-insecure-permission-request-handler.md +67 -0
  367. package/docs/rules/no-electron-node-integration.md +70 -0
  368. package/docs/rules/no-electron-permission-check-handler-allow-all.md +66 -0
  369. package/docs/rules/no-electron-unchecked-ipc-sender.md +62 -0
  370. package/docs/rules/no-electron-unrestricted-navigation.md +64 -0
  371. package/docs/rules/no-electron-untrusted-open-external.md +65 -0
  372. package/docs/rules/no-electron-webview-allowpopups.md +59 -0
  373. package/docs/rules/no-electron-webview-insecure-webpreferences.md +84 -0
  374. package/docs/rules/no-electron-webview-node-integration.md +59 -0
  375. package/docs/rules/no-html-method.md +58 -0
  376. package/docs/rules/no-http-request-to-insecure-protocol.md +59 -0
  377. package/docs/rules/no-iframe-srcdoc.md +76 -0
  378. package/docs/rules/no-inner-html.md +65 -0
  379. package/docs/rules/no-insecure-random.md +66 -0
  380. package/docs/rules/no-insecure-tls-agent-options.md +59 -0
  381. package/docs/rules/no-insecure-url.md +72 -0
  382. package/docs/rules/no-location-javascript-url.md +59 -0
  383. package/docs/rules/no-message-event-without-origin-check.md +82 -0
  384. package/docs/rules/no-msapp-exec-unsafe.md +59 -0
  385. package/docs/rules/no-node-tls-check-server-identity-bypass.md +88 -0
  386. package/docs/rules/no-node-tls-legacy-protocol.md +80 -0
  387. package/docs/rules/no-node-tls-reject-unauthorized-zero.md +61 -0
  388. package/docs/rules/no-node-tls-security-level-zero.md +77 -0
  389. package/docs/rules/no-node-vm-run-in-context.md +89 -0
  390. package/docs/rules/no-node-vm-source-text-module.md +79 -0
  391. package/docs/rules/no-node-worker-threads-eval.md +82 -0
  392. package/docs/rules/no-nonnull-assertion-on-security-input.md +59 -0
  393. package/docs/rules/no-postmessage-star-origin.md +59 -0
  394. package/docs/rules/no-postmessage-without-origin-allowlist.md +59 -0
  395. package/docs/rules/no-range-create-contextual-fragment.md +64 -0
  396. package/docs/rules/no-script-src-data-url.md +83 -0
  397. package/docs/rules/no-script-text.md +80 -0
  398. package/docs/rules/no-service-worker-unsafe-script-url.md +85 -0
  399. package/docs/rules/no-set-html-unsafe.md +64 -0
  400. package/docs/rules/no-trusted-types-policy-pass-through.md +68 -0
  401. package/docs/rules/no-unsafe-alloc.md +62 -0
  402. package/docs/rules/no-unsafe-cast-to-trusted-types.md +59 -0
  403. package/docs/rules/no-window-open-without-noopener.md +63 -0
  404. package/docs/rules/no-winjs-html-unsafe.md +60 -0
  405. package/docs/rules/no-worker-blob-url.md +86 -0
  406. package/docs/rules/no-worker-data-url.md +85 -0
  407. package/docs/rules/overview.md +111 -0
  408. package/docs/rules/presets/angular.md +35 -0
  409. package/docs/rules/presets/angularjs.md +36 -0
  410. package/docs/rules/presets/common.md +59 -0
  411. package/docs/rules/presets/electron.md +51 -0
  412. package/docs/rules/presets/index.md +26 -0
  413. package/docs/rules/presets/node.md +43 -0
  414. package/docs/rules/presets/react.md +33 -0
  415. package/docs/rules/presets/recommended.md +104 -0
  416. package/docs/rules/presets/required.md +99 -0
  417. package/docs/rules/presets/typescript.md +34 -0
  418. 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) | 🔧 |