uneven-ai 1.1.9 → 1.2.1

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 (544) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/README.md +13 -14
  3. package/dist/application/analysis/active/helpers.d.ts +12 -0
  4. package/dist/application/analysis/active/helpers.d.ts.map +1 -1
  5. package/dist/application/analysis/active/helpers.js +78 -45
  6. package/dist/application/analysis/active/http.d.ts +11 -2
  7. package/dist/application/analysis/active/http.d.ts.map +1 -1
  8. package/dist/application/analysis/active/http.js +55 -41
  9. package/dist/application/analysis/active/index.d.ts +2 -2
  10. package/dist/application/analysis/active/index.d.ts.map +1 -1
  11. package/dist/application/analysis/active/network.d.ts +8 -2
  12. package/dist/application/analysis/active/network.d.ts.map +1 -1
  13. package/dist/application/analysis/active/network.js +52 -45
  14. package/dist/application/analysis/dashboard-generator.d.ts +9 -14
  15. package/dist/application/analysis/dashboard-generator.d.ts.map +1 -1
  16. package/dist/application/analysis/dashboard-generator.js +104 -233
  17. package/dist/application/analysis/data-analyst/analyzer.d.ts +4 -3
  18. package/dist/application/analysis/data-analyst/analyzer.d.ts.map +1 -1
  19. package/dist/application/analysis/data-analyst/analyzer.js +192 -125
  20. package/dist/application/analysis/data-analyst/index.d.ts +2 -2
  21. package/dist/application/analysis/data-analyst/index.d.ts.map +1 -1
  22. package/dist/application/analysis/data-analyst/index.js +1 -2
  23. package/dist/application/analysis/data-analyst/introspection.d.ts +1 -1
  24. package/dist/application/analysis/data-analyst/introspection.d.ts.map +1 -1
  25. package/dist/application/analysis/data-analyst/introspection.js +26 -35
  26. package/dist/application/analysis/data-analyst/query-gen.d.ts +1 -1
  27. package/dist/application/analysis/data-analyst/query-gen.d.ts.map +1 -1
  28. package/dist/application/analysis/data-analyst/query-gen.js +34 -48
  29. package/dist/application/analysis/data-security/context.d.ts +2 -2
  30. package/dist/application/analysis/data-security/context.d.ts.map +1 -1
  31. package/dist/application/analysis/data-security/context.js +13 -14
  32. package/dist/application/analysis/data-security/index.d.ts +2 -2
  33. package/dist/application/analysis/data-security/index.d.ts.map +1 -1
  34. package/dist/application/analysis/data-security/index.js +1 -2
  35. package/dist/application/analysis/dep-auditor.d.ts +10 -37
  36. package/dist/application/analysis/dep-auditor.d.ts.map +1 -1
  37. package/dist/application/analysis/dep-auditor.js +22 -71
  38. package/dist/application/analysis/excel-exporter.d.ts +5 -18
  39. package/dist/application/analysis/excel-exporter.d.ts.map +1 -1
  40. package/dist/application/analysis/excel-exporter.js +28 -45
  41. package/dist/application/analysis/llm-security-reviewer.d.ts +10 -23
  42. package/dist/application/analysis/llm-security-reviewer.d.ts.map +1 -1
  43. package/dist/application/analysis/llm-security-reviewer.js +35 -107
  44. package/dist/application/analysis/malware/analyzer.d.ts +4 -3
  45. package/dist/application/analysis/malware/analyzer.d.ts.map +1 -1
  46. package/dist/application/analysis/malware/analyzer.js +61 -30
  47. package/dist/application/analysis/malware/dep-scanner.d.ts +2 -2
  48. package/dist/application/analysis/malware/dep-scanner.d.ts.map +1 -1
  49. package/dist/application/analysis/malware/dep-scanner.js +48 -41
  50. package/dist/application/analysis/malware/file-scanner.d.ts +2 -2
  51. package/dist/application/analysis/malware/file-scanner.d.ts.map +1 -1
  52. package/dist/application/analysis/malware/file-scanner.js +45 -28
  53. package/dist/application/analysis/malware/index.d.ts +1 -1
  54. package/dist/application/analysis/malware/index.d.ts.map +1 -1
  55. package/dist/application/analysis/malware/index.js +0 -1
  56. package/dist/application/analysis/malware/rules.d.ts +1 -2
  57. package/dist/application/analysis/malware/rules.d.ts.map +1 -1
  58. package/dist/application/analysis/malware/rules.js +1 -125
  59. package/dist/application/analysis/malware/semantic.d.ts.map +1 -1
  60. package/dist/application/analysis/malware/semantic.js +2 -15
  61. package/dist/application/analysis/pentest-security-context.d.ts +7 -77
  62. package/dist/application/analysis/pentest-security-context.d.ts.map +1 -1
  63. package/dist/application/analysis/pentest-security-context.js +46 -215
  64. package/dist/application/analysis/report-packager.d.ts +6 -40
  65. package/dist/application/analysis/report-packager.d.ts.map +1 -1
  66. package/dist/application/analysis/report-packager.js +40 -165
  67. package/dist/application/analysis/sbom-generator.d.ts +12 -15
  68. package/dist/application/analysis/sbom-generator.d.ts.map +1 -1
  69. package/dist/application/analysis/sbom-generator.js +163 -161
  70. package/dist/application/analysis/security/analyzer.d.ts +11 -10
  71. package/dist/application/analysis/security/analyzer.d.ts.map +1 -1
  72. package/dist/application/analysis/security/analyzer.js +72 -55
  73. package/dist/application/analysis/security/config-scanner.d.ts +3 -3
  74. package/dist/application/analysis/security/config-scanner.d.ts.map +1 -1
  75. package/dist/application/analysis/security/config-scanner.js +56 -152
  76. package/dist/application/analysis/security/dependency-scanner.d.ts +3 -4
  77. package/dist/application/analysis/security/dependency-scanner.d.ts.map +1 -1
  78. package/dist/application/analysis/security/dependency-scanner.js +123 -192
  79. package/dist/application/analysis/security/header-scanner.d.ts +3 -3
  80. package/dist/application/analysis/security/header-scanner.d.ts.map +1 -1
  81. package/dist/application/analysis/security/header-scanner.js +96 -85
  82. package/dist/application/analysis/security/index.d.ts +5 -1
  83. package/dist/application/analysis/security/index.d.ts.map +1 -1
  84. package/dist/application/analysis/security/index.js +5 -2
  85. package/dist/application/analysis/security/owasp-scanner.d.ts +3 -3
  86. package/dist/application/analysis/security/owasp-scanner.d.ts.map +1 -1
  87. package/dist/application/analysis/security/owasp-scanner.js +25 -197
  88. package/dist/application/analysis/security/secrets-scanner.d.ts +5 -4
  89. package/dist/application/analysis/security/secrets-scanner.d.ts.map +1 -1
  90. package/dist/application/analysis/security/secrets-scanner.js +34 -124
  91. package/dist/application/analysis/security-reporter.d.ts +7 -16
  92. package/dist/application/analysis/security-reporter.d.ts.map +1 -1
  93. package/dist/application/analysis/security-reporter.js +32 -228
  94. package/dist/application/analysis/supply-chain-auditor.d.ts +11 -26
  95. package/dist/application/analysis/supply-chain-auditor.d.ts.map +1 -1
  96. package/dist/application/analysis/supply-chain-auditor.js +106 -198
  97. package/dist/application/development/analyst-job-manager.d.ts +5 -16
  98. package/dist/application/development/analyst-job-manager.d.ts.map +1 -1
  99. package/dist/application/development/analyst-job-manager.js +26 -6
  100. package/dist/application/development/fix/apply.d.ts +5 -1
  101. package/dist/application/development/fix/apply.d.ts.map +1 -1
  102. package/dist/application/development/fix/apply.js +76 -102
  103. package/dist/application/development/fix/context.d.ts +5 -49
  104. package/dist/application/development/fix/context.d.ts.map +1 -1
  105. package/dist/application/development/fix/context.js +5 -1
  106. package/dist/application/development/fix/index.d.ts +6 -0
  107. package/dist/application/development/fix/index.d.ts.map +1 -1
  108. package/dist/application/development/fix/index.js +9 -2
  109. package/dist/application/development/fix/strategies/go.d.ts +3 -0
  110. package/dist/application/development/fix/strategies/go.d.ts.map +1 -0
  111. package/dist/application/development/fix/strategies/go.js +67 -0
  112. package/dist/application/development/fix/strategies/java.d.ts +3 -0
  113. package/dist/application/development/fix/strategies/java.d.ts.map +1 -0
  114. package/dist/application/development/fix/strategies/java.js +80 -0
  115. package/dist/application/development/fix/strategies/legacy.d.ts +3 -0
  116. package/dist/application/development/fix/strategies/legacy.d.ts.map +1 -0
  117. package/dist/application/development/fix/strategies/legacy.js +32 -0
  118. package/dist/application/development/fix/strategies/linter.d.ts +3 -0
  119. package/dist/application/development/fix/strategies/linter.d.ts.map +1 -0
  120. package/dist/application/development/fix/strategies/linter.js +29 -0
  121. package/dist/application/development/fix/strategies/markup.d.ts +3 -0
  122. package/dist/application/development/fix/strategies/markup.d.ts.map +1 -0
  123. package/dist/application/development/fix/strategies/markup.js +53 -0
  124. package/dist/application/development/fix/strategies/node.d.ts +3 -0
  125. package/dist/application/development/fix/strategies/node.d.ts.map +1 -0
  126. package/dist/application/development/fix/strategies/node.js +52 -0
  127. package/dist/application/development/fix/strategies/php.d.ts +3 -0
  128. package/dist/application/development/fix/strategies/php.d.ts.map +1 -0
  129. package/dist/application/development/fix/strategies/php.js +62 -0
  130. package/dist/application/development/fix/strategies/python.d.ts +3 -0
  131. package/dist/application/development/fix/strategies/python.d.ts.map +1 -0
  132. package/dist/application/development/fix/strategies/python.js +41 -0
  133. package/dist/application/development/fix/strategies/ruby.d.ts +3 -0
  134. package/dist/application/development/fix/strategies/ruby.d.ts.map +1 -0
  135. package/dist/application/development/fix/strategies/ruby.js +71 -0
  136. package/dist/application/development/fix/strategies/runtime.d.ts +3 -0
  137. package/dist/application/development/fix/strategies/runtime.d.ts.map +1 -0
  138. package/dist/application/development/fix/strategies/runtime.js +29 -0
  139. package/dist/application/development/fix/strategies/rust.d.ts +3 -0
  140. package/dist/application/development/fix/strategies/rust.d.ts.map +1 -0
  141. package/dist/application/development/fix/strategies/rust.js +34 -0
  142. package/dist/application/development/fix/strategies/typescript.d.ts +3 -0
  143. package/dist/application/development/fix/strategies/typescript.d.ts.map +1 -0
  144. package/dist/application/development/fix/strategies/typescript.js +45 -0
  145. package/dist/application/development/fix/strategy-registry.d.ts +14 -0
  146. package/dist/application/development/fix/strategy-registry.d.ts.map +1 -0
  147. package/dist/application/development/fix/strategy-registry.js +46 -0
  148. package/dist/application/development/fix/suggest.d.ts +3 -0
  149. package/dist/application/development/fix/suggest.d.ts.map +1 -1
  150. package/dist/application/development/fix/suggest.js +33 -62
  151. package/dist/application/development/test-runner.d.ts +9 -38
  152. package/dist/application/development/test-runner.d.ts.map +1 -1
  153. package/dist/application/development/test-runner.js +41 -286
  154. package/dist/application/development/testing/detector.d.ts +18 -0
  155. package/dist/application/development/testing/detector.d.ts.map +1 -0
  156. package/dist/application/development/testing/detector.js +113 -0
  157. package/dist/application/development/testing/executor.d.ts +16 -0
  158. package/dist/application/development/testing/executor.d.ts.map +1 -0
  159. package/dist/application/development/testing/executor.js +58 -0
  160. package/dist/application/development/testing/parser.d.ts +21 -0
  161. package/dist/application/development/testing/parser.d.ts.map +1 -0
  162. package/dist/application/development/testing/parser.js +99 -0
  163. package/dist/application/notifications/formatter-registry.d.ts +17 -0
  164. package/dist/application/notifications/formatter-registry.d.ts.map +1 -0
  165. package/dist/application/notifications/formatter-registry.js +32 -0
  166. package/dist/application/notifications/formatters/discord.d.ts +3 -0
  167. package/dist/application/notifications/formatters/discord.d.ts.map +1 -0
  168. package/dist/application/notifications/formatters/discord.js +31 -0
  169. package/dist/application/notifications/formatters/generic.d.ts +3 -0
  170. package/dist/application/notifications/formatters/generic.d.ts.map +1 -0
  171. package/dist/application/notifications/formatters/generic.js +17 -0
  172. package/dist/application/notifications/formatters/slack.d.ts +3 -0
  173. package/dist/application/notifications/formatters/slack.d.ts.map +1 -0
  174. package/dist/application/notifications/formatters/slack.js +40 -0
  175. package/dist/application/notifications/webhook-notifier.d.ts +7 -35
  176. package/dist/application/notifications/webhook-notifier.d.ts.map +1 -1
  177. package/dist/application/notifications/webhook-notifier.js +26 -124
  178. package/dist/application/orchestration/engine/ask/brain.d.ts +14 -0
  179. package/dist/application/orchestration/engine/ask/brain.d.ts.map +1 -0
  180. package/dist/application/orchestration/engine/ask/brain.js +44 -0
  181. package/dist/application/orchestration/engine/ask/context-assembler.d.ts +23 -0
  182. package/dist/application/orchestration/engine/ask/context-assembler.d.ts.map +1 -0
  183. package/dist/application/orchestration/engine/ask/context-assembler.js +125 -0
  184. package/dist/application/orchestration/engine/ask/prompts.d.ts +6 -0
  185. package/dist/application/orchestration/engine/ask/prompts.d.ts.map +1 -0
  186. package/dist/application/orchestration/engine/ask/prompts.js +24 -0
  187. package/dist/application/orchestration/engine/ask.d.ts +5 -5
  188. package/dist/application/orchestration/engine/ask.d.ts.map +1 -1
  189. package/dist/application/orchestration/engine/ask.js +35 -161
  190. package/dist/application/orchestration/engine/context.d.ts +6 -3
  191. package/dist/application/orchestration/engine/context.d.ts.map +1 -1
  192. package/dist/application/orchestration/engine/context.js +2 -25
  193. package/dist/application/orchestration/engine/error-handler.d.ts +16 -6
  194. package/dist/application/orchestration/engine/error-handler.d.ts.map +1 -1
  195. package/dist/application/orchestration/engine/error-handler.js +71 -189
  196. package/dist/application/orchestration/engine/file/content-extractor.d.ts +22 -0
  197. package/dist/application/orchestration/engine/file/content-extractor.d.ts.map +1 -0
  198. package/dist/application/orchestration/engine/file/content-extractor.js +54 -0
  199. package/dist/application/orchestration/engine/file/file-scanner.d.ts +14 -0
  200. package/dist/application/orchestration/engine/file/file-scanner.d.ts.map +1 -0
  201. package/dist/application/orchestration/engine/file/file-scanner.js +66 -0
  202. package/dist/application/orchestration/engine/file/readers/csv-reader.d.ts +8 -0
  203. package/dist/application/orchestration/engine/file/readers/csv-reader.d.ts.map +1 -0
  204. package/dist/application/orchestration/engine/file/readers/csv-reader.js +53 -0
  205. package/dist/application/orchestration/engine/file/readers/excel-reader.d.ts +9 -0
  206. package/dist/application/orchestration/engine/file/readers/excel-reader.d.ts.map +1 -0
  207. package/dist/application/orchestration/engine/file/readers/excel-reader.js +63 -0
  208. package/dist/application/orchestration/engine/file/readers/pdf-reader.d.ts +8 -0
  209. package/dist/application/orchestration/engine/file/readers/pdf-reader.d.ts.map +1 -0
  210. package/dist/application/orchestration/engine/file/readers/pdf-reader.js +22 -0
  211. package/dist/application/orchestration/engine/file/readers/word-reader.d.ts +8 -0
  212. package/dist/application/orchestration/engine/file/readers/word-reader.d.ts.map +1 -0
  213. package/dist/application/orchestration/engine/file/readers/word-reader.js +22 -0
  214. package/dist/application/orchestration/engine/file-reader.d.ts +6 -6
  215. package/dist/application/orchestration/engine/file-reader.d.ts.map +1 -1
  216. package/dist/application/orchestration/engine/file-reader.js +50 -99
  217. package/dist/application/orchestration/engine/fix/fix-dispatcher.d.ts +21 -0
  218. package/dist/application/orchestration/engine/fix/fix-dispatcher.d.ts.map +1 -0
  219. package/dist/application/orchestration/engine/fix/fix-dispatcher.js +106 -0
  220. package/dist/application/orchestration/engine/fix/integrity-guard.d.ts +15 -0
  221. package/dist/application/orchestration/engine/fix/integrity-guard.d.ts.map +1 -0
  222. package/dist/application/orchestration/engine/fix/integrity-guard.js +29 -0
  223. package/dist/application/orchestration/engine/fix/user-prompter.d.ts +13 -0
  224. package/dist/application/orchestration/engine/fix/user-prompter.d.ts.map +1 -0
  225. package/dist/application/orchestration/engine/fix/user-prompter.js +51 -0
  226. package/dist/application/orchestration/engine/format-readers.d.ts +11 -1
  227. package/dist/application/orchestration/engine/format-readers.d.ts.map +1 -1
  228. package/dist/application/orchestration/engine/format-readers.js +22 -130
  229. package/dist/application/orchestration/engine/index/processors/database-processor.d.ts +14 -0
  230. package/dist/application/orchestration/engine/index/processors/database-processor.d.ts.map +1 -0
  231. package/dist/application/orchestration/engine/index/processors/database-processor.js +57 -0
  232. package/dist/application/orchestration/engine/index/processors/file-processor.d.ts +19 -0
  233. package/dist/application/orchestration/engine/index/processors/file-processor.d.ts.map +1 -0
  234. package/dist/application/orchestration/engine/index/processors/file-processor.js +66 -0
  235. package/dist/application/orchestration/engine/index/processors/web-processor.d.ts +12 -0
  236. package/dist/application/orchestration/engine/index/processors/web-processor.d.ts.map +1 -0
  237. package/dist/application/orchestration/engine/index/processors/web-processor.js +35 -0
  238. package/dist/application/orchestration/engine/index/utils.d.ts +32 -0
  239. package/dist/application/orchestration/engine/index/utils.d.ts.map +1 -0
  240. package/dist/application/orchestration/engine/index/utils.js +69 -0
  241. package/dist/application/orchestration/engine/indexer.d.ts.map +1 -1
  242. package/dist/application/orchestration/engine/indexer.js +29 -198
  243. package/dist/application/orchestration/engine/lifecycle.d.ts.map +1 -1
  244. package/dist/application/orchestration/engine/lifecycle.js +49 -47
  245. package/dist/application/orchestration/engine/pentest.d.ts.map +1 -1
  246. package/dist/application/orchestration/engine/pentest.js +38 -61
  247. package/dist/application/orchestration/engine/services/checkpoint/checkpoint-service.d.ts +54 -0
  248. package/dist/application/orchestration/engine/services/checkpoint/checkpoint-service.d.ts.map +1 -0
  249. package/dist/application/orchestration/engine/services/checkpoint/checkpoint-service.js +101 -0
  250. package/dist/application/orchestration/engine/watcher.d.ts.map +1 -1
  251. package/dist/application/orchestration/engine/watcher.js +29 -30
  252. package/dist/application/orchestration/incremental-index.d.ts.map +1 -1
  253. package/dist/application/orchestration/incremental-index.js +10 -0
  254. package/dist/application/orchestration/knowledge-retriever.d.ts +0 -35
  255. package/dist/application/orchestration/knowledge-retriever.d.ts.map +1 -1
  256. package/dist/application/orchestration/knowledge-retriever.js +13 -107
  257. package/dist/application/orchestration/retriever-utils.d.ts +13 -0
  258. package/dist/application/orchestration/retriever-utils.d.ts.map +1 -0
  259. package/dist/application/orchestration/retriever-utils.js +37 -0
  260. package/dist/application/remote-shell/server.d.ts +4 -12
  261. package/dist/application/remote-shell/server.d.ts.map +1 -1
  262. package/dist/application/remote-shell/server.js +25 -19
  263. package/dist/cli/commands/analyze/batch.d.ts +1 -2
  264. package/dist/cli/commands/analyze/batch.d.ts.map +1 -1
  265. package/dist/cli/commands/analyze/batch.js +30 -33
  266. package/dist/cli/commands/analyze/command.d.ts.map +1 -1
  267. package/dist/cli/commands/analyze/command.js +7 -7
  268. package/dist/cli/commands/ask.d.ts +0 -3
  269. package/dist/cli/commands/ask.d.ts.map +1 -1
  270. package/dist/cli/commands/ask.js +16 -26
  271. package/dist/cli/commands/askf.d.ts +0 -26
  272. package/dist/cli/commands/askf.d.ts.map +1 -1
  273. package/dist/cli/commands/askf.js +7 -66
  274. package/dist/cli/commands/chat.d.ts +0 -12
  275. package/dist/cli/commands/chat.d.ts.map +1 -1
  276. package/dist/cli/commands/chat.js +5 -24
  277. package/dist/cli/commands/ci.d.ts +0 -13
  278. package/dist/cli/commands/ci.d.ts.map +1 -1
  279. package/dist/cli/commands/ci.js +26 -58
  280. package/dist/cli/commands/diff.d.ts +0 -19
  281. package/dist/cli/commands/diff.d.ts.map +1 -1
  282. package/dist/cli/commands/diff.js +0 -26
  283. package/dist/cli/commands/docs.d.ts +0 -22
  284. package/dist/cli/commands/docs.d.ts.map +1 -1
  285. package/dist/cli/commands/docs.js +1 -27
  286. package/dist/cli/commands/explain.d.ts +0 -19
  287. package/dist/cli/commands/explain.d.ts.map +1 -1
  288. package/dist/cli/commands/explain.js +3 -28
  289. package/dist/cli/commands/index.d.ts +0 -3
  290. package/dist/cli/commands/index.d.ts.map +1 -1
  291. package/dist/cli/commands/index.js +2 -21
  292. package/dist/cli/commands/info.d.ts.map +1 -1
  293. package/dist/cli/commands/info.js +10 -12
  294. package/dist/cli/commands/init/command.d.ts.map +1 -1
  295. package/dist/cli/commands/init/command.js +33 -26
  296. package/dist/cli/commands/init/config-builder.d.ts +2 -2
  297. package/dist/cli/commands/init/config-builder.d.ts.map +1 -1
  298. package/dist/cli/commands/init/config-builder.js +6 -4
  299. package/dist/cli/commands/init/constants.d.ts +3 -5
  300. package/dist/cli/commands/init/constants.d.ts.map +1 -1
  301. package/dist/cli/commands/init/constants.js +124 -7
  302. package/dist/cli/commands/init/downloader.d.ts.map +1 -1
  303. package/dist/cli/commands/init/downloader.js +27 -39
  304. package/dist/cli/commands/init/model-selector.d.ts +3 -0
  305. package/dist/cli/commands/init/model-selector.d.ts.map +1 -0
  306. package/dist/cli/commands/init/model-selector.js +22 -0
  307. package/dist/cli/commands/init/types.d.ts +14 -0
  308. package/dist/cli/commands/init/types.d.ts.map +1 -0
  309. package/dist/cli/commands/license.d.ts +0 -7
  310. package/dist/cli/commands/license.d.ts.map +1 -1
  311. package/dist/cli/commands/license.js +0 -7
  312. package/dist/cli/commands/log.d.ts +0 -3
  313. package/dist/cli/commands/log.d.ts.map +1 -1
  314. package/dist/cli/commands/log.js +1 -4
  315. package/dist/cli/commands/pentest.d.ts +0 -3
  316. package/dist/cli/commands/pentest.d.ts.map +1 -1
  317. package/dist/cli/commands/pentest.js +39 -43
  318. package/dist/cli/commands/remote-shell.d.ts +0 -10
  319. package/dist/cli/commands/remote-shell.d.ts.map +1 -1
  320. package/dist/cli/commands/remote-shell.js +1 -13
  321. package/dist/cli/commands/reset.d.ts +0 -3
  322. package/dist/cli/commands/reset.d.ts.map +1 -1
  323. package/dist/cli/commands/reset.js +0 -8
  324. package/dist/cli/commands/restore.d.ts +0 -6
  325. package/dist/cli/commands/restore.d.ts.map +1 -1
  326. package/dist/cli/commands/restore.js +0 -10
  327. package/dist/cli/commands/review.d.ts +0 -15
  328. package/dist/cli/commands/review.d.ts.map +1 -1
  329. package/dist/cli/commands/review.js +3 -25
  330. package/dist/cli/commands/scan.d.ts +0 -3
  331. package/dist/cli/commands/scan.d.ts.map +1 -1
  332. package/dist/cli/commands/scan.js +10 -22
  333. package/dist/cli/commands/shell.d.ts +0 -14
  334. package/dist/cli/commands/shell.d.ts.map +1 -1
  335. package/dist/cli/commands/shell.js +12 -38
  336. package/dist/cli/commands/start.d.ts +0 -5
  337. package/dist/cli/commands/start.d.ts.map +1 -1
  338. package/dist/cli/commands/start.js +0 -7
  339. package/dist/cli/commands/test-cmd.d.ts +0 -6
  340. package/dist/cli/commands/test-cmd.d.ts.map +1 -1
  341. package/dist/cli/commands/test-cmd.js +0 -6
  342. package/dist/cli/commands/undo.d.ts +0 -6
  343. package/dist/cli/commands/undo.d.ts.map +1 -1
  344. package/dist/cli/commands/undo.js +1 -11
  345. package/dist/cli/commands/watch.d.ts +0 -25
  346. package/dist/cli/commands/watch.d.ts.map +1 -1
  347. package/dist/cli/commands/watch.js +1 -29
  348. package/dist/cli/help.js +1 -1
  349. package/dist/cli/shell/brain-classifier.d.ts +0 -20
  350. package/dist/cli/shell/brain-classifier.d.ts.map +1 -1
  351. package/dist/cli/shell/brain-classifier.js +8 -24
  352. package/dist/cli/shell/intent-classifier.d.ts +0 -10
  353. package/dist/cli/shell/intent-classifier.d.ts.map +1 -1
  354. package/dist/cli/shell/intent-classifier.js +38 -27
  355. package/dist/cli/theme.js +1 -1
  356. package/dist/domain/entities/session/constants.d.ts +1 -1
  357. package/dist/domain/entities/session/constants.js +1 -1
  358. package/dist/domain/entities/session/lock-manager.d.ts.map +1 -1
  359. package/dist/domain/entities/session/lock-manager.js +7 -4
  360. package/dist/domain/entities/session/manager.d.ts +0 -14
  361. package/dist/domain/entities/session/manager.d.ts.map +1 -1
  362. package/dist/domain/entities/session/manager.js +0 -24
  363. package/dist/domain/entities/snapshot.d.ts +0 -36
  364. package/dist/domain/entities/snapshot.d.ts.map +1 -1
  365. package/dist/domain/entities/snapshot.js +1 -42
  366. package/dist/domain/services/chunker.d.ts +0 -18
  367. package/dist/domain/services/chunker.d.ts.map +1 -1
  368. package/dist/domain/services/chunker.js +0 -29
  369. package/dist/domain/services/hardware-detector.d.ts +0 -9
  370. package/dist/domain/services/hardware-detector.d.ts.map +1 -1
  371. package/dist/domain/services/hardware-detector.js +1 -13
  372. package/dist/domain/services/index-planner.d.ts +0 -20
  373. package/dist/domain/services/index-planner.d.ts.map +1 -1
  374. package/dist/domain/services/index-planner.js +49 -43
  375. package/dist/domain/services/resource-guardian.d.ts +0 -15
  376. package/dist/domain/services/resource-guardian.d.ts.map +1 -1
  377. package/dist/domain/services/resource-guardian.js +5 -24
  378. package/dist/domain/services/safety-guard.d.ts +0 -16
  379. package/dist/domain/services/safety-guard.d.ts.map +1 -1
  380. package/dist/domain/services/safety-guard.js +4 -19
  381. package/dist/infrastructure/adapters/bridge.d.ts +0 -12
  382. package/dist/infrastructure/adapters/bridge.d.ts.map +1 -1
  383. package/dist/infrastructure/adapters/bridge.js +10 -33
  384. package/dist/infrastructure/adapters/providers/claude.js +1 -1
  385. package/dist/infrastructure/adapters/providers/gemini.js +1 -1
  386. package/dist/infrastructure/adapters/providers/ollama.js +1 -1
  387. package/dist/infrastructure/adapters/providers/openai.js +2 -2
  388. package/dist/infrastructure/io/db-loader.d.ts +0 -14
  389. package/dist/infrastructure/io/db-loader.d.ts.map +1 -1
  390. package/dist/infrastructure/io/db-loader.js +4 -18
  391. package/dist/infrastructure/io/file-watcher.d.ts +0 -22
  392. package/dist/infrastructure/io/file-watcher.d.ts.map +1 -1
  393. package/dist/infrastructure/io/file-watcher.js +3 -21
  394. package/dist/infrastructure/io/git-manager.d.ts +0 -52
  395. package/dist/infrastructure/io/git-manager.d.ts.map +1 -1
  396. package/dist/infrastructure/io/git-manager.js +3 -60
  397. package/dist/infrastructure/io/logger/index.d.ts +2 -49
  398. package/dist/infrastructure/io/logger/index.d.ts.map +1 -1
  399. package/dist/infrastructure/io/logger/index.js +12 -51
  400. package/dist/infrastructure/io/process-watcher.d.ts +1 -30
  401. package/dist/infrastructure/io/process-watcher.d.ts.map +1 -1
  402. package/dist/infrastructure/io/process-watcher.js +41 -56
  403. package/dist/infrastructure/io/web-scraper.d.ts +0 -30
  404. package/dist/infrastructure/io/web-scraper.d.ts.map +1 -1
  405. package/dist/infrastructure/io/web-scraper.js +10 -64
  406. package/dist/infrastructure/utils/config-loader.d.ts +0 -4
  407. package/dist/infrastructure/utils/config-loader.d.ts.map +1 -1
  408. package/dist/infrastructure/utils/config-loader.js +18 -7
  409. package/dist/infrastructure/utils/dossier.d.ts +20 -0
  410. package/dist/infrastructure/utils/dossier.d.ts.map +1 -0
  411. package/dist/infrastructure/utils/dossier.js +91 -0
  412. package/dist/infrastructure/utils/error-parser/index.d.ts +2 -2
  413. package/dist/infrastructure/utils/error-parser/index.d.ts.map +1 -1
  414. package/dist/infrastructure/utils/file-constants.d.ts +10 -0
  415. package/dist/infrastructure/utils/file-constants.d.ts.map +1 -0
  416. package/dist/infrastructure/utils/file-constants.js +31 -0
  417. package/dist/interfaces/active-analysis.d.ts +39 -0
  418. package/dist/interfaces/active-analysis.d.ts.map +1 -0
  419. package/dist/interfaces/analyst.d.ts +22 -0
  420. package/dist/interfaces/analyst.d.ts.map +1 -0
  421. package/dist/interfaces/common.d.ts +49 -0
  422. package/dist/interfaces/common.d.ts.map +1 -0
  423. package/dist/interfaces/common.js +4 -0
  424. package/dist/interfaces/data-analyst.d.ts +56 -0
  425. package/dist/interfaces/data-analyst.d.ts.map +1 -0
  426. package/dist/interfaces/data-analyst.js +4 -0
  427. package/dist/interfaces/data-security.d.ts +44 -0
  428. package/dist/interfaces/data-security.d.ts.map +1 -0
  429. package/dist/interfaces/data-security.js +4 -0
  430. package/dist/interfaces/dependency-audit.d.ts +22 -0
  431. package/dist/interfaces/dependency-audit.d.ts.map +1 -0
  432. package/dist/interfaces/dependency-audit.js +4 -0
  433. package/dist/interfaces/errors.d.ts +15 -0
  434. package/dist/interfaces/errors.d.ts.map +1 -0
  435. package/dist/interfaces/errors.js +1 -0
  436. package/dist/interfaces/excel-export.d.ts +18 -0
  437. package/dist/interfaces/excel-export.d.ts.map +1 -0
  438. package/dist/interfaces/excel-export.js +4 -0
  439. package/dist/interfaces/fix-engine.d.ts +56 -0
  440. package/dist/interfaces/fix-engine.d.ts.map +1 -0
  441. package/dist/interfaces/fix-engine.js +1 -0
  442. package/dist/interfaces/index.d.ts +18 -0
  443. package/dist/interfaces/index.d.ts.map +1 -0
  444. package/dist/interfaces/index.js +17 -0
  445. package/dist/{application/analysis/malware/types.d.ts → interfaces/malware-analysis.d.ts} +22 -10
  446. package/dist/interfaces/malware-analysis.d.ts.map +1 -0
  447. package/dist/interfaces/malware-analysis.js +1 -0
  448. package/dist/interfaces/notifications.d.ts +25 -0
  449. package/dist/interfaces/notifications.d.ts.map +1 -0
  450. package/dist/interfaces/notifications.js +1 -0
  451. package/dist/interfaces/pentest-security.d.ts +33 -0
  452. package/dist/interfaces/pentest-security.d.ts.map +1 -0
  453. package/dist/interfaces/pentest-security.js +4 -0
  454. package/dist/interfaces/report-packaging.d.ts +18 -0
  455. package/dist/interfaces/report-packaging.d.ts.map +1 -0
  456. package/dist/interfaces/report-packaging.js +4 -0
  457. package/dist/interfaces/reporting.d.ts +15 -0
  458. package/dist/interfaces/reporting.d.ts.map +1 -0
  459. package/dist/interfaces/reporting.js +4 -0
  460. package/dist/interfaces/sbom.d.ts +81 -0
  461. package/dist/interfaces/sbom.d.ts.map +1 -0
  462. package/dist/interfaces/sbom.js +4 -0
  463. package/dist/interfaces/security-review.d.ts +13 -0
  464. package/dist/interfaces/security-review.d.ts.map +1 -0
  465. package/dist/interfaces/security-review.js +1 -0
  466. package/dist/interfaces/testing.d.ts +27 -0
  467. package/dist/interfaces/testing.d.ts.map +1 -0
  468. package/dist/interfaces/testing.js +1 -0
  469. package/dist/utils/ai-prompts.d.ts +34 -0
  470. package/dist/utils/ai-prompts.d.ts.map +1 -0
  471. package/dist/utils/ai-prompts.js +99 -0
  472. package/dist/utils/dashboard-helpers.d.ts +18 -0
  473. package/dist/utils/dashboard-helpers.d.ts.map +1 -0
  474. package/dist/utils/dashboard-helpers.js +52 -0
  475. package/dist/utils/dashboard-templates.d.ts +27 -0
  476. package/dist/utils/dashboard-templates.d.ts.map +1 -0
  477. package/dist/utils/dashboard-templates.js +233 -0
  478. package/dist/utils/db-queries.d.ts +27 -0
  479. package/dist/utils/db-queries.d.ts.map +1 -0
  480. package/dist/utils/db-queries.js +68 -0
  481. package/dist/utils/dependency-helpers.d.ts +18 -0
  482. package/dist/utils/dependency-helpers.d.ts.map +1 -0
  483. package/dist/utils/dependency-helpers.js +60 -0
  484. package/dist/utils/excel-helpers.d.ts +13 -0
  485. package/dist/utils/excel-helpers.d.ts.map +1 -0
  486. package/dist/utils/excel-helpers.js +30 -0
  487. package/dist/utils/fix-helpers.d.ts +14 -0
  488. package/dist/utils/fix-helpers.d.ts.map +1 -0
  489. package/dist/utils/fix-helpers.js +40 -0
  490. package/dist/utils/malware-definitions.d.ts +8 -0
  491. package/dist/utils/malware-definitions.d.ts.map +1 -0
  492. package/dist/utils/malware-definitions.js +133 -0
  493. package/dist/utils/ports.d.ts +7 -0
  494. package/dist/utils/ports.d.ts.map +1 -0
  495. package/dist/{application/analysis/active/context.js → utils/ports.js} +14 -46
  496. package/dist/utils/sbom-helpers.d.ts +45 -0
  497. package/dist/utils/sbom-helpers.d.ts.map +1 -0
  498. package/dist/utils/sbom-helpers.js +119 -0
  499. package/dist/utils/security-definitions.d.ts +121 -0
  500. package/dist/utils/security-definitions.d.ts.map +1 -0
  501. package/dist/utils/security-definitions.js +538 -0
  502. package/dist/utils/security-helpers.d.ts +84 -0
  503. package/dist/utils/security-helpers.d.ts.map +1 -0
  504. package/dist/utils/security-helpers.js +348 -0
  505. package/package.json +4 -1
  506. package/prebuilds/darwin-arm64/uneven_core.node +0 -0
  507. package/prebuilds/linux-arm64/uneven_core.node +0 -0
  508. package/prebuilds/linux-x64/uneven_core.node +0 -0
  509. package/prebuilds/win32-x64/uneven_core.node +0 -0
  510. package/types/index.d.ts +0 -1
  511. package/dist/application/analysis/active/context.d.ts +0 -32
  512. package/dist/application/analysis/active/context.d.ts.map +0 -1
  513. package/dist/application/analysis/data-analyst/types.d.ts +0 -25
  514. package/dist/application/analysis/data-analyst/types.d.ts.map +0 -1
  515. package/dist/application/analysis/data-analyst/utils.d.ts +0 -11
  516. package/dist/application/analysis/data-analyst/utils.d.ts.map +0 -1
  517. package/dist/application/analysis/data-analyst/utils.js +0 -73
  518. package/dist/application/analysis/data-security/defaults.d.ts +0 -7
  519. package/dist/application/analysis/data-security/defaults.d.ts.map +0 -1
  520. package/dist/application/analysis/data-security/defaults.js +0 -51
  521. package/dist/application/analysis/data-security/types.d.ts +0 -26
  522. package/dist/application/analysis/data-security/types.d.ts.map +0 -1
  523. package/dist/application/analysis/data-security/utils.d.ts +0 -2
  524. package/dist/application/analysis/data-security/utils.d.ts.map +0 -1
  525. package/dist/application/analysis/data-security/utils.js +0 -3
  526. package/dist/application/analysis/malware/types.d.ts.map +0 -1
  527. package/dist/application/analysis/malware/utils.d.ts +0 -14
  528. package/dist/application/analysis/malware/utils.d.ts.map +0 -1
  529. package/dist/application/analysis/malware/utils.js +0 -75
  530. package/dist/application/analysis/security/types.d.ts +0 -21
  531. package/dist/application/analysis/security/types.d.ts.map +0 -1
  532. package/dist/application/analysis/security/types.js +0 -15
  533. package/dist/application/analysis/security/utils.d.ts +0 -26
  534. package/dist/application/analysis/security/utils.d.ts.map +0 -1
  535. package/dist/application/analysis/security/utils.js +0 -97
  536. package/dist/application/development/fix/patterns-compiled.d.ts +0 -12
  537. package/dist/application/development/fix/patterns-compiled.d.ts.map +0 -1
  538. package/dist/application/development/fix/patterns-compiled.js +0 -189
  539. package/dist/application/development/fix/patterns-runtime.d.ts +0 -10
  540. package/dist/application/development/fix/patterns-runtime.d.ts.map +0 -1
  541. package/dist/application/development/fix/patterns-runtime.js +0 -344
  542. /package/dist/{application/analysis/data-analyst → cli/commands/init}/types.js +0 -0
  543. /package/dist/{application/analysis/data-security/types.js → interfaces/active-analysis.js} +0 -0
  544. /package/dist/{application/analysis/malware/types.js → interfaces/analyst.js} +0 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,45 @@ All notable changes to Uneven AI will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.2.1] - 2026-05-01
9
+
10
+ ### Fixed
11
+
12
+ - **Auto-fix rollback** — In certain error scenarios the engine would skip the rollback step, leaving partially applied changes on disk. Rollback is now reliably triggered on every failure path.
13
+ - **Shell crash on fix confirmation timeout** — When the auto-fix confirmation prompt timed out, Node.js could throw an unhandled rejection and exit. The prompt now degrades gracefully.
14
+ - **Fix engine context accuracy** — The code context sent to the AI for generating fixes was occasionally pulled from the wrong region of the file. The engine now uses an accurate line-based extraction window.
15
+ - **AI confidence out of range** — The fix engine could accept confidence scores outside the valid 0–1 range, skewing fix prioritization. Scores are now clamped correctly.
16
+ - **Knowledge Map file routing** — Files were occasionally matched incorrectly when two files share a similar suffix (e.g. `user.ts` and `power-user.ts`). Path boundary matching is now enforced.
17
+ - **Knowledge Map multi-line response parsing** — When the AI returned a formatted (multi-line) file list, the parser silently dropped all entries. Both compact and formatted responses are now handled correctly.
18
+ - **Knowledge Map path corruption** — A stray trailing comma in the fallback parser produced unresolvable paths, causing context retrieval to fail silently.
19
+ - **Knowledge Map context overflow** — On large projects with many indexed files, the full file list could overflow the AI context window. The map is now capped at 800 entries with a clear truncation notice.
20
+ - **Watcher stability** — An uncaught error during a proactive scan could bring down the file watcher. Errors are now isolated and logged without interrupting the watch loop.
21
+ - **Index integrity** — A failed file read during indexing could record an empty hash, causing the file to be treated as unchanged on the next run. Affected files are now skipped until readable.
22
+ - **Remote shell hardening** — Improved robustness of the built-in remote shell endpoint.
23
+ - **Session lock reliability** — A lock-timeout error could be silently swallowed under concurrent load. Errors are now surfaced to the logger.
24
+ - **Local model loader stability** — Under concurrent usage, the local model could be loaded more than once simultaneously. Loader now serializes concurrent requests correctly.
25
+ - **Symlink loop protection** — Directory indexing could enter an infinite loop when the project contained circular symbolic links. Symlinked directories are now skipped during traversal.
26
+ - **Large file context cap** — Files without a size cap could saturate the AI context window when used as reference material. Content is now capped at 8 000 characters with a truncation notice.
27
+
28
+ ---
29
+
30
+ ## [1.2.0] - 2026-04-29
31
+
32
+ ### Added
33
+ - **Global Strategy Architecture**: Introduced `src/utils` and `src/interfaces` to centralize shared constants and contracts, significantly reducing circular dependencies and improving modularity.
34
+ - **Data Analyst Strategy Pattern**: Refactored the monolithic `analyzer.ts` into a decoupled architecture using a Strategy pattern. Database-specific logic is now isolated in `KnexAdapter` and `MongoAdapter`.
35
+ - **Centralized Security Definitions**: Created `src/utils/security-definitions.ts` to host all security constants (`PORTS`, `REQUIRED_HEADERS`) used by the analysis engines.
36
+ - **Legal Compliance Flow (Frontend)**: Implemented `LegalGateModal` with dynamic localized links (BRL/PT vs USD/EN) and mandatory consent interceptor in the pricing flow.
37
+
38
+ ### Changed
39
+ - **Pentester Modernization**: Deep refactoring of the `active` analysis module. Procedural logic in `helpers.ts`, `http.ts`, and `network.ts` replaced with modern asynchronous patterns and functional programming (Map/Filter).
40
+ - **Interface Segregation**: Moved all domain-specific interfaces to `src/interfaces/data-analyst.ts` and `src/interfaces/active-analysis.ts`.
41
+ - **Infrastructure Cleanup**: Streamlined core context files (`context.ts`) by removing heavy data definitions and focusing on runtime configuration.
42
+
43
+ ### Fixed
44
+ - **Mobile UX (Frontend)**: Resolved horizontal overflow issues hiding the mobile menu; fixed logo font-size and spacing constraints for small screens.
45
+ - **CSS Syntax Error**: Corrected invalid `items-center` property in the Legal Modal to proper `align-items: center`.
46
+
8
47
  ## [1.1.9] - 2026-04-27
9
48
 
10
49
  ### Added
package/README.md CHANGED
@@ -3,20 +3,19 @@
3
3
  ![npm version](https://img.shields.io/npm/v/uneven-ai)
4
4
  ![license](https://img.shields.io/badge/license-BSL%201.1-blue)
5
5
  ![node](https://img.shields.io/node/v/uneven-ai)
6
- ![typescript](https://img.shields.io/badge/TypeScript-ready-blue)
7
6
 
8
7
  > **Autonomous local development agent for Node.js.**
9
8
  >
10
- > Runs on your machine. Meets **Maria**, your autonomous senior engineer. She indexes your codebase, watches running terminals in real time, **autonomously fixes errors**, scans for **malicious code**, performs **security testing**, and manages your project via a **conversational shell**.
9
+ > Runs on your machine. Meets **Snatchy**, your autonomous senior engineer. She indexes your codebase, watches running terminals in real time, **autonomously fixes errors**, scans for **malicious code**, performs **security testing**, and manages your project via a **conversational shell**.
11
10
  >
12
- > Use your own API key or run 100% offline with **Maria** (Standard or Pro). No telemetry. No cloud lock-in.
11
+ > Use your own API key or run 100% offline with **Snatchy**. No telemetry. No cloud lock-in.
13
12
 
14
13
  ---
15
14
 
16
15
  ## Features
17
16
 
18
- - **💬 Maria Shell** — Run `uneven-ai` to talk with **Maria**, your local senior agent. She understands your intent and dispatches commands automatically.
19
- - **🧠 Local Sovereignty** — Powered by **Maria**, our built-in offline brain. Choose between **Maria Standard** (Llama 3.2 fast & light) or **Maria Pro** (Llama 4 Scout — high performance).
17
+ - **💬 Snatchy Shell** — Run `uneven-ai` to talk with **Snatchy**, your local senior agent. She understands your intent in any language and dispatches commands automatically.
18
+ - **🧠 Local Sovereignty** — Powered by **Snatchy**, our built-in offline brain. Runs entirely on your machineno API key, no cloud, no data leaving your environment.
20
19
  - **⚡ Selective Knowledge Retrieval** — New **Knowledge Map Strategy** for massive projects. The AI identifies relevant files from a compact project map before reading content, reducing token costs by up to 90% and eliminating "context noise".
21
20
  - **🔍 Semantic Knowledge Base** — Scalable indexing for codebase, databases, and docs. Optimized for surgical context delivery in v1.1.1.
22
21
  - **👀 Terminal Watcher** — Monitors your dev workflow and catches execution errors in real time.
@@ -75,13 +74,13 @@ Requirements vary depending on the **brain provider** you choose.
75
74
  | Disk | 200 MB + model size | Ollama stores models in its own directory |
76
75
  | OS | Linux, macOS, Windows 11 | |
77
76
 
78
- ### Local brain (LLaMA — no API, no cloud)
77
+ ### Local brain (Snatchy — no API, no cloud)
79
78
 
80
79
  | Item | Minimum | Recommended |
81
80
  |---|---|---|
82
81
  | Node.js | v18 (ESM required) | v20+ |
83
82
  | RAM | 4 GB | 8 GB+ |
84
- | Disk | 200 MB (embeddings) | 2 GB+ (local LLM) |
83
+ | Disk | 200 MB (embeddings) | 2 GB+ (local model) |
85
84
  | OS | Linux, macOS, Windows 11 | Linux / macOS |
86
85
 
87
86
  ---
@@ -142,7 +141,7 @@ uneven-ai ci
142
141
 
143
142
  `uneven-ai init` walks you through selecting a provider and downloading required models:
144
143
 
145
- - **Maria (Local)** — Downloads an optimized offline model. Detects GPU automatically. Choose **Maria Standard** (Llama 3.2) for speed or **Maria Pro** (Llama 4) for advanced reasoning.
144
+ - **Snatchy (Local)** — Downloads an optimized offline model. Detects your hardware automatically and installs the accelerated binary. Just run `init` and Snatchy handles the rest.
146
145
  - **Ollama** — Connects to your existing Ollama infrastructure.
147
146
  - **Cloud providers** — Requires environment API keys:
148
147
  ```bash
@@ -158,7 +157,7 @@ uneven-ai ci
158
157
  Run `uneven-ai` with no arguments to open the interactive shell:
159
158
 
160
159
  ```
161
- ◈ Uneven AI v1.1.9
160
+ ◈ Uneven AI v1.2.0
162
161
  ────────────────────────────────────────────────────────────
163
162
  Olá! O que posso fazer por você hoje?
164
163
  (Escreva sua mensagem ou "sair" para encerrar)
@@ -204,8 +203,8 @@ import { UnevenConfig } from 'uneven-ai'
204
203
 
205
204
  const config: UnevenConfig = {
206
205
  brain: {
207
- provider: 'local', // 'local' (Maria) | 'openai' | 'claude' | 'gemini' | 'ollama'
208
- model: 'maria-standard', // 'maria-standard' (Llama 3.2) | 'maria-pro' (Llama 4)
206
+ provider: 'local', // 'local' (Snatchy) | 'ollama' | 'gemini' | 'openai' | 'claude'
207
+ model: '', // set automatically by 'uneven-ai init'
209
208
  apiKey: process.env.AI_KEY, // cloud providers only
210
209
  temperature: 0.3,
211
210
  maxTokens: 2048,
@@ -373,7 +372,7 @@ uneven-ai ci --github # Write GitHub Actions step summary
373
372
  uneven-ai ci --output ./ci-out.json # Custom output path
374
373
  ```
375
374
 
376
- Pipeline steps: TypeScript typecheck → malware scan → test suite. Exit code 0 = pass.
375
+ Pipeline steps: type check → malware scan → test suite. Exit code 0 = pass.
377
376
 
378
377
  ---
379
378
 
@@ -383,7 +382,7 @@ Pipeline steps: TypeScript typecheck → malware scan → test suite. Exit code
383
382
  import { Uneven } from 'uneven-ai'
384
383
 
385
384
  const ai = new Uneven({
386
- brain: { provider: 'local', model: 'llama-3.2-1b-q8' },
385
+ brain: { provider: 'local' }, // model set by 'uneven-ai init'
387
386
  knowledge: { dirs: ['./src'] },
388
387
  watch: { terminal: 'npm run dev', autoFix: true },
389
388
  })
@@ -553,7 +552,7 @@ New to Uneven AI? Follow the step-by-step guide to verify each feature works cor
553
552
 
554
553
  ---
555
554
 
556
- **© 2025 KR Riley Soluções. All rights reserved.**
555
+ **© 2026 KR Riley Soluções. All rights reserved.**
557
556
 
558
557
  Uneven AI is developed and owned by **KR Riley Soluções** — a software engineering consultancy in Brazil.
559
558
 
@@ -1,10 +1,19 @@
1
1
  import * as http from 'http';
2
+ /**
3
+ * Modern TCP connection check with clean promise handling
4
+ */
2
5
  export declare function tcpConnect(host: string, port: number, timeoutMs: number): Promise<boolean>;
6
+ /**
7
+ * Streamlined HTTP request with automatic dossier injection
8
+ */
3
9
  export declare function httpRequest(options: http.RequestOptions, useHttps: boolean): Promise<{
4
10
  statusCode: number;
5
11
  headers: Record<string, string | string[] | undefined>;
6
12
  body: string;
7
13
  }>;
14
+ /**
15
+ * Extracts and analyzes TLS certificate information
16
+ */
8
17
  export declare function parseTlsInfo(host: string, port: number): Promise<{
9
18
  valid: boolean;
10
19
  expired: boolean;
@@ -14,6 +23,9 @@ export declare function parseTlsInfo(host: string, port: number): Promise<{
14
23
  subject: string;
15
24
  issuer: string;
16
25
  } | null>;
26
+ /**
27
+ * Resolves target string to host, port and protocol using native URL API
28
+ */
17
29
  export declare function resolveHostPort(target: string): {
18
30
  host: string;
19
31
  port: number;
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/application/analysis/active/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAI5B,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAO1F;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1F,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAA;IACtD,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CA0BD;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAChE,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,CA8BR;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAY9F"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/application/analysis/active/helpers.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAK5B;;GAEG;AACH,wBAAsB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBhG;AAED;;GAEG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC;IAC1F,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,CAAA;IACtD,IAAI,EAAE,MAAM,CAAA;CACb,CAAC,CAqCD;AAED;;GAEG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IACtE,KAAK,EAAE,OAAO,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,UAAU,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,MAAM,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,MAAM,CAAA;CACf,GAAG,IAAI,CAAC,CAiCR;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,CAoB9F"}
@@ -2,81 +2,114 @@ import * as net from 'net';
2
2
  import * as tls from 'tls';
3
3
  import * as https from 'https';
4
4
  import * as http from 'http';
5
- import { CONNECT_TIMEOUT_MS, HTTP_TIMEOUT_MS } from './context.js';
6
- import { getPublicIp } from '../../../infrastructure/utils/network.js';
7
- export function tcpConnect(host, port, timeoutMs) {
8
- return new Promise(resolve => {
9
- const sock = net.createConnection({ host, port });
10
- const timer = setTimeout(() => { sock.destroy(); resolve(false); }, timeoutMs);
11
- sock.on('connect', () => { clearTimeout(timer); sock.destroy(); resolve(true); });
12
- sock.on('error', () => { clearTimeout(timer); resolve(false); });
5
+ import { CONNECT_TIMEOUT_MS, HTTP_TIMEOUT_MS } from '../../../utils/security-definitions.js';
6
+ import { getAttackerDossier } from '../../../infrastructure/utils/dossier.js';
7
+ import { PentestSecurityContext } from '../pentest-security-context.js';
8
+ /**
9
+ * Modern TCP connection check with clean promise handling
10
+ */
11
+ export async function tcpConnect(host, port, timeoutMs) {
12
+ return new Promise((resolve) => {
13
+ const socket = net.createConnection({ host, port });
14
+ socket.setTimeout(timeoutMs);
15
+ socket.on('connect', () => {
16
+ socket.destroy();
17
+ resolve(true);
18
+ });
19
+ const onFail = () => {
20
+ socket.destroy();
21
+ resolve(false);
22
+ };
23
+ socket.on('timeout', onFail);
24
+ socket.on('error', onFail);
13
25
  });
14
26
  }
27
+ /**
28
+ * Streamlined HTTP request with automatic dossier injection
29
+ */
15
30
  export async function httpRequest(options, useHttps) {
16
- const ip = await getPublicIp();
17
- const customHeaders = {
18
- ...options.headers,
31
+ // Context management could be optimized outside this helper, but kept here for now
32
+ const ctx = new PentestSecurityContext();
33
+ const scope = await ctx.loadScope();
34
+ const dossier = await getAttackerDossier(scope);
35
+ const dossierBase64 = Buffer.from(JSON.stringify(dossier)).toString('base64');
36
+ const mergedHeaders = {
19
37
  'User-Agent': 'Uneven-Pentester/1.1.9',
20
- ...(ip ? { 'X-Uneven-Origin-Trace': ip } : {})
38
+ 'X-Uneven-Dossier': dossierBase64,
39
+ ...options.headers,
21
40
  };
22
41
  return new Promise((resolve, reject) => {
23
- const mod = useHttps ? https : http;
24
- const req = mod.request({ ...options, headers: customHeaders, rejectUnauthorized: false }, res => {
42
+ const client = useHttps ? https : http;
43
+ const req = client.request({ ...options, headers: mergedHeaders, rejectUnauthorized: false }, (res) => {
25
44
  let body = '';
26
- res.on('data', (chunk) => { body += chunk.toString('utf-8'); });
45
+ res.setEncoding('utf-8');
46
+ res.on('data', chunk => { body += chunk; });
27
47
  res.on('end', () => resolve({
28
48
  statusCode: res.statusCode ?? 0,
29
49
  headers: res.headers,
30
50
  body: body.slice(0, 4096),
31
51
  }));
32
52
  });
33
- req.setTimeout(HTTP_TIMEOUT_MS, () => { req.destroy(); reject(new Error('timeout')); });
53
+ req.setTimeout(HTTP_TIMEOUT_MS, () => {
54
+ req.destroy();
55
+ reject(new Error('Request timeout'));
56
+ });
34
57
  req.on('error', reject);
35
58
  req.end();
36
59
  });
37
60
  }
38
- export function parseTlsInfo(host, port) {
39
- return new Promise(resolve => {
40
- const sock = tls.connect({ host, port, rejectUnauthorized: false, timeout: CONNECT_TIMEOUT_MS }, () => {
41
- const cert = sock.getPeerCertificate();
42
- const protocol = sock.getProtocol() ?? 'unknown';
61
+ /**
62
+ * Extracts and analyzes TLS certificate information
63
+ */
64
+ export async function parseTlsInfo(host, port) {
65
+ return new Promise((resolve) => {
66
+ const socket = tls.connect({ host, port, rejectUnauthorized: false, timeout: CONNECT_TIMEOUT_MS }, () => {
67
+ const cert = socket.getPeerCertificate();
43
68
  if (!cert || !cert.valid_to) {
44
- sock.destroy();
45
- resolve(null);
46
- return;
69
+ socket.destroy();
70
+ return resolve(null);
47
71
  }
48
72
  const expiry = new Date(cert.valid_to);
49
- const now = new Date();
50
- const daysToExpiry = Math.floor((expiry.getTime() - now.getTime()) / 86400000);
51
- const selfSigned = cert.issuer?.CN === cert.subject?.CN;
73
+ const daysToExpiry = Math.floor((expiry.getTime() - Date.now()) / 86400000);
52
74
  resolve({
53
- valid: sock.authorized,
75
+ valid: socket.authorized,
54
76
  expired: daysToExpiry < 0,
55
- selfSigned,
77
+ selfSigned: cert.issuer?.CN === cert.subject?.CN,
56
78
  daysToExpiry,
57
- protocol,
79
+ protocol: socket.getProtocol() ?? 'unknown',
58
80
  subject: String(cert.subject?.CN ?? ''),
59
81
  issuer: String(cert.issuer?.CN ?? ''),
60
82
  });
61
- sock.destroy();
83
+ socket.destroy();
84
+ });
85
+ socket.on('error', () => resolve(null));
86
+ socket.setTimeout(CONNECT_TIMEOUT_MS, () => {
87
+ socket.destroy();
88
+ resolve(null);
62
89
  });
63
- sock.setTimeout(CONNECT_TIMEOUT_MS, () => { sock.destroy(); resolve(null); });
64
- sock.on('error', () => resolve(null));
65
90
  });
66
91
  }
92
+ /**
93
+ * Resolves target string to host, port and protocol using native URL API
94
+ */
67
95
  export function resolveHostPort(target) {
68
- let raw = target;
69
- let useHttps = true;
70
- let defaultPort = 443;
71
- if (raw.startsWith('http://')) {
72
- raw = raw.slice(7);
73
- useHttps = false;
74
- defaultPort = 80;
96
+ const hasProtocol = /^https?:\/\//i.test(target);
97
+ const normalizedTarget = hasProtocol ? target : `https://${target}`;
98
+ try {
99
+ const url = new URL(normalizedTarget);
100
+ return {
101
+ host: url.hostname,
102
+ port: url.port ? parseInt(url.port, 10) : (url.protocol === 'https:' ? 443 : 80),
103
+ https: url.protocol === 'https:'
104
+ };
75
105
  }
76
- else if (raw.startsWith('https://')) {
77
- raw = raw.slice(8);
106
+ catch {
107
+ // Fallback for non-URL compatible targets (like raw IPs)
108
+ const [host, port] = target.split(':');
109
+ return {
110
+ host: host || target,
111
+ port: port ? parseInt(port, 10) : 443,
112
+ https: true
113
+ };
78
114
  }
79
- const [host, portStr] = raw.split(':');
80
- const port = portStr ? parseInt(portStr, 10) : defaultPort;
81
- return { host: host ?? raw, port, https: useHttps };
82
115
  }
@@ -1,6 +1,15 @@
1
- import type { SecurityFinding } from '../security/index.js';
2
- import type { ActiveCtx } from './context.js';
1
+ import type { SecurityFinding } from '../../../interfaces/index.js';
2
+ import type { ActiveCtx } from '../../../interfaces/active-analysis.js';
3
+ /**
4
+ * Audits HTTP headers for missing security controls and info disclosure
5
+ */
3
6
  export declare function doAuditHeaders(ctx: ActiveCtx, target: string): Promise<SecurityFinding[]>;
7
+ /**
8
+ * Tests CORS configuration for common misconfigurations
9
+ */
4
10
  export declare function doTestCORS(ctx: ActiveCtx, target: string): Promise<SecurityFinding[]>;
11
+ /**
12
+ * Tests for dangerous HTTP methods allowed by the server
13
+ */
5
14
  export declare function doTestDangerousMethods(ctx: ActiveCtx, target: string): Promise<SecurityFinding[]>;
6
15
  //# sourceMappingURL=http.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../src/application/analysis/active/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7C,wBAAsB,cAAc,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAoD/F;AAED,wBAAsB,UAAU,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CA+C3F;AAED,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAiCvG"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../../src/application/analysis/active/http.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAmBvE;;GAEG;AACH,wBAAsB,cAAc,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAsD/F;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAgD3F;AAED;;GAEG;AACH,wBAAsB,sBAAsB,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAiCvG"}
@@ -1,14 +1,25 @@
1
- import { REQUIRED_HEADERS } from './context.js';
1
+ import { REQUIRED_HEADERS } from '../../../utils/security-definitions.js';
2
2
  import { httpRequest, resolveHostPort } from './helpers.js';
3
- export async function doAuditHeaders(ctx, target) {
4
- const { host, port, https: useHttps } = resolveHostPort(target);
5
- await ctx.logger.info(`ActiveScan: HTTP header audit → ${host}:${port}`);
6
- const findings = [];
3
+ /**
4
+ * Checks if the target is allowed and logs the operation
5
+ */
6
+ async function ensureTargetAllowed(ctx, target, op) {
7
+ const { host, port } = resolveHostPort(target);
8
+ await ctx.logger.info(`ActiveScan: ${op} → ${host}:${port}`);
7
9
  const check = await ctx.ctx.checkTarget(target);
8
10
  if (check.blocked) {
9
- ctx.audit(`BLOCKED header audit ${target} — ${check.reason}`);
10
- return [];
11
+ ctx.audit(`BLOCKED ${op} ${target} — ${check.reason}`);
12
+ return false;
11
13
  }
14
+ return true;
15
+ }
16
+ /**
17
+ * Audits HTTP headers for missing security controls and info disclosure
18
+ */
19
+ export async function doAuditHeaders(ctx, target) {
20
+ if (!await ensureTargetAllowed(ctx, target, 'Header Audit'))
21
+ return [];
22
+ const { host, port, https: useHttps } = resolveHostPort(target);
12
23
  let res;
13
24
  try {
14
25
  res = await httpRequest({ host, port, path: '/', method: 'GET' }, useHttps);
@@ -16,20 +27,22 @@ export async function doAuditHeaders(ctx, target) {
16
27
  catch {
17
28
  return [];
18
29
  }
19
- ctx.audit(`HTTP header audit ${host}:${port} — ${res.statusCode}`);
30
+ ctx.audit(`HTTP Header Audit ${host}:${port} — ${res.statusCode}`);
20
31
  const h = res.headers;
21
- for (const rule of REQUIRED_HEADERS) {
22
- if (!h[rule.key]) {
23
- findings.push({
24
- severity: rule.severity,
25
- type: `ActiveScan: Missing ${rule.header}`,
26
- message: rule.message(host),
27
- recommendation: rule.recommendation,
28
- cvss: rule.cvss,
29
- match: host,
30
- });
31
- }
32
- }
32
+ const findings = [];
33
+ // 1. Missing Security Headers
34
+ const missingHeaders = REQUIRED_HEADERS
35
+ .filter(rule => !h[rule.key])
36
+ .map(rule => ({
37
+ severity: rule.severity,
38
+ type: `ActiveScan: Missing ${rule.header}`,
39
+ message: rule.messageBuilder(host),
40
+ recommendation: rule.recommendation,
41
+ cvss: rule.cvss,
42
+ match: host,
43
+ }));
44
+ findings.push(...missingHeaders);
45
+ // 2. Information Disclosure: Server version
33
46
  const server = h['server'];
34
47
  if (server && /\/\d+\.\d+/.test(server)) {
35
48
  findings.push({
@@ -40,6 +53,7 @@ export async function doAuditHeaders(ctx, target) {
40
53
  match: server,
41
54
  });
42
55
  }
56
+ // 3. Information Disclosure: X-Powered-By
43
57
  const powered = h['x-powered-by'];
44
58
  if (powered) {
45
59
  findings.push({
@@ -52,15 +66,13 @@ export async function doAuditHeaders(ctx, target) {
52
66
  }
53
67
  return findings;
54
68
  }
69
+ /**
70
+ * Tests CORS configuration for common misconfigurations
71
+ */
55
72
  export async function doTestCORS(ctx, target) {
56
- const { host, port, https: useHttps } = resolveHostPort(target);
57
- await ctx.logger.info(`ActiveScan: CORS test → ${host}:${port}`);
58
- const findings = [];
59
- const check = await ctx.ctx.checkTarget(target);
60
- if (check.blocked) {
61
- ctx.audit(`BLOCKED CORS test ${target} — ${check.reason}`);
73
+ if (!await ensureTargetAllowed(ctx, target, 'CORS Test'))
62
74
  return [];
63
- }
75
+ const { host, port, https: useHttps } = resolveHostPort(target);
64
76
  const EVIL_ORIGIN = 'https://evil.attacker-example.com';
65
77
  let res;
66
78
  try {
@@ -69,9 +81,10 @@ export async function doTestCORS(ctx, target) {
69
81
  catch {
70
82
  return [];
71
83
  }
72
- ctx.audit(`CORS test ${host}:${port} — ACAO=${res.headers['access-control-allow-origin']}`);
73
84
  const acao = res.headers['access-control-allow-origin'];
74
85
  const acac = res.headers['access-control-allow-credentials'];
86
+ ctx.audit(`CORS Test ${host}:${port} — ACAO=${acao ?? 'none'}`);
87
+ const findings = [];
75
88
  if (acao === EVIL_ORIGIN) {
76
89
  findings.push({
77
90
  severity: 'high', cvss: 8.1,
@@ -81,7 +94,7 @@ export async function doTestCORS(ctx, target) {
81
94
  match: acao,
82
95
  });
83
96
  }
84
- if (acao === 'null') {
97
+ else if (acao === 'null') {
85
98
  findings.push({
86
99
  severity: 'high', cvss: 7.4,
87
100
  type: 'ActiveScan: CORS Null Origin Allowed',
@@ -101,37 +114,38 @@ export async function doTestCORS(ctx, target) {
101
114
  }
102
115
  return findings;
103
116
  }
117
+ /**
118
+ * Tests for dangerous HTTP methods allowed by the server
119
+ */
104
120
  export async function doTestDangerousMethods(ctx, target) {
105
- const { host, port, https: useHttps } = resolveHostPort(target);
106
- await ctx.logger.info(`ActiveScan: HTTP methods → ${host}:${port}`);
107
- const findings = [];
108
- const check = await ctx.ctx.checkTarget(target);
109
- if (check.blocked) {
110
- ctx.audit(`BLOCKED method test ${target} — ${check.reason}`);
121
+ if (!await ensureTargetAllowed(ctx, target, 'Methods Test'))
111
122
  return [];
112
- }
123
+ const { host, port, https: useHttps } = resolveHostPort(target);
113
124
  const DANGEROUS = [
114
125
  { method: 'TRACE', severity: 'medium', cvss: 4.8, reason: 'Cross-Site Tracing (XST) — can steal cookies/headers via JavaScript' },
115
126
  { method: 'PUT', severity: 'high', cvss: 7.5, reason: 'PUT method allowed — may permit arbitrary file upload' },
116
127
  { method: 'DELETE', severity: 'high', cvss: 7.5, reason: 'DELETE method allowed — may permit resource deletion' },
117
128
  { method: 'CONNECT', severity: 'medium', cvss: 5.8, reason: 'CONNECT method allowed — server may be used as HTTP proxy' },
118
129
  ];
119
- await Promise.all(DANGEROUS.map(async ({ method, severity, cvss, reason }) => {
130
+ const results = await Promise.all(DANGEROUS.map(async ({ method, severity, cvss, reason }) => {
120
131
  try {
121
132
  const res = await httpRequest({ host, port, path: '/', method }, useHttps);
122
133
  ctx.audit(`${method} ${host}:${port} — ${res.statusCode}`);
123
134
  if (res.statusCode !== 405 && res.statusCode !== 501 && res.statusCode !== 0) {
124
- findings.push({
135
+ return {
125
136
  severity,
126
137
  type: `ActiveScan: HTTP ${method} Method Allowed`,
127
138
  message: `${host} accepts HTTP ${method} requests (${res.statusCode}) — ${reason}`,
128
139
  recommendation: `Disable the ${method} method in your web server / API framework unless explicitly required.`,
129
140
  cvss,
130
141
  match: `${method} ${res.statusCode}`,
131
- });
142
+ };
132
143
  }
133
144
  }
134
- catch { /* host down or timeout */ }
145
+ catch {
146
+ // Quietly ignore network errors during method probe
147
+ }
148
+ return null;
135
149
  }));
136
- return findings;
150
+ return results.filter((f) => f !== null);
137
151
  }
@@ -1,7 +1,7 @@
1
1
  import type { Logger } from '../../../infrastructure/index.js';
2
2
  import type { PentestSecurityContext } from '../pentest-security-context.js';
3
- import type { SecurityFinding } from '../security/index.js';
4
- import type { ActiveCtx } from './context.js';
3
+ import type { SecurityFinding } from '../../../interfaces/index.js';
4
+ import type { ActiveCtx } from '../../../interfaces/active-analysis.js';
5
5
  export declare class ActiveScanner implements ActiveCtx {
6
6
  logger: Logger;
7
7
  ctx: PentestSecurityContext;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/application/analysis/active/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7C,qBAAa,aAAc,YAAW,SAAS;IAC7C,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,sBAAsB,CAAA;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAK;gBAEX,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,sBAAsB;IAKvD,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKlB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IASpC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IACrD,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IACxD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IACpD,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAE1D,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAoBnE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/application/analysis/active/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kCAAkC,CAAA;AAC9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAIvE,qBAAa,aAAc,YAAW,SAAS;IAC7C,MAAM,EAAE,MAAM,CAAA;IACd,GAAG,EAAE,sBAAsB,CAAA;IAC3B,QAAQ,EAAE,MAAM,EAAE,CAAK;gBAEX,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,sBAAsB;IAKvD,KAAK,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAKlB,aAAa,IAAI,OAAO,CAAC,IAAI,CAAC;IASpC,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IACrD,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IACxD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IACpD,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IACpD,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAE1D,gBAAgB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;CAoBnE"}
@@ -1,5 +1,11 @@
1
- import type { SecurityFinding } from '../security/index.js';
2
- import type { ActiveCtx } from './context.js';
1
+ import type { SecurityFinding } from '../../../interfaces/index.js';
2
+ import type { ActiveCtx } from '../../../interfaces/active-analysis.js';
3
+ /**
4
+ * Performs a stealthy port scan and generates security findings
5
+ */
3
6
  export declare function doScanPorts(ctx: ActiveCtx, target: string): Promise<SecurityFinding[]>;
7
+ /**
8
+ * Audits TLS certificate and protocol version
9
+ */
4
10
  export declare function doAuditTLS(ctx: ActiveCtx, target: string): Promise<SecurityFinding[]>;
5
11
  //# sourceMappingURL=network.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../../src/application/analysis/active/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAI7C,wBAAsB,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CA0C5F;AAED,wBAAsB,UAAU,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CA8D3F"}
1
+ {"version":3,"file":"network.d.ts","sourceRoot":"","sources":["../../../../src/application/analysis/active/network.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAA;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAA;AAoBvE;;GAEG;AACH,wBAAsB,WAAW,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CA6B5F;AAED;;GAEG;AACH,wBAAsB,UAAU,CAAC,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC,CAmE3F"}