eslint-plugin-secure-coding 2.2.0 → 2.2.2

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 (318) hide show
  1. package/README.md +91 -12
  2. package/package.json +10 -4
  3. package/src/index.d.ts +1 -1
  4. package/src/index.js +223 -48
  5. package/src/index.js.map +1 -1
  6. package/src/rules/{security/database-injection.js → database-injection/index.js} +1 -1
  7. package/src/rules/database-injection/index.js.map +1 -0
  8. package/src/rules/{security/detect-child-process.js → detect-child-process/index.js} +1 -1
  9. package/src/rules/detect-child-process/index.js.map +1 -0
  10. package/src/rules/{security/detect-eval-with-expression.js → detect-eval-with-expression/index.js} +1 -1
  11. package/src/rules/detect-eval-with-expression/index.js.map +1 -0
  12. package/src/rules/detect-mixed-content/index.d.ts +8 -0
  13. package/src/rules/detect-mixed-content/index.js +45 -0
  14. package/src/rules/detect-mixed-content/index.js.map +1 -0
  15. package/src/rules/{security/detect-non-literal-fs-filename.js → detect-non-literal-fs-filename/index.js} +1 -1
  16. package/src/rules/detect-non-literal-fs-filename/index.js.map +1 -0
  17. package/src/rules/{security/detect-non-literal-regexp.js → detect-non-literal-regexp/index.js} +23 -6
  18. package/src/rules/detect-non-literal-regexp/index.js.map +1 -0
  19. package/src/rules/{security/detect-object-injection.js → detect-object-injection/index.js} +3 -1
  20. package/src/rules/detect-object-injection/index.js.map +1 -0
  21. package/src/rules/detect-suspicious-dependencies/index.d.ts +8 -0
  22. package/src/rules/detect-suspicious-dependencies/index.js +72 -0
  23. package/src/rules/detect-suspicious-dependencies/index.js.map +1 -0
  24. package/src/rules/detect-weak-password-validation/index.d.ts +6 -0
  25. package/src/rules/detect-weak-password-validation/index.js +59 -0
  26. package/src/rules/detect-weak-password-validation/index.js.map +1 -0
  27. package/src/rules/no-allow-arbitrary-loads/index.d.ts +8 -0
  28. package/src/rules/no-allow-arbitrary-loads/index.js +48 -0
  29. package/src/rules/no-allow-arbitrary-loads/index.js.map +1 -0
  30. package/src/rules/no-arbitrary-file-access/index.d.ts +6 -0
  31. package/src/rules/no-arbitrary-file-access/index.js +63 -0
  32. package/src/rules/no-arbitrary-file-access/index.js.map +1 -0
  33. package/src/rules/{security/no-buffer-overread.js → no-buffer-overread/index.js} +9 -5
  34. package/src/rules/no-buffer-overread/index.js.map +1 -0
  35. package/src/rules/{security/no-clickjacking.js → no-clickjacking/index.js} +23 -9
  36. package/src/rules/no-clickjacking/index.js.map +1 -0
  37. package/src/rules/no-client-side-auth-logic/index.d.ts +6 -0
  38. package/src/rules/no-client-side-auth-logic/index.js +70 -0
  39. package/src/rules/no-client-side-auth-logic/index.js.map +1 -0
  40. package/src/rules/no-credentials-in-query-params/index.d.ts +8 -0
  41. package/src/rules/no-credentials-in-query-params/index.js +58 -0
  42. package/src/rules/no-credentials-in-query-params/index.js.map +1 -0
  43. package/src/rules/no-credentials-in-storage-api/index.d.ts +6 -0
  44. package/src/rules/no-credentials-in-storage-api/index.js +55 -0
  45. package/src/rules/no-credentials-in-storage-api/index.js.map +1 -0
  46. package/src/rules/no-data-in-temp-storage/index.d.ts +6 -0
  47. package/src/rules/no-data-in-temp-storage/index.js +65 -0
  48. package/src/rules/no-data-in-temp-storage/index.js.map +1 -0
  49. package/src/rules/no-debug-code-in-production/index.d.ts +8 -0
  50. package/src/rules/no-debug-code-in-production/index.js +52 -0
  51. package/src/rules/no-debug-code-in-production/index.js.map +1 -0
  52. package/src/rules/{security/no-directive-injection.js → no-directive-injection/index.js} +17 -9
  53. package/src/rules/no-directive-injection/index.js.map +1 -0
  54. package/src/rules/no-disabled-certificate-validation/index.d.ts +6 -0
  55. package/src/rules/no-disabled-certificate-validation/index.js +62 -0
  56. package/src/rules/no-disabled-certificate-validation/index.js.map +1 -0
  57. package/src/rules/{security/no-document-cookie.js → no-document-cookie/index.js} +1 -1
  58. package/src/rules/no-document-cookie/index.js.map +1 -0
  59. package/src/rules/no-dynamic-dependency-loading/index.d.ts +8 -0
  60. package/src/rules/no-dynamic-dependency-loading/index.js +52 -0
  61. package/src/rules/no-dynamic-dependency-loading/index.js.map +1 -0
  62. package/src/rules/{security/no-electron-security-issues.js → no-electron-security-issues/index.js} +7 -4
  63. package/src/rules/no-electron-security-issues/index.js.map +1 -0
  64. package/src/rules/no-exposed-debug-endpoints/index.d.ts +6 -0
  65. package/src/rules/no-exposed-debug-endpoints/index.js +63 -0
  66. package/src/rules/no-exposed-debug-endpoints/index.js.map +1 -0
  67. package/src/rules/{security/no-exposed-sensitive-data.js → no-exposed-sensitive-data/index.js} +1 -1
  68. package/src/rules/no-exposed-sensitive-data/index.js.map +1 -0
  69. package/src/rules/{security/no-format-string-injection.js → no-format-string-injection/index.js} +17 -9
  70. package/src/rules/no-format-string-injection/index.js.map +1 -0
  71. package/src/rules/{security/no-graphql-injection.js → no-graphql-injection/index.js} +5 -3
  72. package/src/rules/no-graphql-injection/index.js.map +1 -0
  73. package/src/rules/{security/no-hardcoded-credentials.js → no-hardcoded-credentials/index.js} +1 -1
  74. package/src/rules/no-hardcoded-credentials/index.js.map +1 -0
  75. package/src/rules/no-hardcoded-session-tokens/index.d.ts +6 -0
  76. package/src/rules/no-hardcoded-session-tokens/index.js +60 -0
  77. package/src/rules/no-hardcoded-session-tokens/index.js.map +1 -0
  78. package/src/rules/no-http-urls/index.d.ts +12 -0
  79. package/src/rules/no-http-urls/index.js +115 -0
  80. package/src/rules/no-http-urls/index.js.map +1 -0
  81. package/src/rules/{security/no-improper-sanitization.js → no-improper-sanitization/index.js} +9 -5
  82. package/src/rules/no-improper-sanitization/index.js.map +1 -0
  83. package/src/rules/{security/no-improper-type-validation.js → no-improper-type-validation/index.js} +11 -6
  84. package/src/rules/no-improper-type-validation/index.js.map +1 -0
  85. package/src/rules/{security/no-insecure-comparison.js → no-insecure-comparison/index.js} +1 -1
  86. package/src/rules/no-insecure-comparison/index.js.map +1 -0
  87. package/src/rules/{security/no-insecure-cookie-settings.js → no-insecure-cookie-settings/index.js} +1 -1
  88. package/src/rules/no-insecure-cookie-settings/index.js.map +1 -0
  89. package/src/rules/{security/no-insecure-jwt.js → no-insecure-jwt/index.js} +3 -2
  90. package/src/rules/no-insecure-jwt/index.js.map +1 -0
  91. package/src/rules/{security/no-insecure-redirects.js → no-insecure-redirects/index.js} +3 -1
  92. package/src/rules/no-insecure-redirects/index.js.map +1 -0
  93. package/src/rules/no-insecure-websocket/index.d.ts +6 -0
  94. package/src/rules/no-insecure-websocket/index.js +62 -0
  95. package/src/rules/no-insecure-websocket/index.js.map +1 -0
  96. package/src/rules/{security/no-insufficient-postmessage-validation.js → no-insufficient-postmessage-validation/index.js} +7 -4
  97. package/src/rules/no-insufficient-postmessage-validation/index.js.map +1 -0
  98. package/src/rules/{security/no-insufficient-random.js → no-insufficient-random/index.js} +1 -1
  99. package/src/rules/no-insufficient-random/index.js.map +1 -0
  100. package/src/rules/{security/no-ldap-injection.js → no-ldap-injection/index.js} +15 -8
  101. package/src/rules/no-ldap-injection/index.js.map +1 -0
  102. package/src/rules/{security/no-missing-authentication.js → no-missing-authentication/index.js} +13 -1
  103. package/src/rules/no-missing-authentication/index.js.map +1 -0
  104. package/src/rules/{security/no-missing-cors-check.js → no-missing-cors-check/index.js} +1 -52
  105. package/src/rules/no-missing-cors-check/index.js.map +1 -0
  106. package/src/rules/{security/no-missing-csrf-protection.js → no-missing-csrf-protection/index.js} +1 -1
  107. package/src/rules/no-missing-csrf-protection/index.js.map +1 -0
  108. package/src/rules/{security/no-missing-security-headers.js → no-missing-security-headers/index.js} +1 -1
  109. package/src/rules/no-missing-security-headers/index.js.map +1 -0
  110. package/src/rules/no-password-in-url/index.d.ts +8 -0
  111. package/src/rules/no-password-in-url/index.js +56 -0
  112. package/src/rules/no-password-in-url/index.js.map +1 -0
  113. package/src/rules/no-permissive-cors/index.d.ts +8 -0
  114. package/src/rules/no-permissive-cors/index.js +65 -0
  115. package/src/rules/no-permissive-cors/index.js.map +1 -0
  116. package/src/rules/no-pii-in-logs/index.d.ts +8 -0
  117. package/src/rules/no-pii-in-logs/index.js +72 -0
  118. package/src/rules/no-pii-in-logs/index.js.map +1 -0
  119. package/src/rules/no-postmessage-origin-wildcard/index.d.ts +8 -0
  120. package/src/rules/no-postmessage-origin-wildcard/index.js +58 -0
  121. package/src/rules/no-postmessage-origin-wildcard/index.js.map +1 -0
  122. package/src/rules/{security/no-privilege-escalation.js → no-privilege-escalation/index.js} +3 -35
  123. package/src/rules/no-privilege-escalation/index.js.map +1 -0
  124. package/src/rules/{security/no-redos-vulnerable-regex.js → no-redos-vulnerable-regex/index.js} +1 -1
  125. package/src/rules/no-redos-vulnerable-regex/index.js.map +1 -0
  126. package/src/rules/{security/no-sensitive-data-exposure.js → no-sensitive-data-exposure/index.js} +1 -1
  127. package/src/rules/no-sensitive-data-exposure/index.js.map +1 -0
  128. package/src/rules/no-sensitive-data-in-analytics/index.d.ts +8 -0
  129. package/src/rules/no-sensitive-data-in-analytics/index.js +63 -0
  130. package/src/rules/no-sensitive-data-in-analytics/index.js.map +1 -0
  131. package/src/rules/no-sensitive-data-in-cache/index.d.ts +8 -0
  132. package/src/rules/no-sensitive-data-in-cache/index.js +53 -0
  133. package/src/rules/no-sensitive-data-in-cache/index.js.map +1 -0
  134. package/src/rules/{security/no-sql-injection.js → no-sql-injection/index.js} +5 -1
  135. package/src/rules/no-sql-injection/index.js.map +1 -0
  136. package/src/rules/{security/no-timing-attack.js → no-timing-attack/index.js} +1 -1
  137. package/src/rules/no-timing-attack/index.js.map +1 -0
  138. package/src/rules/{security/no-toctou-vulnerability.js → no-toctou-vulnerability/index.js} +1 -1
  139. package/src/rules/no-toctou-vulnerability/index.js.map +1 -0
  140. package/src/rules/no-tracking-without-consent/index.d.ts +6 -0
  141. package/src/rules/no-tracking-without-consent/index.js +68 -0
  142. package/src/rules/no-tracking-without-consent/index.js.map +1 -0
  143. package/src/rules/{security/no-unchecked-loop-condition.js → no-unchecked-loop-condition/index.js} +25 -13
  144. package/src/rules/no-unchecked-loop-condition/index.js.map +1 -0
  145. package/src/rules/no-unencrypted-local-storage/index.d.ts +8 -0
  146. package/src/rules/no-unencrypted-local-storage/index.js +63 -0
  147. package/src/rules/no-unencrypted-local-storage/index.js.map +1 -0
  148. package/src/rules/{security/no-unencrypted-transmission.js → no-unencrypted-transmission/index.js} +1 -1
  149. package/src/rules/no-unencrypted-transmission/index.js.map +1 -0
  150. package/src/rules/{security/no-unescaped-url-parameter.js → no-unescaped-url-parameter/index.js} +1 -1
  151. package/src/rules/no-unescaped-url-parameter/index.js.map +1 -0
  152. package/src/rules/{security/no-unlimited-resource-allocation.js → no-unlimited-resource-allocation/index.js} +29 -62
  153. package/src/rules/no-unlimited-resource-allocation/index.js.map +1 -0
  154. package/src/rules/{security/no-unsafe-deserialization.js → no-unsafe-deserialization/index.js} +3 -2
  155. package/src/rules/no-unsafe-deserialization/index.js.map +1 -0
  156. package/src/rules/{security/no-unsafe-dynamic-require.js → no-unsafe-dynamic-require/index.js} +1 -1
  157. package/src/rules/no-unsafe-dynamic-require/index.js.map +1 -0
  158. package/src/rules/{security/no-unsafe-regex-construction.js → no-unsafe-regex-construction/index.js} +1 -1
  159. package/src/rules/no-unsafe-regex-construction/index.js.map +1 -0
  160. package/src/rules/{security/no-unsanitized-html.js → no-unsanitized-html/index.js} +1 -45
  161. package/src/rules/no-unsanitized-html/index.js.map +1 -0
  162. package/src/rules/no-unvalidated-deeplinks/index.d.ts +6 -0
  163. package/src/rules/no-unvalidated-deeplinks/index.js +63 -0
  164. package/src/rules/no-unvalidated-deeplinks/index.js.map +1 -0
  165. package/src/rules/{security/no-unvalidated-user-input.js → no-unvalidated-user-input/index.js} +1 -1
  166. package/src/rules/no-unvalidated-user-input/index.js.map +1 -0
  167. package/src/rules/no-verbose-error-messages/index.d.ts +8 -0
  168. package/src/rules/no-verbose-error-messages/index.js +68 -0
  169. package/src/rules/no-verbose-error-messages/index.js.map +1 -0
  170. package/src/rules/{security/no-weak-crypto.js → no-weak-crypto/index.js} +1 -1
  171. package/src/rules/no-weak-crypto/index.js.map +1 -0
  172. package/src/rules/{security/no-weak-password-recovery.js → no-weak-password-recovery/index.js} +21 -8
  173. package/src/rules/no-weak-password-recovery/index.js.map +1 -0
  174. package/src/rules/{security/no-xpath-injection.js → no-xpath-injection/index.js} +3 -2
  175. package/src/rules/no-xpath-injection/index.js.map +1 -0
  176. package/src/rules/{security/no-xxe-injection.js → no-xxe-injection/index.js} +2 -5
  177. package/src/rules/no-xxe-injection/index.js.map +1 -0
  178. package/src/rules/{security/no-zip-slip.js → no-zip-slip/index.js} +1 -1
  179. package/src/rules/no-zip-slip/index.js.map +1 -0
  180. package/src/rules/require-backend-authorization/index.d.ts +6 -0
  181. package/src/rules/require-backend-authorization/index.js +61 -0
  182. package/src/rules/require-backend-authorization/index.js.map +1 -0
  183. package/src/rules/require-code-minification/index.d.ts +8 -0
  184. package/src/rules/require-code-minification/index.js +48 -0
  185. package/src/rules/require-code-minification/index.js.map +1 -0
  186. package/src/rules/require-csp-headers/index.d.ts +6 -0
  187. package/src/rules/require-csp-headers/index.js +65 -0
  188. package/src/rules/require-csp-headers/index.js.map +1 -0
  189. package/src/rules/require-data-minimization/index.d.ts +8 -0
  190. package/src/rules/require-data-minimization/index.js +54 -0
  191. package/src/rules/require-data-minimization/index.js.map +1 -0
  192. package/src/rules/require-dependency-integrity/index.d.ts +6 -0
  193. package/src/rules/require-dependency-integrity/index.js +65 -0
  194. package/src/rules/require-dependency-integrity/index.js.map +1 -0
  195. package/src/rules/require-https-only/index.d.ts +8 -0
  196. package/src/rules/require-https-only/index.js +64 -0
  197. package/src/rules/require-https-only/index.js.map +1 -0
  198. package/src/rules/require-mime-type-validation/index.d.ts +6 -0
  199. package/src/rules/require-mime-type-validation/index.js +67 -0
  200. package/src/rules/require-mime-type-validation/index.js.map +1 -0
  201. package/src/rules/require-network-timeout/index.d.ts +8 -0
  202. package/src/rules/require-network-timeout/index.js +51 -0
  203. package/src/rules/require-network-timeout/index.js.map +1 -0
  204. package/src/rules/require-package-lock/index.d.ts +8 -0
  205. package/src/rules/require-package-lock/index.js +64 -0
  206. package/src/rules/require-package-lock/index.js.map +1 -0
  207. package/src/rules/require-secure-credential-storage/index.d.ts +8 -0
  208. package/src/rules/require-secure-credential-storage/index.js +51 -0
  209. package/src/rules/require-secure-credential-storage/index.js.map +1 -0
  210. package/src/rules/require-secure-defaults/index.d.ts +8 -0
  211. package/src/rules/require-secure-defaults/index.js +48 -0
  212. package/src/rules/require-secure-defaults/index.js.map +1 -0
  213. package/src/rules/require-secure-deletion/index.d.ts +8 -0
  214. package/src/rules/require-secure-deletion/index.js +45 -0
  215. package/src/rules/require-secure-deletion/index.js.map +1 -0
  216. package/src/rules/require-storage-encryption/index.d.ts +8 -0
  217. package/src/rules/require-storage-encryption/index.js +51 -0
  218. package/src/rules/require-storage-encryption/index.js.map +1 -0
  219. package/src/rules/require-url-validation/index.d.ts +6 -0
  220. package/src/rules/require-url-validation/index.js +73 -0
  221. package/src/rules/require-url-validation/index.js.map +1 -0
  222. package/src/types/index.d.ts +48 -48
  223. package/src/rules/security/database-injection.js.map +0 -1
  224. package/src/rules/security/detect-child-process.js.map +0 -1
  225. package/src/rules/security/detect-eval-with-expression.js.map +0 -1
  226. package/src/rules/security/detect-non-literal-fs-filename.js.map +0 -1
  227. package/src/rules/security/detect-non-literal-regexp.js.map +0 -1
  228. package/src/rules/security/detect-object-injection.js.map +0 -1
  229. package/src/rules/security/no-buffer-overread.js.map +0 -1
  230. package/src/rules/security/no-clickjacking.js.map +0 -1
  231. package/src/rules/security/no-directive-injection.js.map +0 -1
  232. package/src/rules/security/no-document-cookie.js.map +0 -1
  233. package/src/rules/security/no-electron-security-issues.js.map +0 -1
  234. package/src/rules/security/no-exposed-sensitive-data.js.map +0 -1
  235. package/src/rules/security/no-format-string-injection.js.map +0 -1
  236. package/src/rules/security/no-graphql-injection.js.map +0 -1
  237. package/src/rules/security/no-hardcoded-credentials.js.map +0 -1
  238. package/src/rules/security/no-improper-sanitization.js.map +0 -1
  239. package/src/rules/security/no-improper-type-validation.js.map +0 -1
  240. package/src/rules/security/no-insecure-comparison.js.map +0 -1
  241. package/src/rules/security/no-insecure-cookie-settings.js.map +0 -1
  242. package/src/rules/security/no-insecure-jwt.js.map +0 -1
  243. package/src/rules/security/no-insecure-redirects.js.map +0 -1
  244. package/src/rules/security/no-insufficient-postmessage-validation.js.map +0 -1
  245. package/src/rules/security/no-insufficient-random.js.map +0 -1
  246. package/src/rules/security/no-ldap-injection.js.map +0 -1
  247. package/src/rules/security/no-missing-authentication.js.map +0 -1
  248. package/src/rules/security/no-missing-cors-check.js.map +0 -1
  249. package/src/rules/security/no-missing-csrf-protection.js.map +0 -1
  250. package/src/rules/security/no-missing-security-headers.js.map +0 -1
  251. package/src/rules/security/no-privilege-escalation.js.map +0 -1
  252. package/src/rules/security/no-redos-vulnerable-regex.js.map +0 -1
  253. package/src/rules/security/no-sensitive-data-exposure.js.map +0 -1
  254. package/src/rules/security/no-sql-injection.js.map +0 -1
  255. package/src/rules/security/no-timing-attack.js.map +0 -1
  256. package/src/rules/security/no-toctou-vulnerability.js.map +0 -1
  257. package/src/rules/security/no-unchecked-loop-condition.js.map +0 -1
  258. package/src/rules/security/no-unencrypted-transmission.js.map +0 -1
  259. package/src/rules/security/no-unescaped-url-parameter.js.map +0 -1
  260. package/src/rules/security/no-unlimited-resource-allocation.js.map +0 -1
  261. package/src/rules/security/no-unsafe-deserialization.js.map +0 -1
  262. package/src/rules/security/no-unsafe-dynamic-require.js.map +0 -1
  263. package/src/rules/security/no-unsafe-regex-construction.js.map +0 -1
  264. package/src/rules/security/no-unsanitized-html.js.map +0 -1
  265. package/src/rules/security/no-unvalidated-user-input.js.map +0 -1
  266. package/src/rules/security/no-weak-crypto.js.map +0 -1
  267. package/src/rules/security/no-weak-password-recovery.js.map +0 -1
  268. package/src/rules/security/no-xpath-injection.js.map +0 -1
  269. package/src/rules/security/no-xxe-injection.js.map +0 -1
  270. package/src/rules/security/no-zip-slip.js.map +0 -1
  271. /package/src/rules/{security/database-injection.d.ts → database-injection/index.d.ts} +0 -0
  272. /package/src/rules/{security/detect-child-process.d.ts → detect-child-process/index.d.ts} +0 -0
  273. /package/src/rules/{security/detect-eval-with-expression.d.ts → detect-eval-with-expression/index.d.ts} +0 -0
  274. /package/src/rules/{security/detect-non-literal-fs-filename.d.ts → detect-non-literal-fs-filename/index.d.ts} +0 -0
  275. /package/src/rules/{security/detect-non-literal-regexp.d.ts → detect-non-literal-regexp/index.d.ts} +0 -0
  276. /package/src/rules/{security/detect-object-injection.d.ts → detect-object-injection/index.d.ts} +0 -0
  277. /package/src/rules/{security/no-buffer-overread.d.ts → no-buffer-overread/index.d.ts} +0 -0
  278. /package/src/rules/{security/no-clickjacking.d.ts → no-clickjacking/index.d.ts} +0 -0
  279. /package/src/rules/{security/no-directive-injection.d.ts → no-directive-injection/index.d.ts} +0 -0
  280. /package/src/rules/{security/no-document-cookie.d.ts → no-document-cookie/index.d.ts} +0 -0
  281. /package/src/rules/{security/no-electron-security-issues.d.ts → no-electron-security-issues/index.d.ts} +0 -0
  282. /package/src/rules/{security/no-exposed-sensitive-data.d.ts → no-exposed-sensitive-data/index.d.ts} +0 -0
  283. /package/src/rules/{security/no-format-string-injection.d.ts → no-format-string-injection/index.d.ts} +0 -0
  284. /package/src/rules/{security/no-graphql-injection.d.ts → no-graphql-injection/index.d.ts} +0 -0
  285. /package/src/rules/{security/no-hardcoded-credentials.d.ts → no-hardcoded-credentials/index.d.ts} +0 -0
  286. /package/src/rules/{security/no-improper-sanitization.d.ts → no-improper-sanitization/index.d.ts} +0 -0
  287. /package/src/rules/{security/no-improper-type-validation.d.ts → no-improper-type-validation/index.d.ts} +0 -0
  288. /package/src/rules/{security/no-insecure-comparison.d.ts → no-insecure-comparison/index.d.ts} +0 -0
  289. /package/src/rules/{security/no-insecure-cookie-settings.d.ts → no-insecure-cookie-settings/index.d.ts} +0 -0
  290. /package/src/rules/{security/no-insecure-jwt.d.ts → no-insecure-jwt/index.d.ts} +0 -0
  291. /package/src/rules/{security/no-insecure-redirects.d.ts → no-insecure-redirects/index.d.ts} +0 -0
  292. /package/src/rules/{security/no-insufficient-postmessage-validation.d.ts → no-insufficient-postmessage-validation/index.d.ts} +0 -0
  293. /package/src/rules/{security/no-insufficient-random.d.ts → no-insufficient-random/index.d.ts} +0 -0
  294. /package/src/rules/{security/no-ldap-injection.d.ts → no-ldap-injection/index.d.ts} +0 -0
  295. /package/src/rules/{security/no-missing-authentication.d.ts → no-missing-authentication/index.d.ts} +0 -0
  296. /package/src/rules/{security/no-missing-cors-check.d.ts → no-missing-cors-check/index.d.ts} +0 -0
  297. /package/src/rules/{security/no-missing-csrf-protection.d.ts → no-missing-csrf-protection/index.d.ts} +0 -0
  298. /package/src/rules/{security/no-missing-security-headers.d.ts → no-missing-security-headers/index.d.ts} +0 -0
  299. /package/src/rules/{security/no-privilege-escalation.d.ts → no-privilege-escalation/index.d.ts} +0 -0
  300. /package/src/rules/{security/no-redos-vulnerable-regex.d.ts → no-redos-vulnerable-regex/index.d.ts} +0 -0
  301. /package/src/rules/{security/no-sensitive-data-exposure.d.ts → no-sensitive-data-exposure/index.d.ts} +0 -0
  302. /package/src/rules/{security/no-sql-injection.d.ts → no-sql-injection/index.d.ts} +0 -0
  303. /package/src/rules/{security/no-timing-attack.d.ts → no-timing-attack/index.d.ts} +0 -0
  304. /package/src/rules/{security/no-toctou-vulnerability.d.ts → no-toctou-vulnerability/index.d.ts} +0 -0
  305. /package/src/rules/{security/no-unchecked-loop-condition.d.ts → no-unchecked-loop-condition/index.d.ts} +0 -0
  306. /package/src/rules/{security/no-unencrypted-transmission.d.ts → no-unencrypted-transmission/index.d.ts} +0 -0
  307. /package/src/rules/{security/no-unescaped-url-parameter.d.ts → no-unescaped-url-parameter/index.d.ts} +0 -0
  308. /package/src/rules/{security/no-unlimited-resource-allocation.d.ts → no-unlimited-resource-allocation/index.d.ts} +0 -0
  309. /package/src/rules/{security/no-unsafe-deserialization.d.ts → no-unsafe-deserialization/index.d.ts} +0 -0
  310. /package/src/rules/{security/no-unsafe-dynamic-require.d.ts → no-unsafe-dynamic-require/index.d.ts} +0 -0
  311. /package/src/rules/{security/no-unsafe-regex-construction.d.ts → no-unsafe-regex-construction/index.d.ts} +0 -0
  312. /package/src/rules/{security/no-unsanitized-html.d.ts → no-unsanitized-html/index.d.ts} +0 -0
  313. /package/src/rules/{security/no-unvalidated-user-input.d.ts → no-unvalidated-user-input/index.d.ts} +0 -0
  314. /package/src/rules/{security/no-weak-crypto.d.ts → no-weak-crypto/index.d.ts} +0 -0
  315. /package/src/rules/{security/no-weak-password-recovery.d.ts → no-weak-password-recovery/index.d.ts} +0 -0
  316. /package/src/rules/{security/no-xpath-injection.d.ts → no-xpath-injection/index.d.ts} +0 -0
  317. /package/src/rules/{security/no-xxe-injection.d.ts → no-xxe-injection/index.d.ts} +0 -0
  318. /package/src/rules/{security/no-zip-slip.d.ts → no-zip-slip/index.d.ts} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/eslint-plugin-secure-coding/src/rules/require-data-minimization/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,4DAAsF;AAUzE,QAAA,uBAAuB,GAAG,IAAA,0BAAU,EAA0B;IACzE,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE;QACJ,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE;YACJ,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,CAAC,IAAI,CAAC;YACnB,MAAM,EAAE,CAAC,SAAS,CAAC;SACpB;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,IAAA,gCAAgB,EAAC;gBAClC,IAAI,EAAE,4BAAY,CAAC,QAAQ;gBAC3B,SAAS,EAAE,oBAAoB;gBAC/B,GAAG,EAAE,SAAS;gBACd,WAAW,EAAE,0EAA0E;gBACvF,QAAQ,EAAE,QAAQ;gBAClB,GAAG,EAAE,mCAAmC;gBACxC,iBAAiB,EAAE,iDAAiD;aACrE,CAAC;SACH;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,SAAS,MAAM,CAAC,IAAmB;YACjC,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;QAC3D,CAAC;QAED,OAAO;YACL,gBAAgB,CAAC,IAA+B;gBAC9C,mDAAmD;gBACnD,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,GAAG,EAAE,EAAE,CAAC;oBAChC,gDAAgD;oBAChD,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAC3C,CAAC,CAAC,IAAI,KAAK,UAAU;wBACrB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAC3D,CAAC;oBAEF,IAAI,WAAW,EAAE,CAAC;wBAChB,MAAM,CAAC,IAAI,CAAC,CAAC;oBACf,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @fileoverview Require integrity hashes for external resources
3
+ */
4
+ export interface Options {
5
+ }
6
+ export declare const requireDependencyIntegrity: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Require integrity hashes for external resources
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.requireDependencyIntegrity = void 0;
7
+ const eslint_devkit_1 = require("@interlace/eslint-devkit");
8
+ exports.requireDependencyIntegrity = (0, eslint_devkit_1.createRule)({
9
+ name: 'require-dependency-integrity',
10
+ meta: {
11
+ type: 'problem',
12
+ docs: {
13
+ description: 'Require SRI (Subresource Integrity) for CDN resources',
14
+ },
15
+ messages: {
16
+ violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
17
+ icon: eslint_devkit_1.MessageIcons.SECURITY,
18
+ issueName: 'Missing SRI',
19
+ cwe: 'CWE-494',
20
+ description: 'External resource loaded without integrity hash - supply chain risk',
21
+ severity: 'HIGH',
22
+ fix: 'Add integrity="sha384-..." and crossorigin="anonymous" attributes',
23
+ documentationLink: 'https://cwe.mitre.org/data/definitions/494.html',
24
+ })
25
+ },
26
+ schema: [],
27
+ },
28
+ defaultOptions: [],
29
+ create(context) {
30
+ function report(node) {
31
+ context.report({ node, messageId: 'violationDetected' });
32
+ }
33
+ return {
34
+ Literal(node) {
35
+ if (typeof node.value !== 'string')
36
+ return;
37
+ // Check for script/link tags without integrity
38
+ const value = node.value.toLowerCase();
39
+ if ((value.includes('<script') && value.includes('src=')) ||
40
+ (value.includes('<link') && value.includes('href='))) {
41
+ // Check if CDN source
42
+ if (value.includes('cdn.') || value.includes('cdnjs.') ||
43
+ value.includes('unpkg.') || value.includes('jsdelivr.')) {
44
+ if (!value.includes('integrity=')) {
45
+ report(node);
46
+ }
47
+ }
48
+ }
49
+ },
50
+ TemplateLiteral(node) {
51
+ const text = context.sourceCode.getText(node).toLowerCase();
52
+ if ((text.includes('<script') && text.includes('src=')) ||
53
+ (text.includes('<link') && text.includes('href='))) {
54
+ if (text.includes('cdn.') || text.includes('cdnjs.') ||
55
+ text.includes('unpkg.') || text.includes('jsdelivr.')) {
56
+ if (!text.includes('integrity=')) {
57
+ report(node);
58
+ }
59
+ }
60
+ }
61
+ },
62
+ };
63
+ },
64
+ });
65
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/eslint-plugin-secure-coding/src/rules/require-dependency-integrity/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4DAAsF;AAUz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AAC,WAAW,CAAC,EAAE,CAAC;wBAE5D,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;4BAClC,MAAM,CAAC,IAAI,CAAC,CAAC;wBACf,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;YAED,eAAe,CAAC,IAA8B;gBAC5C,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,WAAW,EAAE,CAAC;gBAE5D,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;oBACnD,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;oBAEvD,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;wBAChD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC;wBAE1D,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,EAAE,CAAC;4BACjC,MAAM,CAAC,IAAI,CAAC,CAAC;wBACf,CAAC;oBACH,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @fileoverview Enforce HTTPS for all external requests
3
+ * @see https://owasp.org/www-project-mobile-top-10/
4
+ * @see https://cwe.mitre.org/data/definitions/319.html
5
+ */
6
+ export interface Options {
7
+ }
8
+ export declare const requireHttpsOnly: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Enforce HTTPS for all external requests
4
+ * @see https://owasp.org/www-project-mobile-top-10/
5
+ * @see https://cwe.mitre.org/data/definitions/319.html
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.requireHttpsOnly = void 0;
9
+ const eslint_devkit_1 = require("@interlace/eslint-devkit");
10
+ exports.requireHttpsOnly = (0, eslint_devkit_1.createRule)({
11
+ name: 'require-https-only',
12
+ meta: {
13
+ type: 'problem',
14
+ docs: {
15
+ description: 'Enforce HTTPS for all external requests',
16
+ category: 'Security',
17
+ recommended: true,
18
+ owaspMobile: ['M5'],
19
+ cweIds: ["CWE-319"],
20
+ },
21
+ messages: {
22
+ violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
23
+ icon: eslint_devkit_1.MessageIcons.SECURITY,
24
+ issueName: 'violation Detected',
25
+ cwe: 'CWE-319',
26
+ description: 'Enforce HTTPS for all external requests detected - this is a security risk',
27
+ severity: 'HIGH',
28
+ fix: 'Review and apply secure practices',
29
+ documentationLink: 'https://cwe.mitre.org/data/definitions/319.html',
30
+ })
31
+ },
32
+ schema: [],
33
+ },
34
+ defaultOptions: [],
35
+ create(context) {
36
+ const sourceCode = context.sourceCode;
37
+ function report(node) {
38
+ context.report({
39
+ node,
40
+ messageId: 'violationDetected',
41
+ });
42
+ }
43
+ return {
44
+ CallExpression(node) {
45
+ // Check fetch/axios calls with http:// URLs
46
+ if (node.type === 'CallExpression') {
47
+ const callee = node.callee;
48
+ const isHttpCall = (callee.name === 'fetch' ||
49
+ (callee.object?.name === 'axios' &&
50
+ ['get', 'post', 'put', 'delete', 'patch'].includes(callee.property?.name)));
51
+ if (isHttpCall && node.arguments[0]) {
52
+ const url = node.arguments[0];
53
+ if (url.type === 'Literal' &&
54
+ typeof url.value === 'string' &&
55
+ url.value.startsWith('http://')) {
56
+ report(node);
57
+ }
58
+ }
59
+ }
60
+ },
61
+ };
62
+ },
63
+ });
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../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AAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC;oBAEhF,IAAI,UAAU,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC;wBACpC,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;wBAC9B,IAAI,GAAG,CAAC,IAAI,KAAK,SAAS;4BACtB,OAAO,GAAG,CAAC,KAAK,KAAK,QAAQ;4BAC7B,GAAG,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,EAAE,CAAC;4BACpC,MAAM,CAAC,IAAI,CAAC,CAAC;wBACf,CAAC;oBACH,CAAC;gBACH,CAAC;YAED,CAAC;SAEA,CAAC;IACN,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @fileoverview Require MIME type validation for uploads
3
+ */
4
+ export interface Options {
5
+ }
6
+ export declare const requireMimeTypeValidation: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Require MIME type validation for uploads
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.requireMimeTypeValidation = void 0;
7
+ const eslint_devkit_1 = require("@interlace/eslint-devkit");
8
+ exports.requireMimeTypeValidation = (0, eslint_devkit_1.createRule)({
9
+ name: 'require-mime-type-validation',
10
+ meta: {
11
+ type: 'problem',
12
+ docs: {
13
+ description: 'Require MIME type validation for file uploads',
14
+ },
15
+ messages: {
16
+ violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
17
+ icon: eslint_devkit_1.MessageIcons.SECURITY,
18
+ issueName: 'Missing MIME Validation',
19
+ cwe: 'CWE-434',
20
+ description: 'File upload without MIME type validation - unrestricted upload vulnerability',
21
+ severity: 'HIGH',
22
+ fix: 'Add fileFilter option to validate MIME types',
23
+ documentationLink: 'https://cwe.mitre.org/data/definitions/434.html',
24
+ })
25
+ },
26
+ schema: [],
27
+ },
28
+ defaultOptions: [],
29
+ create(context) {
30
+ function report(node) {
31
+ context.report({ node, messageId: 'violationDetected' });
32
+ }
33
+ return {
34
+ CallExpression(node) {
35
+ // Detect multer().single() or multer().array() without fileFilter
36
+ if (node.callee.type === 'MemberExpression' &&
37
+ node.callee.property.type === 'Identifier' &&
38
+ ['single', 'array', 'fields'].includes(node.callee.property.name)) {
39
+ // Check if parent has fileFilter configuration
40
+ const calleeObj = node.callee.object;
41
+ if (calleeObj.type === 'CallExpression') {
42
+ const multerArgs = calleeObj.arguments[0];
43
+ if (multerArgs && multerArgs.type === 'ObjectExpression') {
44
+ const hasFileFilter = multerArgs.properties.some((p) => p.key?.name === 'fileFilter' || p.key?.name === 'limits');
45
+ if (!hasFileFilter) {
46
+ report(node);
47
+ }
48
+ }
49
+ else if (!multerArgs) {
50
+ // No config at all = no validation
51
+ report(node);
52
+ }
53
+ }
54
+ }
55
+ // Detect upload() calls directly
56
+ if (node.callee.type === 'Identifier' && node.callee.name === 'upload') {
57
+ // Check if there's validation in arguments
58
+ if (node.arguments.length === 0 ||
59
+ (node.arguments[0]?.type === 'Identifier')) {
60
+ report(node);
61
+ }
62
+ }
63
+ },
64
+ };
65
+ },
66
+ });
67
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/eslint-plugin-secure-coding/src/rules/require-mime-type-validation/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,4DAAsF;AAUzE,QAAA,yBAAyB,GAAG,IAAA,0BAAU,EAA0B;IAC3E,IAAI,EAAE,8BAA8B;IACpC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,+CAA+C;SAC7D;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,IAAA,gCAAgB,EAAC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AAE,CAAC;gCACnB,MAAM,CAAC,IAAI,CAAC,CAAC;4BACf,CAAC;wBACH,CAAC;6BAAM,IAAI,CAAC,UAAU,EAAE,CAAC;4BACvB,mCAAmC;4BACnC,MAAM,CAAC,IAAI,CAAC,CAAC;wBACf,CAAC;oBACH,CAAC;gBACH,CAAC;gBAED,iCAAiC;gBACjC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;oBACvE,2CAA2C;oBAC3C,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,KAAK,CAAC;wBAC3B,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,YAAY,CAAC,EAAE,CAAC;wBAC/C,MAAM,CAAC,IAAI,CAAC,CAAC;oBACf,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @fileoverview Require timeout limits for network requests
3
+ * @see https://owasp.org/www-project-mobile-top-10/
4
+ * @see https://cwe.mitre.org/data/definitions/770.html
5
+ */
6
+ export interface Options {
7
+ }
8
+ export declare const requireNetworkTimeout: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Require timeout limits for network requests
4
+ * @see https://owasp.org/www-project-mobile-top-10/
5
+ * @see https://cwe.mitre.org/data/definitions/770.html
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.requireNetworkTimeout = void 0;
9
+ const eslint_devkit_1 = require("@interlace/eslint-devkit");
10
+ exports.requireNetworkTimeout = (0, eslint_devkit_1.createRule)({
11
+ name: 'require-network-timeout',
12
+ meta: {
13
+ type: 'problem',
14
+ docs: {
15
+ description: 'Require timeout limits for network requests',
16
+ category: 'Security',
17
+ recommended: true,
18
+ owaspMobile: ['M5'],
19
+ cweIds: ["CWE-770"],
20
+ },
21
+ messages: {
22
+ violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
23
+ icon: eslint_devkit_1.MessageIcons.SECURITY,
24
+ issueName: 'violation Detected',
25
+ cwe: 'CWE-400',
26
+ description: 'Require timeout limits for network requests detected - fetch/axios without timeout option',
27
+ severity: 'MEDIUM',
28
+ fix: 'Review and apply secure practices',
29
+ documentationLink: 'https://cwe.mitre.org/data/definitions/400.html',
30
+ })
31
+ },
32
+ schema: [],
33
+ },
34
+ defaultOptions: [],
35
+ create(context) {
36
+ return {
37
+ CallExpression(node) {
38
+ if (node.callee.name === 'fetch' ||
39
+ (node.callee.type === 'MemberExpression' &&
40
+ node.callee.object.name === 'axios')) {
41
+ const hasTimeout = node.arguments[1]?.type === 'ObjectExpression' &&
42
+ node.arguments[1].properties.some(p => p.key?.name === 'timeout');
43
+ if (!hasTimeout) {
44
+ context.report({ node, messageId: 'violationDetected' });
45
+ }
46
+ }
47
+ },
48
+ };
49
+ },
50
+ });
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/eslint-plugin-secure-coding/src/rules/require-network-timeout/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,4DAAsF;AAUzE,QAAA,qBAAqB,GAAG,IAAA,0BAAU,EAA0B;IACvE,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,6CAA6C;YAC1D,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,CAAC,IAAI,CAAC;YACnB,MAAM,EAAE,CAAC,SAAS,CAAC;SACpB;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,IAAA,gCAAgB,EAAC;gBAClC,IAAI,EAAE,4BAAY,CAAC,QAAQ;gBAC3B,SAAS,EAAE,oBAAoB;gBAC/B,GAAG,EAAE,SAAS;gBACd,WAAW,EAAE,2FAA2F;gBACxG,QAAQ,EAAE,QAAQ;gBAClB,GAAG,EAAE,mCAAmC;gBACxC,iBAAiB,EAAE,iDAAiD;aACrE,CAAC;SACH;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YAEL,cAAc,CAAC,IAA6B;gBAC1C,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO;oBAC5B,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,kBAAkB;wBACvC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,OAAO,CAAC,EAAE,CAAC;oBAC1C,MAAM,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,KAAK,kBAAkB;wBAC/D,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC;oBACpE,IAAI,CAAC,UAAU,EAAE,CAAC;wBAChB,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;oBAC3D,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @fileoverview Ensure package lock file exists
3
+ * @see https://owasp.org/www-project-mobile-top-10/
4
+ * @see https://cwe.mitre.org/data/definitions/829.html
5
+ */
6
+ export interface Options {
7
+ }
8
+ export declare const requirePackageLock: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
@@ -0,0 +1,64 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Ensure package lock file exists
4
+ * @see https://owasp.org/www-project-mobile-top-10/
5
+ * @see https://cwe.mitre.org/data/definitions/829.html
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.requirePackageLock = void 0;
9
+ const eslint_devkit_1 = require("@interlace/eslint-devkit");
10
+ exports.requirePackageLock = (0, eslint_devkit_1.createRule)({
11
+ name: 'require-package-lock',
12
+ meta: {
13
+ type: 'suggestion',
14
+ docs: {
15
+ description: 'Ensure package-lock.json or yarn.lock exists',
16
+ category: 'Security',
17
+ recommended: true,
18
+ owaspMobile: ['M2'],
19
+ cweIds: ['CWE-829'],
20
+ },
21
+ messages: {
22
+ violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
23
+ icon: eslint_devkit_1.MessageIcons.SECURITY,
24
+ issueName: 'violation Detected',
25
+ cwe: 'CWE-829',
26
+ description: 'Package lock file missing - commit package-lock',
27
+ severity: 'HIGH',
28
+ fix: 'Review and apply secure practices',
29
+ documentationLink: 'https://cwe.mitre.org/data/definitions/829.html',
30
+ })
31
+ },
32
+ schema: [],
33
+ },
34
+ defaultOptions: [],
35
+ create(context) {
36
+ const fs = require('node:fs');
37
+ const path = require('node:path');
38
+ // Check once per file
39
+ let checked = false;
40
+ return {
41
+ Program(node) {
42
+ if (checked)
43
+ return;
44
+ checked = true;
45
+ // Find project root (simplified)
46
+ let dir = path.dirname(context.filename);
47
+ let found = false;
48
+ for (let i = 0; i < 10; i++) {
49
+ if (fs.existsSync(path.join(dir, 'package-lock.json')) ||
50
+ fs.existsSync(path.join(dir, 'yarn.lock')) ||
51
+ fs.existsSync(path.join(dir, 'pnpm-lock.yaml'))) {
52
+ found = true;
53
+ break;
54
+ }
55
+ dir = path.dirname(dir);
56
+ }
57
+ if (!found) {
58
+ context.report({ node, messageId: 'violationDetected' });
59
+ }
60
+ },
61
+ };
62
+ },
63
+ });
64
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/eslint-plugin-secure-coding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AU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,mBAAmB,CAAC,CAAC;wBAClD,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,WAAW,CAAC,CAAC;wBAC1C,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC,EAAE,CAAC;wBACpD,KAAK,GAAG,IAAI,CAAC;wBACb,MAAM;oBACR,CAAC;oBACD,GAAG,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;gBAC1B,CAAC;gBAED,IAAI,CAAC,KAAK,EAAE,CAAC;oBACX,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @fileoverview Enforce secure storage patterns for credentials
3
+ * @see https://owasp.org/www-project-mobile-top-10/
4
+ * @see https://cwe.mitre.org/data/definitions/522.html
5
+ */
6
+ export interface Options {
7
+ }
8
+ export declare const requireSecureCredentialStorage: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Enforce secure storage patterns for credentials
4
+ * @see https://owasp.org/www-project-mobile-top-10/
5
+ * @see https://cwe.mitre.org/data/definitions/522.html
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.requireSecureCredentialStorage = void 0;
9
+ const eslint_devkit_1 = require("@interlace/eslint-devkit");
10
+ exports.requireSecureCredentialStorage = (0, eslint_devkit_1.createRule)({
11
+ name: 'require-secure-credential-storage',
12
+ meta: {
13
+ type: 'problem',
14
+ docs: {
15
+ description: 'Enforce secure storage patterns for credentials',
16
+ category: 'Security',
17
+ recommended: true,
18
+ owaspMobile: ['M1'],
19
+ cweIds: ["CWE-522"],
20
+ },
21
+ messages: {
22
+ violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
23
+ icon: eslint_devkit_1.MessageIcons.SECURITY,
24
+ issueName: 'violation Detected',
25
+ cwe: 'CWE-312',
26
+ description: 'Enforce secure storage patterns for credentials detected - Credentials without encryption',
27
+ severity: 'HIGH',
28
+ fix: 'Review and apply secure practices',
29
+ documentationLink: 'https://cwe.mitre.org/data/definitions/312.html',
30
+ })
31
+ },
32
+ schema: [],
33
+ },
34
+ defaultOptions: [],
35
+ create(context) {
36
+ return {
37
+ CallExpression(node) {
38
+ if (node.callee.type === 'MemberExpression' &&
39
+ ['setItem', 'writeFile'].includes(node.callee.property.name)) {
40
+ // Check for encryption wrapper
41
+ const hasEncryption = node.arguments.some(arg => arg.type === 'CallExpression' &&
42
+ arg.callee.name?.includes('encrypt'));
43
+ if (!hasEncryption) {
44
+ context.report({ node, messageId: 'violationDetected' });
45
+ }
46
+ }
47
+ },
48
+ };
49
+ },
50
+ });
51
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/eslint-plugin-secure-coding/src/rules/require-secure-credential-storage/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,4DAAsF;AAUzE,QAAA,8BAA8B,GAAG,IAAA,0BAAU,EAA0B;IAChF,IAAI,EAAE,mCAAmC;IACzC,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,iDAAiD;YAC9D,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,CAAC,IAAI,CAAC;YACnB,MAAM,EAAE,CAAC,SAAS,CAAC;SACpB;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,IAAA,gCAAgB,EAAC;gBAClC,IAAI,EAAE,4BAAY,CAAC,QAAQ;gBAC3B,SAAS,EAAE,oBAAoB;gBAC/B,GAAG,EAAE,SAAS;gBACd,WAAW,EAAE,2FAA2F;gBACxG,QAAQ,EAAE,MAAM;gBAChB,GAAG,EAAE,mCAAmC;gBACxC,iBAAiB,EAAE,iDAAiD;aACrE,CAAC;SACH;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YAEL,cAAc,CAAC,IAA6B;gBAC1C,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,kBAAkB;oBACvC,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;oBACjE,+BAA+B;oBAC/B,MAAM,aAAa,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAC9C,GAAG,CAAC,IAAI,KAAK,gBAAgB;wBAC7B,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,CACrC,CAAC;oBACF,IAAI,CAAC,aAAa,EAAE,CAAC;wBACnB,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;oBAC3D,CAAC;gBACH,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @fileoverview Ensure secure default configurations
3
+ * @see https://owasp.org/www-project-mobile-top-10/
4
+ * @see https://cwe.mitre.org/data/definitions/453.html
5
+ */
6
+ export interface Options {
7
+ }
8
+ export declare const requireSecureDefaults: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Ensure secure default configurations
4
+ * @see https://owasp.org/www-project-mobile-top-10/
5
+ * @see https://cwe.mitre.org/data/definitions/453.html
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.requireSecureDefaults = void 0;
9
+ const eslint_devkit_1 = require("@interlace/eslint-devkit");
10
+ exports.requireSecureDefaults = (0, eslint_devkit_1.createRule)({
11
+ name: 'require-secure-defaults',
12
+ meta: {
13
+ type: 'problem',
14
+ docs: {
15
+ description: 'Ensure secure default configurations',
16
+ category: 'Security',
17
+ recommended: true,
18
+ owaspMobile: ['M8'],
19
+ cweIds: ["CWE-453"],
20
+ },
21
+ messages: {
22
+ violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
23
+ icon: eslint_devkit_1.MessageIcons.SECURITY,
24
+ issueName: 'violation Detected',
25
+ cwe: 'CWE-1188',
26
+ description: 'Ensure secure default configurations detected - Insecure default values',
27
+ severity: 'MEDIUM',
28
+ fix: 'Review and apply secure practices',
29
+ documentationLink: 'https://cwe.mitre.org/data/definitions/1188.html',
30
+ })
31
+ },
32
+ schema: [],
33
+ },
34
+ defaultOptions: [],
35
+ create(context) {
36
+ return {
37
+ Property(node) {
38
+ if (node.key.type === 'Identifier' &&
39
+ ['secure', 'strictSSL', 'verify'].includes(node.key.name) &&
40
+ node.value.type === 'Literal' &&
41
+ node.value.value === false) {
42
+ context.report({ node, messageId: 'violationDetected' });
43
+ }
44
+ },
45
+ };
46
+ },
47
+ });
48
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/eslint-plugin-secure-coding/src/rules/require-secure-defaults/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,4DAAsF;AAUzE,QAAA,qBAAqB,GAAG,IAAA,0BAAU,EAA0B;IACvE,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,sCAAsC;YACnD,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,CAAC,IAAI,CAAC;YACnB,MAAM,EAAE,CAAC,SAAS,CAAC;SACpB;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,IAAA,gCAAgB,EAAC;gBAClC,IAAI,EAAE,4BAAY,CAAC,QAAQ;gBAC3B,SAAS,EAAE,oBAAoB;gBAC/B,GAAG,EAAE,UAAU;gBACf,WAAW,EAAE,yEAAyE;gBACtF,QAAQ,EAAE,QAAQ;gBAClB,GAAG,EAAE,mCAAmC;gBACxC,iBAAiB,EAAE,kDAAkD;aACtE,CAAC;SACH;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YACL,QAAQ,CAAC,IAAuB;gBAC9B,IAAI,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY;oBAC9B,CAAC,QAAQ,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;oBACzD,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,SAAS;oBAC7B,IAAI,CAAC,KAAK,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;oBAC/B,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @fileoverview Require secure data deletion patterns
3
+ * @see https://owasp.org/www-project-mobile-top-10/
4
+ * @see https://cwe.mitre.org/data/definitions/459.html
5
+ */
6
+ export interface Options {
7
+ }
8
+ export declare const requireSecureDeletion: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Require secure data deletion patterns
4
+ * @see https://owasp.org/www-project-mobile-top-10/
5
+ * @see https://cwe.mitre.org/data/definitions/459.html
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.requireSecureDeletion = void 0;
9
+ const eslint_devkit_1 = require("@interlace/eslint-devkit");
10
+ exports.requireSecureDeletion = (0, eslint_devkit_1.createRule)({
11
+ name: 'require-secure-deletion',
12
+ meta: {
13
+ type: 'problem',
14
+ docs: {
15
+ description: 'Require secure data deletion patterns',
16
+ category: 'Security',
17
+ recommended: true,
18
+ owaspMobile: ['M9'],
19
+ cweIds: ["CWE-459"],
20
+ },
21
+ messages: {
22
+ violationDetected: (0, eslint_devkit_1.formatLLMMessage)({
23
+ icon: eslint_devkit_1.MessageIcons.SECURITY,
24
+ issueName: 'violation Detected',
25
+ cwe: 'CWE-459',
26
+ description: 'Require secure data deletion patterns detected - delete without secure wipe',
27
+ severity: 'MEDIUM',
28
+ fix: 'Review and apply secure practices',
29
+ documentationLink: 'https://cwe.mitre.org/data/definitions/459.html',
30
+ })
31
+ },
32
+ schema: [],
33
+ },
34
+ defaultOptions: [],
35
+ create(context) {
36
+ return {
37
+ UnaryExpression(node) {
38
+ if (node.operator === 'delete') {
39
+ context.report({ node, messageId: 'violationDetected' });
40
+ }
41
+ },
42
+ };
43
+ },
44
+ });
45
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/eslint-plugin-secure-coding/src/rules/require-secure-deletion/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;;AAEH,4DAAsF;AAUzE,QAAA,qBAAqB,GAAG,IAAA,0BAAU,EAA0B;IACvE,IAAI,EAAE,yBAAyB;IAC/B,IAAI,EAAE;QACJ,IAAI,EAAE,SAAS;QACf,IAAI,EAAE;YACJ,WAAW,EAAE,uCAAuC;YACpD,QAAQ,EAAE,UAAU;YACpB,WAAW,EAAE,IAAI;YACjB,WAAW,EAAE,CAAC,IAAI,CAAC;YACnB,MAAM,EAAE,CAAC,SAAS,CAAC;SACpB;QACD,QAAQ,EAAE;YACR,iBAAiB,EAAE,IAAA,gCAAgB,EAAC;gBAClC,IAAI,EAAE,4BAAY,CAAC,QAAQ;gBAC3B,SAAS,EAAE,oBAAoB;gBAC/B,GAAG,EAAE,SAAS;gBACd,WAAW,EAAE,6EAA6E;gBAC1F,QAAQ,EAAE,QAAQ;gBAClB,GAAG,EAAE,mCAAmC;gBACxC,iBAAiB,EAAE,iDAAiD;aACrE,CAAC;SACH;QACD,MAAM,EAAE,EAAE;KACX;IACD,cAAc,EAAE,EAAE;IAClB,MAAM,CAAC,OAAO;QACZ,OAAO;YAEL,eAAe,CAAC,IAA8B;gBAC5C,IAAI,IAAI,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;oBAC/B,OAAO,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;gBAC3D,CAAC;YACH,CAAC;SACF,CAAC;IACJ,CAAC;CACF,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * @fileoverview Require encryption for persistent storage
3
+ * @see https://owasp.org/www-project-mobile-top-10/
4
+ * @see https://cwe.mitre.org/data/definitions/311.html
5
+ */
6
+ export interface Options {
7
+ }
8
+ export declare const requireStorageEncryption: ESLintUtils.RuleModule<MessageIds, Options, unknown, ESLintUtils.RuleListener>;