kirograph 0.19.0 → 0.20.0

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 (658) hide show
  1. package/README.md +10 -8
  2. package/dist/architecture/layers/dart.d.ts +10 -0
  3. package/dist/architecture/layers/dart.d.ts.map +1 -0
  4. package/dist/architecture/layers/elixir.d.ts +6 -0
  5. package/dist/architecture/layers/elixir.d.ts.map +1 -0
  6. package/dist/architecture/layers/index.d.ts.map +1 -1
  7. package/dist/architecture/layers/ocaml.d.ts +6 -0
  8. package/dist/architecture/layers/ocaml.d.ts.map +1 -0
  9. package/dist/architecture/layers/scala.d.ts +6 -0
  10. package/dist/architecture/layers/scala.d.ts.map +1 -0
  11. package/dist/architecture/layers/solidity.d.ts +6 -0
  12. package/dist/architecture/layers/solidity.d.ts.map +1 -0
  13. package/dist/architecture/layers/vue.d.ts +6 -0
  14. package/dist/architecture/layers/vue.d.ts.map +1 -0
  15. package/dist/architecture/manifest/elm.d.ts +3 -0
  16. package/dist/architecture/manifest/elm.d.ts.map +1 -0
  17. package/dist/architecture/manifest/index.d.ts.map +1 -1
  18. package/dist/architecture/manifest/ocaml.d.ts +3 -0
  19. package/dist/architecture/manifest/ocaml.d.ts.map +1 -0
  20. package/dist/architecture/manifest/scala.d.ts +3 -0
  21. package/dist/architecture/manifest/scala.d.ts.map +1 -0
  22. package/dist/bin/banner.d.ts.map +1 -1
  23. package/dist/bin/commands/affected.d.ts.map +1 -1
  24. package/dist/bin/commands/attack-surface.d.ts +3 -0
  25. package/dist/bin/commands/attack-surface.d.ts.map +1 -0
  26. package/dist/bin/commands/attack-surface.js +7 -0
  27. package/dist/bin/commands/attack-surface.js.map +2 -2
  28. package/dist/bin/commands/benchmark.d.ts +9 -0
  29. package/dist/bin/commands/benchmark.d.ts.map +1 -0
  30. package/dist/bin/commands/budget.d.ts +6 -0
  31. package/dist/bin/commands/budget.d.ts.map +1 -0
  32. package/dist/bin/commands/caveman.d.ts +7 -0
  33. package/dist/bin/commands/caveman.d.ts.map +1 -0
  34. package/dist/bin/commands/communities.d.ts +3 -0
  35. package/dist/bin/commands/communities.d.ts.map +1 -0
  36. package/dist/bin/commands/compression.d.ts +7 -0
  37. package/dist/bin/commands/compression.d.ts.map +1 -0
  38. package/dist/bin/commands/context.d.ts.map +1 -1
  39. package/dist/bin/commands/data.d.ts +3 -0
  40. package/dist/bin/commands/data.d.ts.map +1 -0
  41. package/dist/bin/commands/dead-code.d.ts +3 -0
  42. package/dist/bin/commands/dead-code.d.ts.map +1 -0
  43. package/dist/bin/commands/dep-confusion.d.ts +3 -0
  44. package/dist/bin/commands/dep-confusion.d.ts.map +1 -0
  45. package/dist/bin/commands/docs.d.ts +3 -0
  46. package/dist/bin/commands/docs.d.ts.map +1 -0
  47. package/dist/bin/commands/exec.d.ts +11 -0
  48. package/dist/bin/commands/exec.d.ts.map +1 -0
  49. package/dist/bin/commands/export.d.ts +3 -0
  50. package/dist/bin/commands/export.d.ts.map +1 -0
  51. package/dist/bin/commands/flows.d.ts +3 -0
  52. package/dist/bin/commands/flows.d.ts.map +1 -0
  53. package/dist/bin/commands/gain.d.ts +6 -0
  54. package/dist/bin/commands/gain.d.ts.map +1 -0
  55. package/dist/bin/commands/help.d.ts +7 -0
  56. package/dist/bin/commands/help.d.ts.map +1 -1
  57. package/dist/bin/commands/help.js +20 -3
  58. package/dist/bin/commands/help.js.map +2 -2
  59. package/dist/bin/commands/hotspots.d.ts +3 -0
  60. package/dist/bin/commands/hotspots.d.ts.map +1 -0
  61. package/dist/bin/commands/hotspots.js +94 -1
  62. package/dist/bin/commands/hotspots.js.map +3 -3
  63. package/dist/bin/commands/install.d.ts.map +1 -1
  64. package/dist/bin/commands/install.js +3 -3
  65. package/dist/bin/commands/install.js.map +2 -2
  66. package/dist/bin/commands/licenses.d.ts +3 -0
  67. package/dist/bin/commands/licenses.d.ts.map +1 -0
  68. package/dist/bin/commands/memory.d.ts +16 -0
  69. package/dist/bin/commands/memory.d.ts.map +1 -0
  70. package/dist/bin/commands/memory.js +151 -4
  71. package/dist/bin/commands/memory.js.map +2 -2
  72. package/dist/bin/commands/path.d.ts +3 -0
  73. package/dist/bin/commands/path.d.ts.map +1 -0
  74. package/dist/bin/commands/pattern.d.ts +3 -0
  75. package/dist/bin/commands/pattern.d.ts.map +1 -0
  76. package/dist/bin/commands/pattern.js +592 -0
  77. package/dist/bin/commands/pattern.js.map +7 -0
  78. package/dist/bin/commands/query.d.ts.map +1 -1
  79. package/dist/bin/commands/reachability.d.ts +3 -0
  80. package/dist/bin/commands/reachability.d.ts.map +1 -0
  81. package/dist/bin/commands/read.d.ts +6 -0
  82. package/dist/bin/commands/read.d.ts.map +1 -0
  83. package/dist/bin/commands/refactor.d.ts +3 -0
  84. package/dist/bin/commands/refactor.d.ts.map +1 -0
  85. package/dist/bin/commands/remediation.d.ts +3 -0
  86. package/dist/bin/commands/remediation.d.ts.map +1 -0
  87. package/dist/bin/commands/sbom.d.ts +3 -0
  88. package/dist/bin/commands/sbom.d.ts.map +1 -0
  89. package/dist/bin/commands/security-ci-report.d.ts +9 -0
  90. package/dist/bin/commands/security-ci-report.d.ts.map +1 -0
  91. package/dist/bin/commands/security-export.d.ts +2 -0
  92. package/dist/bin/commands/security-export.d.ts.map +1 -0
  93. package/dist/bin/commands/security-flows.d.ts +3 -0
  94. package/dist/bin/commands/security-flows.d.ts.map +1 -0
  95. package/dist/bin/commands/security-secrets.d.ts +3 -0
  96. package/dist/bin/commands/security-secrets.d.ts.map +1 -0
  97. package/dist/bin/commands/security.d.ts +3 -0
  98. package/dist/bin/commands/security.d.ts.map +1 -0
  99. package/dist/bin/commands/security.js +15 -0
  100. package/dist/bin/commands/security.js.map +2 -2
  101. package/dist/bin/commands/snapshot.d.ts +3 -0
  102. package/dist/bin/commands/snapshot.d.ts.map +1 -0
  103. package/dist/bin/commands/staleness.d.ts +3 -0
  104. package/dist/bin/commands/staleness.d.ts.map +1 -0
  105. package/dist/bin/commands/status.d.ts.map +1 -1
  106. package/dist/bin/commands/status.js +27 -0
  107. package/dist/bin/commands/status.js.map +2 -2
  108. package/dist/bin/commands/supply-chain.d.ts +3 -0
  109. package/dist/bin/commands/supply-chain.d.ts.map +1 -0
  110. package/dist/bin/commands/surprising.d.ts +3 -0
  111. package/dist/bin/commands/surprising.d.ts.map +1 -0
  112. package/dist/bin/commands/sync.d.ts.map +1 -1
  113. package/dist/bin/commands/uninit.d.ts.map +1 -1
  114. package/dist/bin/commands/utils.d.ts +5 -0
  115. package/dist/bin/commands/utils.d.ts.map +1 -1
  116. package/dist/bin/commands/vex.d.ts +3 -0
  117. package/dist/bin/commands/vex.d.ts.map +1 -0
  118. package/dist/bin/commands/vuln-suppress.d.ts +3 -0
  119. package/dist/bin/commands/vuln-suppress.d.ts.map +1 -0
  120. package/dist/bin/commands/vulns.d.ts +3 -0
  121. package/dist/bin/commands/vulns.d.ts.map +1 -0
  122. package/dist/bin/installer/archive.d.ts +47 -0
  123. package/dist/bin/installer/archive.d.ts.map +1 -0
  124. package/dist/bin/installer/auto-detect.d.ts +16 -0
  125. package/dist/bin/installer/auto-detect.d.ts.map +1 -0
  126. package/dist/bin/installer/caveman.d.ts +12 -0
  127. package/dist/bin/installer/caveman.d.ts.map +1 -0
  128. package/dist/bin/installer/cli-agent.d.ts +7 -2
  129. package/dist/bin/installer/cli-agent.d.ts.map +1 -1
  130. package/dist/bin/installer/cli-agent.js +6 -2
  131. package/dist/bin/installer/cli-agent.js.map +2 -2
  132. package/dist/bin/installer/common.d.ts +36 -0
  133. package/dist/bin/installer/common.d.ts.map +1 -0
  134. package/dist/bin/installer/common.js +2 -1
  135. package/dist/bin/installer/common.js.map +2 -2
  136. package/dist/bin/installer/config-prompt.d.ts +1 -1
  137. package/dist/bin/installer/config-prompt.d.ts.map +1 -1
  138. package/dist/bin/installer/config-prompt.js +74 -2
  139. package/dist/bin/installer/config-prompt.js.map +2 -2
  140. package/dist/bin/installer/dashboard.d.ts.map +1 -1
  141. package/dist/bin/installer/detect.d.ts +30 -0
  142. package/dist/bin/installer/detect.d.ts.map +1 -0
  143. package/dist/bin/installer/hooks.d.ts +4 -1
  144. package/dist/bin/installer/hooks.d.ts.map +1 -1
  145. package/dist/bin/installer/hooks.js +34 -0
  146. package/dist/bin/installer/hooks.js.map +2 -2
  147. package/dist/bin/installer/index.d.ts +5 -4
  148. package/dist/bin/installer/index.d.ts.map +1 -1
  149. package/dist/bin/installer/index.js +38 -8
  150. package/dist/bin/installer/index.js.map +2 -2
  151. package/dist/bin/installer/instructions.d.ts +14 -0
  152. package/dist/bin/installer/instructions.d.ts.map +1 -0
  153. package/dist/bin/installer/instructions.js +15 -1
  154. package/dist/bin/installer/instructions.js.map +2 -2
  155. package/dist/bin/installer/mcp.d.ts.map +1 -1
  156. package/dist/bin/installer/prompts.d.ts +17 -0
  157. package/dist/bin/installer/prompts.d.ts.map +1 -1
  158. package/dist/bin/installer/qdrant-dashboard.d.ts.map +1 -1
  159. package/dist/bin/installer/steering.d.ts +14 -2
  160. package/dist/bin/installer/steering.d.ts.map +1 -1
  161. package/dist/bin/installer/steering.js +81 -0
  162. package/dist/bin/installer/steering.js.map +2 -2
  163. package/dist/bin/installer/targets/aider.d.ts +6 -0
  164. package/dist/bin/installer/targets/aider.d.ts.map +1 -0
  165. package/dist/bin/installer/targets/aider.js +3 -3
  166. package/dist/bin/installer/targets/aider.js.map +2 -2
  167. package/dist/bin/installer/targets/amp.d.ts +6 -0
  168. package/dist/bin/installer/targets/amp.d.ts.map +1 -0
  169. package/dist/bin/installer/targets/amp.js +3 -3
  170. package/dist/bin/installer/targets/amp.js.map +2 -2
  171. package/dist/bin/installer/targets/antigravity.d.ts +13 -0
  172. package/dist/bin/installer/targets/antigravity.d.ts.map +1 -0
  173. package/dist/bin/installer/targets/antigravity.js +2 -2
  174. package/dist/bin/installer/targets/antigravity.js.map +2 -2
  175. package/dist/bin/installer/targets/augment.d.ts +6 -0
  176. package/dist/bin/installer/targets/augment.d.ts.map +1 -0
  177. package/dist/bin/installer/targets/augment.js +3 -3
  178. package/dist/bin/installer/targets/augment.js.map +2 -2
  179. package/dist/bin/installer/targets/claude.d.ts +6 -0
  180. package/dist/bin/installer/targets/claude.d.ts.map +1 -0
  181. package/dist/bin/installer/targets/claude.js +2 -2
  182. package/dist/bin/installer/targets/claude.js.map +2 -2
  183. package/dist/bin/installer/targets/cline.d.ts +13 -0
  184. package/dist/bin/installer/targets/cline.d.ts.map +1 -0
  185. package/dist/bin/installer/targets/cline.js +2 -2
  186. package/dist/bin/installer/targets/cline.js.map +2 -2
  187. package/dist/bin/installer/targets/codex.d.ts +6 -0
  188. package/dist/bin/installer/targets/codex.d.ts.map +1 -0
  189. package/dist/bin/installer/targets/codex.js +2 -2
  190. package/dist/bin/installer/targets/codex.js.map +2 -2
  191. package/dist/bin/installer/targets/continue.d.ts +12 -0
  192. package/dist/bin/installer/targets/continue.d.ts.map +1 -0
  193. package/dist/bin/installer/targets/continue.js +2 -2
  194. package/dist/bin/installer/targets/continue.js.map +2 -2
  195. package/dist/bin/installer/targets/copilot-cli.d.ts +12 -0
  196. package/dist/bin/installer/targets/copilot-cli.d.ts.map +1 -0
  197. package/dist/bin/installer/targets/copilot-cli.js +2 -2
  198. package/dist/bin/installer/targets/copilot-cli.js.map +2 -2
  199. package/dist/bin/installer/targets/copilot.d.ts +6 -0
  200. package/dist/bin/installer/targets/copilot.d.ts.map +1 -0
  201. package/dist/bin/installer/targets/copilot.js +2 -2
  202. package/dist/bin/installer/targets/copilot.js.map +2 -2
  203. package/dist/bin/installer/targets/cursor.d.ts +6 -0
  204. package/dist/bin/installer/targets/cursor.d.ts.map +1 -0
  205. package/dist/bin/installer/targets/cursor.js +2 -2
  206. package/dist/bin/installer/targets/cursor.js.map +2 -2
  207. package/dist/bin/installer/targets/devin.d.ts +13 -0
  208. package/dist/bin/installer/targets/devin.d.ts.map +1 -0
  209. package/dist/bin/installer/targets/devin.js +2 -2
  210. package/dist/bin/installer/targets/devin.js.map +2 -2
  211. package/dist/bin/installer/targets/gemini-cli.d.ts +16 -0
  212. package/dist/bin/installer/targets/gemini-cli.d.ts.map +1 -0
  213. package/dist/bin/installer/targets/gemini-cli.js +2 -2
  214. package/dist/bin/installer/targets/gemini-cli.js.map +2 -2
  215. package/dist/bin/installer/targets/generic.d.ts +59 -0
  216. package/dist/bin/installer/targets/generic.d.ts.map +1 -0
  217. package/dist/bin/installer/targets/generic.js +2 -2
  218. package/dist/bin/installer/targets/generic.js.map +2 -2
  219. package/dist/bin/installer/targets/goose.d.ts +6 -0
  220. package/dist/bin/installer/targets/goose.d.ts.map +1 -0
  221. package/dist/bin/installer/targets/goose.js +3 -3
  222. package/dist/bin/installer/targets/goose.js.map +2 -2
  223. package/dist/bin/installer/targets/index.d.ts +11 -0
  224. package/dist/bin/installer/targets/index.d.ts.map +1 -0
  225. package/dist/bin/installer/targets/index.js.map +1 -1
  226. package/dist/bin/installer/targets/junie.d.ts +13 -0
  227. package/dist/bin/installer/targets/junie.d.ts.map +1 -0
  228. package/dist/bin/installer/targets/junie.js +2 -2
  229. package/dist/bin/installer/targets/junie.js.map +2 -2
  230. package/dist/bin/installer/targets/kilo.d.ts +12 -0
  231. package/dist/bin/installer/targets/kilo.d.ts.map +1 -0
  232. package/dist/bin/installer/targets/kilo.js +2 -2
  233. package/dist/bin/installer/targets/kilo.js.map +2 -2
  234. package/dist/bin/installer/targets/kiro.d.ts +5 -0
  235. package/dist/bin/installer/targets/kiro.d.ts.map +1 -0
  236. package/dist/bin/installer/targets/kiro.js +4 -4
  237. package/dist/bin/installer/targets/kiro.js.map +2 -2
  238. package/dist/bin/installer/targets/opencode.d.ts +13 -0
  239. package/dist/bin/installer/targets/opencode.d.ts.map +1 -0
  240. package/dist/bin/installer/targets/opencode.js +2 -2
  241. package/dist/bin/installer/targets/opencode.js.map +2 -2
  242. package/dist/bin/installer/targets/openhands.d.ts +6 -0
  243. package/dist/bin/installer/targets/openhands.d.ts.map +1 -0
  244. package/dist/bin/installer/targets/openhands.js +3 -3
  245. package/dist/bin/installer/targets/openhands.js.map +2 -2
  246. package/dist/bin/installer/targets/qoder.d.ts +12 -0
  247. package/dist/bin/installer/targets/qoder.d.ts.map +1 -0
  248. package/dist/bin/installer/targets/qoder.js +2 -2
  249. package/dist/bin/installer/targets/qoder.js.map +2 -2
  250. package/dist/bin/installer/targets/qwen.d.ts +12 -0
  251. package/dist/bin/installer/targets/qwen.d.ts.map +1 -0
  252. package/dist/bin/installer/targets/qwen.js +2 -2
  253. package/dist/bin/installer/targets/qwen.js.map +2 -2
  254. package/dist/bin/installer/targets/replit.d.ts +6 -0
  255. package/dist/bin/installer/targets/replit.d.ts.map +1 -0
  256. package/dist/bin/installer/targets/replit.js +3 -3
  257. package/dist/bin/installer/targets/replit.js.map +2 -2
  258. package/dist/bin/installer/targets/roo.d.ts +13 -0
  259. package/dist/bin/installer/targets/roo.d.ts.map +1 -0
  260. package/dist/bin/installer/targets/roo.js +2 -2
  261. package/dist/bin/installer/targets/roo.js.map +2 -2
  262. package/dist/bin/installer/targets/tabnine.d.ts +6 -0
  263. package/dist/bin/installer/targets/tabnine.d.ts.map +1 -0
  264. package/dist/bin/installer/targets/tabnine.js +3 -3
  265. package/dist/bin/installer/targets/tabnine.js.map +2 -2
  266. package/dist/bin/installer/targets/trae.d.ts +6 -0
  267. package/dist/bin/installer/targets/trae.d.ts.map +1 -0
  268. package/dist/bin/installer/targets/trae.js +3 -3
  269. package/dist/bin/installer/targets/trae.js.map +2 -2
  270. package/dist/bin/installer/targets/warp.d.ts +12 -0
  271. package/dist/bin/installer/targets/warp.d.ts.map +1 -0
  272. package/dist/bin/installer/targets/warp.js +2 -2
  273. package/dist/bin/installer/targets/warp.js.map +2 -2
  274. package/dist/bin/installer/targets/windsurf.d.ts +13 -0
  275. package/dist/bin/installer/targets/windsurf.d.ts.map +1 -0
  276. package/dist/bin/installer/targets/windsurf.js +2 -2
  277. package/dist/bin/installer/targets/windsurf.js.map +2 -2
  278. package/dist/bin/kirograph.js +3 -1
  279. package/dist/bin/kirograph.js.map +3 -3
  280. package/dist/bin/progress.d.ts +16 -1
  281. package/dist/bin/progress.d.ts.map +1 -1
  282. package/dist/compression/filters/aws.d.ts +9 -0
  283. package/dist/compression/filters/aws.d.ts.map +1 -0
  284. package/dist/compression/filters/docker.d.ts +6 -0
  285. package/dist/compression/filters/docker.d.ts.map +1 -0
  286. package/dist/compression/filters/files.d.ts +6 -0
  287. package/dist/compression/filters/files.d.ts.map +1 -0
  288. package/dist/compression/filters/generic.d.ts +7 -0
  289. package/dist/compression/filters/generic.d.ts.map +1 -0
  290. package/dist/compression/filters/git.d.ts +6 -0
  291. package/dist/compression/filters/git.d.ts.map +1 -0
  292. package/dist/compression/filters/github.d.ts +6 -0
  293. package/dist/compression/filters/github.d.ts.map +1 -0
  294. package/dist/compression/filters/lint.d.ts +6 -0
  295. package/dist/compression/filters/lint.d.ts.map +1 -0
  296. package/dist/compression/filters/misc.d.ts +6 -0
  297. package/dist/compression/filters/misc.d.ts.map +1 -0
  298. package/dist/compression/filters/package.d.ts +6 -0
  299. package/dist/compression/filters/package.d.ts.map +1 -0
  300. package/dist/compression/filters/test.d.ts +6 -0
  301. package/dist/compression/filters/test.d.ts.map +1 -0
  302. package/dist/compression/index.d.ts +29 -0
  303. package/dist/compression/index.d.ts.map +1 -0
  304. package/dist/compression/naive-cost.d.ts +26 -0
  305. package/dist/compression/naive-cost.d.ts.map +1 -0
  306. package/dist/compression/tracker.d.ts +155 -0
  307. package/dist/compression/tracker.d.ts.map +1 -0
  308. package/dist/compression/types.d.ts +49 -0
  309. package/dist/compression/types.d.ts.map +1 -0
  310. package/dist/config.d.ts +90 -0
  311. package/dist/config.d.ts.map +1 -1
  312. package/dist/config.js +55 -1
  313. package/dist/config.js.map +2 -2
  314. package/dist/core/lock-manager.d.ts +2 -0
  315. package/dist/core/lock-manager.d.ts.map +1 -1
  316. package/dist/core/pipeline.d.ts +4 -1
  317. package/dist/core/pipeline.d.ts.map +1 -1
  318. package/dist/core/pipeline.js +42 -0
  319. package/dist/core/pipeline.js.map +2 -2
  320. package/dist/core/snapshot.d.ts +58 -0
  321. package/dist/core/snapshot.d.ts.map +1 -0
  322. package/dist/data/filters.d.ts +23 -0
  323. package/dist/data/filters.d.ts.map +1 -0
  324. package/dist/data/indexer.d.ts +25 -0
  325. package/dist/data/indexer.d.ts.map +1 -0
  326. package/dist/data/linker.d.ts +37 -0
  327. package/dist/data/linker.d.ts.map +1 -0
  328. package/dist/data/lint.d.ts +27 -0
  329. package/dist/data/lint.d.ts.map +1 -0
  330. package/dist/data/parsers/csv.d.ts +11 -0
  331. package/dist/data/parsers/csv.d.ts.map +1 -0
  332. package/dist/data/parsers/excel.d.ts +10 -0
  333. package/dist/data/parsers/excel.d.ts.map +1 -0
  334. package/dist/data/parsers/index.d.ts +28 -0
  335. package/dist/data/parsers/index.d.ts.map +1 -0
  336. package/dist/data/parsers/json-array.d.ts +9 -0
  337. package/dist/data/parsers/json-array.d.ts.map +1 -0
  338. package/dist/data/parsers/jsonl.d.ts +9 -0
  339. package/dist/data/parsers/jsonl.d.ts.map +1 -0
  340. package/dist/data/parsers/parquet.d.ts +10 -0
  341. package/dist/data/parsers/parquet.d.ts.map +1 -0
  342. package/dist/data/profiler.d.ts +29 -0
  343. package/dist/data/profiler.d.ts.map +1 -0
  344. package/dist/data/queries.d.ts +95 -0
  345. package/dist/data/queries.d.ts.map +1 -0
  346. package/dist/data/types.d.ts +103 -0
  347. package/dist/data/types.d.ts.map +1 -0
  348. package/dist/db/database.d.ts +57 -0
  349. package/dist/db/database.d.ts.map +1 -1
  350. package/dist/db/database.js +19 -0
  351. package/dist/db/database.js.map +2 -2
  352. package/dist/db/patterns-schema.sql +23 -0
  353. package/dist/docs/formats/asciidoc.d.ts +9 -0
  354. package/dist/docs/formats/asciidoc.d.ts.map +1 -0
  355. package/dist/docs/formats/html.d.ts +10 -0
  356. package/dist/docs/formats/html.d.ts.map +1 -0
  357. package/dist/docs/formats/index.d.ts +31 -0
  358. package/dist/docs/formats/index.d.ts.map +1 -0
  359. package/dist/docs/formats/markdown.d.ts +11 -0
  360. package/dist/docs/formats/markdown.d.ts.map +1 -0
  361. package/dist/docs/formats/openapi.d.ts +17 -0
  362. package/dist/docs/formats/openapi.d.ts.map +1 -0
  363. package/dist/docs/formats/org.d.ts +9 -0
  364. package/dist/docs/formats/org.d.ts.map +1 -0
  365. package/dist/docs/formats/plaintext.d.ts +11 -0
  366. package/dist/docs/formats/plaintext.d.ts.map +1 -0
  367. package/dist/docs/formats/rdoc.d.ts +10 -0
  368. package/dist/docs/formats/rdoc.d.ts.map +1 -0
  369. package/dist/docs/formats/rst.d.ts +11 -0
  370. package/dist/docs/formats/rst.d.ts.map +1 -0
  371. package/dist/docs/indexer.d.ts +49 -0
  372. package/dist/docs/indexer.d.ts.map +1 -0
  373. package/dist/docs/linker.d.ts +30 -0
  374. package/dist/docs/linker.d.ts.map +1 -0
  375. package/dist/docs/lint.d.ts +27 -0
  376. package/dist/docs/lint.d.ts.map +1 -0
  377. package/dist/docs/queries.d.ts +78 -0
  378. package/dist/docs/queries.d.ts.map +1 -0
  379. package/dist/docs/section-id.d.ts +48 -0
  380. package/dist/docs/section-id.d.ts.map +1 -0
  381. package/dist/docs/summarizer.d.ts +13 -0
  382. package/dist/docs/summarizer.d.ts.map +1 -0
  383. package/dist/docs/types.d.ts +71 -0
  384. package/dist/docs/types.d.ts.map +1 -0
  385. package/dist/docs/vectors.d.ts +54 -0
  386. package/dist/docs/vectors.d.ts.map +1 -0
  387. package/dist/extraction/extractor.d.ts +1 -1
  388. package/dist/extraction/extractor.d.ts.map +1 -1
  389. package/dist/extraction/grammars.d.ts +6 -0
  390. package/dist/extraction/grammars.d.ts.map +1 -1
  391. package/dist/extraction/languages.d.ts.map +1 -1
  392. package/dist/extraction/notebook.d.ts +14 -0
  393. package/dist/extraction/notebook.d.ts.map +1 -0
  394. package/dist/frameworks/amplify.d.ts +9 -0
  395. package/dist/frameworks/amplify.d.ts.map +1 -0
  396. package/dist/frameworks/angular.d.ts +9 -0
  397. package/dist/frameworks/angular.d.ts.map +1 -0
  398. package/dist/frameworks/ansible.d.ts +8 -0
  399. package/dist/frameworks/ansible.d.ts.map +1 -0
  400. package/dist/frameworks/cloudformation.d.ts +9 -0
  401. package/dist/frameworks/cloudformation.d.ts.map +1 -0
  402. package/dist/frameworks/docker.d.ts +9 -0
  403. package/dist/frameworks/docker.d.ts.map +1 -0
  404. package/dist/frameworks/elixir.d.ts +6 -0
  405. package/dist/frameworks/elixir.d.ts.map +1 -0
  406. package/dist/frameworks/flutter.d.ts +12 -0
  407. package/dist/frameworks/flutter.d.ts.map +1 -0
  408. package/dist/frameworks/iac.d.ts +10 -0
  409. package/dist/frameworks/iac.d.ts.map +1 -0
  410. package/dist/frameworks/index.d.ts +14 -0
  411. package/dist/frameworks/index.d.ts.map +1 -1
  412. package/dist/frameworks/kubernetes.d.ts +9 -0
  413. package/dist/frameworks/kubernetes.d.ts.map +1 -0
  414. package/dist/frameworks/pulumi.d.ts +9 -0
  415. package/dist/frameworks/pulumi.d.ts.map +1 -0
  416. package/dist/frameworks/scala.d.ts +6 -0
  417. package/dist/frameworks/scala.d.ts.map +1 -0
  418. package/dist/frameworks/solidity.d.ts +6 -0
  419. package/dist/frameworks/solidity.d.ts.map +1 -0
  420. package/dist/frameworks/terraform.d.ts +14 -0
  421. package/dist/frameworks/terraform.d.ts.map +1 -0
  422. package/dist/frameworks/vue.d.ts +7 -0
  423. package/dist/frameworks/vue.d.ts.map +1 -0
  424. package/dist/graph/communities.d.ts +43 -0
  425. package/dist/graph/communities.d.ts.map +1 -0
  426. package/dist/graph/flows.d.ts +55 -0
  427. package/dist/graph/flows.d.ts.map +1 -0
  428. package/dist/graph/refactor.d.ts +43 -0
  429. package/dist/graph/refactor.d.ts.map +1 -0
  430. package/dist/index.d.ts +36 -4
  431. package/dist/index.d.ts.map +1 -1
  432. package/dist/mcp/cache.d.ts +69 -0
  433. package/dist/mcp/cache.d.ts.map +1 -0
  434. package/dist/mcp/read-modes.d.ts +31 -0
  435. package/dist/mcp/read-modes.d.ts.map +1 -0
  436. package/dist/mcp/server.d.ts +1 -0
  437. package/dist/mcp/server.d.ts.map +1 -1
  438. package/dist/mcp/server.js +15 -2
  439. package/dist/mcp/server.js.map +2 -2
  440. package/dist/mcp/tool-names.d.ts +2 -0
  441. package/dist/mcp/tool-names.d.ts.map +1 -0
  442. package/dist/mcp/tool-names.js +4 -1
  443. package/dist/mcp/tool-names.js.map +2 -2
  444. package/dist/mcp/tools.d.ts +12 -0
  445. package/dist/mcp/tools.d.ts.map +1 -1
  446. package/dist/mcp/tools.js +397 -0
  447. package/dist/mcp/tools.js.map +2 -2
  448. package/dist/memory/compress.d.ts +19 -0
  449. package/dist/memory/compress.d.ts.map +1 -0
  450. package/dist/memory/database.d.ts +92 -0
  451. package/dist/memory/database.d.ts.map +1 -0
  452. package/dist/memory/database.js +38 -0
  453. package/dist/memory/database.js.map +2 -2
  454. package/dist/memory/index.d.ts +71 -0
  455. package/dist/memory/index.d.ts.map +1 -0
  456. package/dist/memory/index.js +12 -2
  457. package/dist/memory/index.js.map +2 -2
  458. package/dist/memory/symbols.d.ts +21 -0
  459. package/dist/memory/symbols.d.ts.map +1 -0
  460. package/dist/memory/types.d.ts +78 -0
  461. package/dist/memory/types.d.ts.map +1 -0
  462. package/dist/memory/types.js.map +1 -1
  463. package/dist/memory/vectors.d.ts +43 -0
  464. package/dist/memory/vectors.d.ts.map +1 -0
  465. package/dist/patterns/graph.d.ts +16 -0
  466. package/dist/patterns/graph.d.ts.map +1 -0
  467. package/dist/patterns/graph.js +45 -0
  468. package/dist/patterns/graph.js.map +7 -0
  469. package/dist/patterns/index.d.ts +4 -0
  470. package/dist/patterns/index.d.ts.map +1 -0
  471. package/dist/patterns/index.js +39 -0
  472. package/dist/patterns/index.js.map +7 -0
  473. package/dist/patterns/indexer.d.ts +15 -0
  474. package/dist/patterns/indexer.d.ts.map +1 -0
  475. package/dist/patterns/indexer.js +97 -0
  476. package/dist/patterns/indexer.js.map +7 -0
  477. package/dist/patterns/library/command-injection-go.yaml +11 -0
  478. package/dist/patterns/library/dangerous-eval-js.yaml +14 -0
  479. package/dist/patterns/library/dangerous-exec-py.yaml +13 -0
  480. package/dist/patterns/library/dangerous-reflection-java.yaml +8 -0
  481. package/dist/patterns/library/path-traversal-go.yaml +11 -0
  482. package/dist/patterns/library/path-traversal-py.yaml +12 -0
  483. package/dist/patterns/library/path-traversal-readfile-js.yaml +14 -0
  484. package/dist/patterns/library/prototype-pollution-js.yaml +12 -0
  485. package/dist/patterns/library/sql-injection-concat-js.yaml +12 -0
  486. package/dist/patterns/library/sql-injection-java.yaml +13 -0
  487. package/dist/patterns/library/sql-injection-py.yaml +12 -0
  488. package/dist/patterns/library/sql-injection-template-js.yaml +13 -0
  489. package/dist/patterns/library/weak-crypto-md5-js.yaml +13 -0
  490. package/dist/patterns/library/weak-crypto-py.yaml +13 -0
  491. package/dist/patterns/loader.d.ts +18 -0
  492. package/dist/patterns/loader.d.ts.map +1 -0
  493. package/dist/patterns/loader.js +277 -0
  494. package/dist/patterns/loader.js.map +7 -0
  495. package/dist/patterns/runner.d.ts +42 -0
  496. package/dist/patterns/runner.d.ts.map +1 -0
  497. package/dist/patterns/runner.js +277 -0
  498. package/dist/patterns/runner.js.map +7 -0
  499. package/dist/patterns/types.d.ts +27 -0
  500. package/dist/patterns/types.d.ts.map +1 -0
  501. package/dist/patterns/types.js +34 -0
  502. package/dist/patterns/types.js.map +7 -0
  503. package/dist/resolution/bridges/android-rn.d.ts +13 -0
  504. package/dist/resolution/bridges/android-rn.d.ts.map +1 -0
  505. package/dist/resolution/bridges/expo-modules.d.ts +10 -0
  506. package/dist/resolution/bridges/expo-modules.d.ts.map +1 -0
  507. package/dist/resolution/bridges/flutter-channel.d.ts +14 -0
  508. package/dist/resolution/bridges/flutter-channel.d.ts.map +1 -0
  509. package/dist/resolution/bridges/index.d.ts +40 -0
  510. package/dist/resolution/bridges/index.d.ts.map +1 -0
  511. package/dist/resolution/bridges/native-events.d.ts +10 -0
  512. package/dist/resolution/bridges/native-events.d.ts.map +1 -0
  513. package/dist/resolution/bridges/native-views.d.ts +13 -0
  514. package/dist/resolution/bridges/native-views.d.ts.map +1 -0
  515. package/dist/resolution/bridges/react-native.d.ts +9 -0
  516. package/dist/resolution/bridges/react-native.d.ts.map +1 -0
  517. package/dist/resolution/bridges/swift-objc.d.ts +14 -0
  518. package/dist/resolution/bridges/swift-objc.d.ts.map +1 -0
  519. package/dist/resolution/bridges/turbomodules.d.ts +10 -0
  520. package/dist/resolution/bridges/turbomodules.d.ts.map +1 -0
  521. package/dist/resolution/index.d.ts +28 -3
  522. package/dist/resolution/index.d.ts.map +1 -1
  523. package/dist/security/attack-surface.d.ts +46 -0
  524. package/dist/security/attack-surface.d.ts.map +1 -0
  525. package/dist/security/attack-surface.js +43 -1
  526. package/dist/security/attack-surface.js.map +2 -2
  527. package/dist/security/context-warnings.d.ts +40 -0
  528. package/dist/security/context-warnings.d.ts.map +1 -0
  529. package/dist/security/data-flows.d.ts +33 -0
  530. package/dist/security/data-flows.d.ts.map +1 -0
  531. package/dist/security/data-flows.js +65 -7
  532. package/dist/security/data-flows.js.map +2 -2
  533. package/dist/security/dep-confusion.d.ts +23 -0
  534. package/dist/security/dep-confusion.d.ts.map +1 -0
  535. package/dist/security/errors.d.ts +16 -0
  536. package/dist/security/errors.d.ts.map +1 -0
  537. package/dist/security/export/fix-suggestions.d.ts +21 -0
  538. package/dist/security/export/fix-suggestions.d.ts.map +1 -0
  539. package/dist/security/export/sbom.d.ts +33 -0
  540. package/dist/security/export/sbom.d.ts.map +1 -0
  541. package/dist/security/export/serialization.d.ts +62 -0
  542. package/dist/security/export/serialization.d.ts.map +1 -0
  543. package/dist/security/export/vex.d.ts +58 -0
  544. package/dist/security/export/vex.d.ts.map +1 -0
  545. package/dist/security/index.d.ts +21 -0
  546. package/dist/security/index.d.ts.map +1 -0
  547. package/dist/security/integrator.d.ts +63 -0
  548. package/dist/security/integrator.d.ts.map +1 -0
  549. package/dist/security/license.d.ts +33 -0
  550. package/dist/security/license.d.ts.map +1 -0
  551. package/dist/security/manifest/adapter.d.ts +92 -0
  552. package/dist/security/manifest/adapter.d.ts.map +1 -0
  553. package/dist/security/manifest/parser.d.ts +73 -0
  554. package/dist/security/manifest/parser.d.ts.map +1 -0
  555. package/dist/security/manifest/plugins/cargo.d.ts +11 -0
  556. package/dist/security/manifest/plugins/cargo.d.ts.map +1 -0
  557. package/dist/security/manifest/plugins/composer.d.ts +11 -0
  558. package/dist/security/manifest/plugins/composer.d.ts.map +1 -0
  559. package/dist/security/manifest/plugins/go.d.ts +12 -0
  560. package/dist/security/manifest/plugins/go.d.ts.map +1 -0
  561. package/dist/security/manifest/plugins/gradle.d.ts +12 -0
  562. package/dist/security/manifest/plugins/gradle.d.ts.map +1 -0
  563. package/dist/security/manifest/plugins/hex.d.ts +11 -0
  564. package/dist/security/manifest/plugins/hex.d.ts.map +1 -0
  565. package/dist/security/manifest/plugins/maven.d.ts +11 -0
  566. package/dist/security/manifest/plugins/maven.d.ts.map +1 -0
  567. package/dist/security/manifest/plugins/npm.d.ts +11 -0
  568. package/dist/security/manifest/plugins/npm.d.ts.map +1 -0
  569. package/dist/security/manifest/plugins/nuget.d.ts +12 -0
  570. package/dist/security/manifest/plugins/nuget.d.ts.map +1 -0
  571. package/dist/security/manifest/plugins/pip.d.ts +11 -0
  572. package/dist/security/manifest/plugins/pip.d.ts.map +1 -0
  573. package/dist/security/manifest/plugins/pubspec.d.ts +11 -0
  574. package/dist/security/manifest/plugins/pubspec.d.ts.map +1 -0
  575. package/dist/security/manifest/plugins/pyproject.d.ts +3 -0
  576. package/dist/security/manifest/plugins/pyproject.d.ts.map +1 -0
  577. package/dist/security/manifest/plugins/rubygems.d.ts +11 -0
  578. package/dist/security/manifest/plugins/rubygems.d.ts.map +1 -0
  579. package/dist/security/manifest/plugins/swift.d.ts +11 -0
  580. package/dist/security/manifest/plugins/swift.d.ts.map +1 -0
  581. package/dist/security/owasp.d.ts +16 -0
  582. package/dist/security/owasp.d.ts.map +1 -0
  583. package/dist/security/pipeline.d.ts +37 -0
  584. package/dist/security/pipeline.d.ts.map +1 -0
  585. package/dist/security/reachability.d.ts +67 -0
  586. package/dist/security/reachability.d.ts.map +1 -0
  587. package/dist/security/remediation.d.ts +51 -0
  588. package/dist/security/remediation.d.ts.map +1 -0
  589. package/dist/security/secrets.d.ts +38 -0
  590. package/dist/security/secrets.d.ts.map +1 -0
  591. package/dist/security/staleness.d.ts +43 -0
  592. package/dist/security/staleness.d.ts.map +1 -0
  593. package/dist/security/supply-chain.d.ts +34 -0
  594. package/dist/security/supply-chain.d.ts.map +1 -0
  595. package/dist/security/suppressions.d.ts +18 -0
  596. package/dist/security/suppressions.d.ts.map +1 -0
  597. package/dist/security/types.d.ts +144 -0
  598. package/dist/security/types.d.ts.map +1 -0
  599. package/dist/security/vuln/client.d.ts +90 -0
  600. package/dist/security/vuln/client.d.ts.map +1 -0
  601. package/dist/security/vuln/client.js.map +2 -2
  602. package/dist/security/vuln/epss-client.d.ts +26 -0
  603. package/dist/security/vuln/epss-client.d.ts.map +1 -0
  604. package/dist/security/vuln/index.d.ts +6 -0
  605. package/dist/security/vuln/index.d.ts.map +1 -0
  606. package/dist/security/vuln/osv-adapter.d.ts +58 -0
  607. package/dist/security/vuln/osv-adapter.d.ts.map +1 -0
  608. package/dist/security/vuln/types.d.ts +29 -0
  609. package/dist/security/vuln/types.d.ts.map +1 -0
  610. package/dist/sync/index.d.ts +4 -2
  611. package/dist/sync/index.d.ts.map +1 -1
  612. package/dist/types.d.ts +10 -4
  613. package/dist/types.d.ts.map +1 -1
  614. package/dist/types.js.map +1 -1
  615. package/dist/vectors/index.d.ts +11 -3
  616. package/dist/vectors/index.d.ts.map +1 -1
  617. package/dist/vectors/qdrant-index.d.ts +10 -3
  618. package/dist/vectors/qdrant-index.d.ts.map +1 -1
  619. package/dist/vectors/typesense-index.d.ts.map +1 -1
  620. package/dist/watchmen/index.js +83 -0
  621. package/dist/watchmen/index.js.map +7 -0
  622. package/dist/watchmen/synthesize.js +475 -0
  623. package/dist/watchmen/synthesize.js.map +7 -0
  624. package/package.json +5 -2
  625. package/dist/security/context-warnings.test.js +0 -300
  626. package/dist/security/context-warnings.test.js.map +0 -7
  627. package/dist/security/export/fix-suggestions.test.js +0 -74
  628. package/dist/security/export/fix-suggestions.test.js.map +0 -7
  629. package/dist/security/export/sbom.test.js +0 -288
  630. package/dist/security/export/sbom.test.js.map +0 -7
  631. package/dist/security/export/serialization.test.js +0 -310
  632. package/dist/security/export/serialization.test.js.map +0 -7
  633. package/dist/security/export/vex.test.js +0 -278
  634. package/dist/security/export/vex.test.js.map +0 -7
  635. package/dist/security/integrator-transitives.test.js +0 -359
  636. package/dist/security/integrator-transitives.test.js.map +0 -7
  637. package/dist/security/integrator.test.js +0 -237
  638. package/dist/security/integrator.test.js.map +0 -7
  639. package/dist/security/manifest/adapter.test.js +0 -272
  640. package/dist/security/manifest/adapter.test.js.map +0 -7
  641. package/dist/security/manifest/parser.test.js +0 -110
  642. package/dist/security/manifest/parser.test.js.map +0 -7
  643. package/dist/security/manifest/plugins/cargo.test.js +0 -304
  644. package/dist/security/manifest/plugins/cargo.test.js.map +0 -7
  645. package/dist/security/manifest/plugins/go.test.js +0 -341
  646. package/dist/security/manifest/plugins/go.test.js.map +0 -7
  647. package/dist/security/manifest/plugins/maven.test.js +0 -389
  648. package/dist/security/manifest/plugins/maven.test.js.map +0 -7
  649. package/dist/security/manifest/plugins/npm.test.js +0 -298
  650. package/dist/security/manifest/plugins/npm.test.js.map +0 -7
  651. package/dist/security/manifest/plugins/pip.test.js +0 -208
  652. package/dist/security/manifest/plugins/pip.test.js.map +0 -7
  653. package/dist/security/reachability.test.js +0 -394
  654. package/dist/security/reachability.test.js.map +0 -7
  655. package/dist/security/vuln/client.test.js +0 -288
  656. package/dist/security/vuln/client.test.js.map +0 -7
  657. package/dist/security/vuln/osv-adapter.test.js +0 -391
  658. package/dist/security/vuln/osv-adapter.test.js.map +0 -7
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/memory/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAID,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,MAAM,CAAC;AACrG,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAE5D,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,eAAe,CAAC;IACtB,MAAM,EAAE,iBAAiB,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,iEAAiE;IACjE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8EAA8E;IAC9E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sDAAsD;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,CAAC;CACpE;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;CACjB;AAID,MAAM,WAAW,OAAO;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACnB;AAID,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,cAAc,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,WAAW,EAAE,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;CAC1C;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yEAAyE;IACzE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mGAAmG;IACnG,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAID,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAID,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B"}
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/memory/types.ts"],
4
- "sourcesContent": ["/**\n * KiroGraph Memory \u2014 Type definitions\n */\n\n// \u2500\u2500 Session \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface MemSession {\n id: string;\n ide?: string;\n cwd?: string;\n startedAt: number;\n endedAt?: number;\n}\n\n// \u2500\u2500 Observation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type ObservationKind = 'decision' | 'error' | 'pattern' | 'architecture' | 'summary' | 'note';\nexport type ObservationSource = 'hook' | 'manual' | 'agent';\n\nexport interface MemObservation {\n id: string;\n sessionId?: string;\n content: string;\n contentRaw?: string;\n contentHash: string;\n kind: ObservationKind;\n source: ObservationSource;\n tags?: string[];\n createdAt: number;\n /** Temporal validity: when this fact became valid (epoch ms). */\n validFrom?: number;\n /** Temporal validity: when this fact expires (epoch ms). Null = no expiry. */\n validUntil?: number;\n /** ID of the observation that supersedes this one. */\n supersededBy?: string;\n /** Fact type for temporal classification. */\n factType?: 'observation' | 'decision' | 'procedure' | 'constraint';\n}\n\nexport interface MemObservationInput {\n content: string;\n kind?: ObservationKind;\n source?: ObservationSource;\n tags?: string[];\n}\n\n// \u2500\u2500 Links \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface MemLink {\n observationId: string;\n qualifiedName: string;\n relevance: number;\n}\n\n// \u2500\u2500 Search \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface ScoredObservation {\n observation: MemObservation;\n score: number;\n /** Source of the score: 'fts', 'vector', or 'hybrid' */\n scoreSource: 'fts' | 'vector' | 'hybrid';\n}\n\nexport interface MemSearchOptions {\n limit?: number;\n kind?: ObservationKind;\n sessionId?: string;\n /** FTS/vector blend: 0 = FTS only, 1 = vector only, 0.5 = equal blend */\n alpha?: number;\n /** Query facts valid at this timestamp (epoch ms). Filters out expired/superseded observations. */\n asOf?: number;\n}\n\nexport interface MemTimelineOptions {\n limit?: number;\n sessionId?: string;\n}\n\n// \u2500\u2500 Stats \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface MemStats {\n sessions: number;\n activeSessions: number;\n observations: number;\n links: number;\n vectors: number;\n embeddableCount: number;\n modelMismatch: boolean;\n currentModel?: string;\n}\n\n// \u2500\u2500 Compress \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface CompressResult {\n compressed: string;\n originalLength: number;\n compressedLength: number;\n detectedSymbols: string[];\n}\n"],
4
+ "sourcesContent": ["/**\n * KiroGraph Memory \u2014 Type definitions\n */\n\n// \u2500\u2500 Session \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface MemSession {\n id: string;\n ide?: string;\n cwd?: string;\n startedAt: number;\n endedAt?: number;\n}\n\n// \u2500\u2500 Observation \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport type ObservationKind = 'decision' | 'error' | 'pattern' | 'architecture' | 'summary' | 'note';\nexport type ObservationSource = 'hook' | 'manual' | 'agent';\n\nexport interface MemObservation {\n id: string;\n sessionId?: string;\n content: string;\n contentRaw?: string;\n contentHash: string;\n kind: ObservationKind;\n source: ObservationSource;\n tags?: string[];\n createdAt: number;\n /** Temporal validity: when this fact became valid (epoch ms). */\n validFrom?: number;\n /** Temporal validity: when this fact expires (epoch ms). Null = no expiry. */\n validUntil?: number;\n /** ID of the observation that supersedes this one. */\n supersededBy?: string;\n /** Fact type for temporal classification. */\n factType?: 'observation' | 'decision' | 'procedure' | 'constraint';\n}\n\nexport interface MemObservationInput {\n content: string;\n kind?: ObservationKind;\n source?: ObservationSource;\n tags?: string[];\n}\n\n// \u2500\u2500 Links \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface MemLink {\n observationId: string;\n qualifiedName: string;\n relevance: number;\n}\n\n// \u2500\u2500 Search \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface ScoredObservation {\n observation: MemObservation;\n score: number;\n /** Source of the score: 'fts', 'vector', or 'hybrid' */\n scoreSource: 'fts' | 'vector' | 'hybrid';\n}\n\nexport interface MemSearchOptions {\n limit?: number;\n kind?: ObservationKind;\n sessionId?: string;\n /** FTS/vector blend: 0 = FTS only, 1 = vector only, 0.5 = equal blend */\n alpha?: number;\n /** Query facts valid at this timestamp (epoch ms). Filters out expired/superseded observations. */\n asOf?: number;\n}\n\nexport interface MemTimelineOptions {\n limit?: number;\n sessionId?: string;\n}\n\n// \u2500\u2500 Stats \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface MemStats {\n sessions: number;\n activeSessions: number;\n observations: number;\n links: number;\n vectors: number;\n embeddableCount: number;\n modelMismatch: boolean;\n currentModel?: string;\n}\n\n// \u2500\u2500 Watchmen \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface WatchmenReadyResult {\n id: string;\n watchmenReady: true;\n pendingCount: number;\n /** Synthesis instructions for the active agent. */\n message: string;\n /** Project-relative paths to write the workspace brief to. */\n targetFiles: string[];\n /**\n * Present when Kiro is detected (.kiro/ exists). Path to the steering\n * directory where individual skill files should be written as separate\n * `inclusion: manual` files (e.g. `.kiro/steering/watchmen-<slug>.md`).\n * Absent for all other tools \u2014 embed procedures in the brief instead.\n */\n skillTargetDir?: string;\n}\n\n// \u2500\u2500 Compress \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n\nexport interface CompressResult {\n compressed: string;\n originalLength: number;\n compressedLength: number;\n detectedSymbols: string[];\n}\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * KiroGraph Memory — Vector embedding and search
3
+ *
4
+ * Reuses the same embedding model and semantic engine as the code graph,
5
+ * but operates on mem_vectors table independently.
6
+ */
7
+ import type { KiroGraphConfig } from '../config';
8
+ import type { MemObservation, ScoredObservation } from './types';
9
+ import type { MemoryDatabase } from './database';
10
+ export declare class MemoryVectorManager {
11
+ private config;
12
+ private memDb;
13
+ private modelName;
14
+ private cacheDir;
15
+ constructor(config: KiroGraphConfig, memDb: MemoryDatabase);
16
+ /**
17
+ * Check if embeddings are enabled in config.
18
+ */
19
+ isEnabled(): boolean;
20
+ /**
21
+ * Embed a single observation and store in mem_vectors.
22
+ */
23
+ embedObservation(obs: MemObservation): Promise<void>;
24
+ /**
25
+ * Embed multiple observations in batch.
26
+ */
27
+ embedBatch(observations: MemObservation[]): Promise<number>;
28
+ /**
29
+ * Vector search over memory observations.
30
+ * Falls back to empty results if embeddings are disabled or model mismatches.
31
+ */
32
+ search(query: string, limit?: number): Promise<ScoredObservation[]>;
33
+ /**
34
+ * Check if there are vectors with a mismatched model.
35
+ */
36
+ hasModelMismatch(): boolean;
37
+ /**
38
+ * Re-embed all observations with the current model.
39
+ */
40
+ reembed(batchSize?: number): Promise<number>;
41
+ private embed;
42
+ }
43
+ //# sourceMappingURL=vectors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vectors.d.ts","sourceRoot":"","sources":["../../src/memory/vectors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAyDjD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,MAAM,CAAkB;IAChC,OAAO,CAAC,KAAK,CAAiB;IAC9B,OAAO,CAAC,SAAS,CAAS;IAC1B,OAAO,CAAC,QAAQ,CAAS;gBAEb,MAAM,EAAE,eAAe,EAAE,KAAK,EAAE,cAAc;IAU1D;;OAEG;IACH,SAAS,IAAI,OAAO;IAIpB;;OAEG;IACG,gBAAgB,CAAC,GAAG,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAe1D;;OAEG;IACG,UAAU,CAAC,YAAY,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAejE;;;OAGG;IACG,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,SAAK,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC;IAuCrE;;OAEG;IACH,gBAAgB,IAAI,OAAO;IAI3B;;OAEG;IACG,OAAO,CAAC,SAAS,SAAK,GAAG,OAAO,CAAC,MAAM,CAAC;YA8BhC,KAAK;CAUpB"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * KiroGraph Patterns — graph-level helpers for pattern match analysis.
3
+ */
4
+ /**
5
+ * Find all symbol node IDs that have pattern matches, along with caller nodes.
6
+ * Useful for "who calls code with SQL injection patterns?"
7
+ */
8
+ export declare function findCallersOfPatternMatches(rawDb: any, patternIdFilter?: string): Array<{
9
+ symbolNodeId: string;
10
+ symbolName: string;
11
+ filePath: string;
12
+ patternId: string;
13
+ callerNodeId: string;
14
+ callerName: string;
15
+ }>;
16
+ //# sourceMappingURL=graph.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graph.d.ts","sourceRoot":"","sources":["../../src/patterns/graph.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,KAAK,EAAE,GAAG,EACV,eAAe,CAAC,EAAE,MAAM,GACvB,KAAK,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAiBpI"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var graph_exports = {};
20
+ __export(graph_exports, {
21
+ findCallersOfPatternMatches: () => findCallersOfPatternMatches
22
+ });
23
+ module.exports = __toCommonJS(graph_exports);
24
+ function findCallersOfPatternMatches(rawDb, patternIdFilter) {
25
+ const patternClause = patternIdFilter ? `AND pm.pattern_id LIKE ?` : "";
26
+ const params = patternIdFilter ? [`${patternIdFilter}%`] : [];
27
+ return rawDb.all(`
28
+ SELECT DISTINCT
29
+ pm.symbol_node_id, n.name as symbol_name, n.file_path,
30
+ pm.pattern_id,
31
+ e.source as caller_node_id, nc.name as caller_name
32
+ FROM pattern_matches pm
33
+ JOIN nodes n ON n.id = pm.symbol_node_id
34
+ JOIN edges e ON e.target = pm.symbol_node_id AND e.kind = 'calls'
35
+ JOIN nodes nc ON nc.id = e.source
36
+ WHERE pm.symbol_node_id IS NOT NULL
37
+ ${patternClause}
38
+ LIMIT 100
39
+ `, params);
40
+ }
41
+ // Annotate the CommonJS export names for ESM import in node:
42
+ 0 && (module.exports = {
43
+ findCallersOfPatternMatches
44
+ });
45
+ //# sourceMappingURL=graph.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/patterns/graph.ts"],
4
+ "sourcesContent": ["/**\n * KiroGraph Patterns \u2014 graph-level helpers for pattern match analysis.\n */\n\n/**\n * Find all symbol node IDs that have pattern matches, along with caller nodes.\n * Useful for \"who calls code with SQL injection patterns?\"\n */\nexport function findCallersOfPatternMatches(\n rawDb: any,\n patternIdFilter?: string // e.g. 'sql-injection' prefix match\n): Array<{ symbolNodeId: string; symbolName: string; filePath: string; patternId: string; callerNodeId: string; callerName: string }> {\n const patternClause = patternIdFilter ? `AND pm.pattern_id LIKE ?` : '';\n const params: any[] = patternIdFilter ? [`${patternIdFilter}%`] : [];\n\n return rawDb.all(`\n SELECT DISTINCT\n pm.symbol_node_id, n.name as symbol_name, n.file_path,\n pm.pattern_id,\n e.source as caller_node_id, nc.name as caller_name\n FROM pattern_matches pm\n JOIN nodes n ON n.id = pm.symbol_node_id\n JOIN edges e ON e.target = pm.symbol_node_id AND e.kind = 'calls'\n JOIN nodes nc ON nc.id = e.source\n WHERE pm.symbol_node_id IS NOT NULL\n ${patternClause}\n LIMIT 100\n `, params);\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,SAAS,4BACd,OACA,iBACoI;AACpI,QAAM,gBAAgB,kBAAkB,6BAA6B;AACrE,QAAM,SAAgB,kBAAkB,CAAC,GAAG,eAAe,GAAG,IAAI,CAAC;AAEnE,SAAO,MAAM,IAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAUb,aAAa;AAAA;AAAA,KAEd,MAAM;AACX;",
6
+ "names": []
7
+ }
@@ -0,0 +1,4 @@
1
+ export { PatternRule, PatternMatch, SEVERITY_ORDER } from './types';
2
+ export { PatternRunner } from './runner';
3
+ export { PatternLibraryLoader } from './loader';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patterns/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var patterns_exports = {};
20
+ __export(patterns_exports, {
21
+ PatternLibraryLoader: () => import_loader.PatternLibraryLoader,
22
+ PatternMatch: () => import_types.PatternMatch,
23
+ PatternRule: () => import_types.PatternRule,
24
+ PatternRunner: () => import_runner.PatternRunner,
25
+ SEVERITY_ORDER: () => import_types.SEVERITY_ORDER
26
+ });
27
+ module.exports = __toCommonJS(patterns_exports);
28
+ var import_types = require("./types");
29
+ var import_runner = require("./runner");
30
+ var import_loader = require("./loader");
31
+ // Annotate the CommonJS export names for ESM import in node:
32
+ 0 && (module.exports = {
33
+ PatternLibraryLoader,
34
+ PatternMatch,
35
+ PatternRule,
36
+ PatternRunner,
37
+ SEVERITY_ORDER
38
+ });
39
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/patterns/index.ts"],
4
+ "sourcesContent": ["export { PatternRule, PatternMatch, SEVERITY_ORDER } from './types';\nexport { PatternRunner } from './runner';\nexport { PatternLibraryLoader } from './loader';\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0D;AAC1D,oBAA8B;AAC9B,oBAAqC;",
6
+ "names": []
7
+ }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * KiroGraph PatternIndexer — indexes pattern matches into the patterns_matches table.
3
+ */
4
+ import type { KiroGraphConfig } from '../config';
5
+ import { PatternRunner } from './runner';
6
+ import type { PatternRule } from './types';
7
+ export declare class PatternIndexer {
8
+ private readonly rawDb;
9
+ private readonly config;
10
+ private readonly projectRoot;
11
+ constructor(rawDb: any, config: KiroGraphConfig, projectRoot: string);
12
+ indexAll(onProgress?: (phase: string, current: number, total: number) => void): Promise<void>;
13
+ indexFile(filePath: string, language: string, rules: PatternRule[], runner: PatternRunner, threshold: string, now: number): Promise<void>;
14
+ }
15
+ //# sourceMappingURL=indexer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"indexer.d.ts","sourceRoot":"","sources":["../../src/patterns/indexer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAG3C,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAM;IAC5B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAkB;IACzC,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAEzB,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,WAAW,EAAE,MAAM;IAM9D,QAAQ,CAAC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IA6B7F,SAAS,CACb,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,WAAW,EAAE,EACpB,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC;CA8BjB"}
@@ -0,0 +1,97 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var indexer_exports = {};
30
+ __export(indexer_exports, {
31
+ PatternIndexer: () => PatternIndexer
32
+ });
33
+ module.exports = __toCommonJS(indexer_exports);
34
+ var fs = __toESM(require("fs"));
35
+ var path = __toESM(require("path"));
36
+ var import_loader = require("./loader");
37
+ var import_runner = require("./runner");
38
+ var import_errors = require("../errors");
39
+ class PatternIndexer {
40
+ constructor(rawDb, config, projectRoot) {
41
+ this.rawDb = rawDb;
42
+ this.config = config;
43
+ this.projectRoot = projectRoot;
44
+ }
45
+ async indexAll(onProgress) {
46
+ const runner = new import_runner.PatternRunner();
47
+ if (!runner.isAvailable()) {
48
+ (0, import_errors.logWarn)("[patterns] @ast-grep/napi not installed \u2014 skipping pattern indexing. Run: npm install @ast-grep/napi");
49
+ return;
50
+ }
51
+ const loader = new import_loader.PatternLibraryLoader();
52
+ const builtinPath = path.join(__dirname, "../patterns/library");
53
+ const customPath = this.config.patternLibraryPath;
54
+ const rules = loader.load(builtinPath, customPath);
55
+ const threshold = this.config.patternSeverityThreshold ?? "low";
56
+ const files = this.rawDb.all(
57
+ "SELECT path, language FROM files WHERE language != ? AND language != ?",
58
+ ["unknown", "jupyter"]
59
+ );
60
+ const now = Date.now();
61
+ let processed = 0;
62
+ for (const file of files) {
63
+ onProgress?.("patterns", processed, files.length);
64
+ await this.indexFile(file.path, file.language, rules, runner, threshold, now);
65
+ processed++;
66
+ }
67
+ onProgress?.("patterns", files.length, files.length);
68
+ }
69
+ async indexFile(filePath, language, rules, runner, threshold, now) {
70
+ let content;
71
+ const absPath = path.isAbsolute(filePath) ? filePath : path.join(this.projectRoot, filePath);
72
+ try {
73
+ content = fs.readFileSync(absPath, "utf8");
74
+ } catch {
75
+ return;
76
+ }
77
+ this.rawDb.run("DELETE FROM pattern_matches WHERE file_path = ?", [filePath]);
78
+ const matches = await runner.runAllRules(rules, content, language, threshold);
79
+ for (const m of matches) {
80
+ const symbolRow = this.rawDb.get(
81
+ `SELECT id FROM nodes WHERE file_path = ? AND start_line <= ? AND end_line >= ? AND kind IN ('function','method','class') ORDER BY (end_line - start_line) ASC LIMIT 1`,
82
+ [m.filePath || filePath, m.line, m.line]
83
+ );
84
+ const symbolNodeId = symbolRow?.id ?? null;
85
+ this.rawDb.run(
86
+ `INSERT INTO pattern_matches (file_path, pattern_id, line, col, match_text, severity, owasp_category, language, indexed_at, symbol_node_id)
87
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,
88
+ [filePath, m.patternId, m.line, m.col, m.matchText.slice(0, 500), m.severity, m.owaspCategory, language, now, symbolNodeId]
89
+ );
90
+ }
91
+ }
92
+ }
93
+ // Annotate the CommonJS export names for ESM import in node:
94
+ 0 && (module.exports = {
95
+ PatternIndexer
96
+ });
97
+ //# sourceMappingURL=indexer.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/patterns/indexer.ts"],
4
+ "sourcesContent": ["/**\n * KiroGraph PatternIndexer \u2014 indexes pattern matches into the patterns_matches table.\n */\n\nimport * as fs from 'fs';\nimport * as path from 'path';\nimport type { KiroGraphConfig } from '../config';\nimport { PatternLibraryLoader } from './loader';\nimport { PatternRunner } from './runner';\nimport type { PatternRule } from './types';\nimport { logWarn } from '../errors';\n\nexport class PatternIndexer {\n private readonly rawDb: any;\n private readonly config: KiroGraphConfig;\n private readonly projectRoot: string;\n\n constructor(rawDb: any, config: KiroGraphConfig, projectRoot: string) {\n this.rawDb = rawDb;\n this.config = config;\n this.projectRoot = projectRoot;\n }\n\n async indexAll(onProgress?: (phase: string, current: number, total: number) => void): Promise<void> {\n const runner = new PatternRunner();\n if (!runner.isAvailable()) {\n logWarn('[patterns] @ast-grep/napi not installed \u2014 skipping pattern indexing. Run: npm install @ast-grep/napi');\n return;\n }\n\n const loader = new PatternLibraryLoader();\n const builtinPath = path.join(__dirname, '../patterns/library');\n const customPath = (this.config as any).patternLibraryPath;\n const rules = loader.load(builtinPath, customPath);\n const threshold = (this.config as any).patternSeverityThreshold ?? 'low';\n\n const files: Array<{ path: string; language: string }> = this.rawDb.all(\n 'SELECT path, language FROM files WHERE language != ? AND language != ?',\n ['unknown', 'jupyter']\n );\n\n const now = Date.now();\n let processed = 0;\n\n for (const file of files) {\n onProgress?.('patterns', processed, files.length);\n await this.indexFile(file.path, file.language, rules, runner, threshold, now);\n processed++;\n }\n onProgress?.('patterns', files.length, files.length);\n }\n\n async indexFile(\n filePath: string,\n language: string,\n rules: PatternRule[],\n runner: PatternRunner,\n threshold: string,\n now: number,\n ): Promise<void> {\n let content: string;\n const absPath = path.isAbsolute(filePath)\n ? filePath\n : path.join(this.projectRoot, filePath);\n try {\n content = fs.readFileSync(absPath, 'utf8');\n } catch {\n return; // file deleted between index and now\n }\n\n // Delete existing matches for this file\n this.rawDb.run('DELETE FROM pattern_matches WHERE file_path = ?', [filePath]);\n\n const matches = await runner.runAllRules(rules, content, language, threshold as any);\n\n for (const m of matches) {\n const symbolRow = this.rawDb.get(\n `SELECT id FROM nodes WHERE file_path = ? AND start_line <= ? AND end_line >= ? AND kind IN ('function','method','class') ORDER BY (end_line - start_line) ASC LIMIT 1`,\n [m.filePath || filePath, m.line, m.line]\n ) as { id: string } | undefined;\n const symbolNodeId = symbolRow?.id ?? null;\n\n this.rawDb.run(\n `INSERT INTO pattern_matches (file_path, pattern_id, line, col, match_text, severity, owasp_category, language, indexed_at, symbol_node_id)\n VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)`,\n [filePath, m.patternId, m.line, m.col, m.matchText.slice(0, 500), m.severity, m.owaspCategory, language, now, symbolNodeId]\n );\n }\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAIA,SAAoB;AACpB,WAAsB;AAEtB,oBAAqC;AACrC,oBAA8B;AAE9B,oBAAwB;AAEjB,MAAM,eAAe;AAAA,EAK1B,YAAY,OAAY,QAAyB,aAAqB;AACpE,SAAK,QAAQ;AACb,SAAK,SAAS;AACd,SAAK,cAAc;AAAA,EACrB;AAAA,EAEA,MAAM,SAAS,YAAqF;AAClG,UAAM,SAAS,IAAI,4BAAc;AACjC,QAAI,CAAC,OAAO,YAAY,GAAG;AACzB,iCAAQ,2GAAsG;AAC9G;AAAA,IACF;AAEA,UAAM,SAAS,IAAI,mCAAqB;AACxC,UAAM,cAAc,KAAK,KAAK,WAAW,qBAAqB;AAC9D,UAAM,aAAc,KAAK,OAAe;AACxC,UAAM,QAAQ,OAAO,KAAK,aAAa,UAAU;AACjD,UAAM,YAAa,KAAK,OAAe,4BAA4B;AAEnE,UAAM,QAAmD,KAAK,MAAM;AAAA,MAClE;AAAA,MACA,CAAC,WAAW,SAAS;AAAA,IACvB;AAEA,UAAM,MAAM,KAAK,IAAI;AACrB,QAAI,YAAY;AAEhB,eAAW,QAAQ,OAAO;AACxB,mBAAa,YAAY,WAAW,MAAM,MAAM;AAChD,YAAM,KAAK,UAAU,KAAK,MAAM,KAAK,UAAU,OAAO,QAAQ,WAAW,GAAG;AAC5E;AAAA,IACF;AACA,iBAAa,YAAY,MAAM,QAAQ,MAAM,MAAM;AAAA,EACrD;AAAA,EAEA,MAAM,UACJ,UACA,UACA,OACA,QACA,WACA,KACe;AACf,QAAI;AACJ,UAAM,UAAU,KAAK,WAAW,QAAQ,IACpC,WACA,KAAK,KAAK,KAAK,aAAa,QAAQ;AACxC,QAAI;AACF,gBAAU,GAAG,aAAa,SAAS,MAAM;AAAA,IAC3C,QAAQ;AACN;AAAA,IACF;AAGA,SAAK,MAAM,IAAI,mDAAmD,CAAC,QAAQ,CAAC;AAE5E,UAAM,UAAU,MAAM,OAAO,YAAY,OAAO,SAAS,UAAU,SAAgB;AAEnF,eAAW,KAAK,SAAS;AACvB,YAAM,YAAY,KAAK,MAAM;AAAA,QAC3B;AAAA,QACA,CAAC,EAAE,YAAY,UAAU,EAAE,MAAM,EAAE,IAAI;AAAA,MACzC;AACA,YAAM,eAAe,WAAW,MAAM;AAEtC,WAAK,MAAM;AAAA,QACT;AAAA;AAAA,QAEA,CAAC,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,UAAU,MAAM,GAAG,GAAG,GAAG,EAAE,UAAU,EAAE,eAAe,UAAU,KAAK,YAAY;AAAA,MAC5H;AAAA,IACF;AAAA,EACF;AACF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,11 @@
1
+ id: command-injection-go
2
+ language: go
3
+ severity: critical
4
+ owaspCategory: A03
5
+ description: exec.Command() with string concatenation — command injection vector
6
+ fixHint: Use exec.Command() with separate arguments (never shell=true). Validate all inputs.
7
+ fix: "exec.Command($CMD, args...)"
8
+ rule:
9
+ any:
10
+ - pattern: exec.Command($A + $B)
11
+ - pattern: exec.Command(fmt.Sprintf($$$))
@@ -0,0 +1,14 @@
1
+ id: dangerous-eval-js
2
+ language: [javascript, typescript]
3
+ severity: critical
4
+ owaspCategory: A03
5
+ description: eval() with a non-literal argument enables arbitrary code execution
6
+ fixHint: Remove eval(). Use JSON.parse() for data, structured dispatch for dynamic behavior.
7
+ # Only safe if $ARG is JSON data; for dynamic dispatch use a lookup table instead
8
+ fix: "JSON.parse($ARG)"
9
+ rule:
10
+ pattern: eval($ARG)
11
+ not:
12
+ has:
13
+ kind: string
14
+ nthChild: 1
@@ -0,0 +1,13 @@
1
+ id: dangerous-exec-py
2
+ language: python
3
+ severity: critical
4
+ owaspCategory: A03
5
+ description: os.system() or subprocess with shell=True enables command injection
6
+ fixHint: Use subprocess.run() with a list of arguments and shell=False. Validate all inputs.
7
+ fix: "subprocess.run([$CMD], shell=False, check=True)"
8
+ rule:
9
+ any:
10
+ - pattern: os.system($CMD)
11
+ - pattern: subprocess.call($CMD, shell=True)
12
+ - pattern: subprocess.run($CMD, shell=True)
13
+ - pattern: subprocess.Popen($CMD, shell=True)
@@ -0,0 +1,8 @@
1
+ id: dangerous-reflection-java
2
+ language: java
3
+ severity: high
4
+ owaspCategory: A03
5
+ description: Class.forName() with user-controlled input enables arbitrary class loading
6
+ fixHint: Validate the class name against an allowlist before using reflection. Never use user input directly.
7
+ rule:
8
+ pattern: Class.forName($CLASS)
@@ -0,0 +1,11 @@
1
+ id: path-traversal-go
2
+ language: go
3
+ severity: high
4
+ owaspCategory: A01
5
+ description: os.Open() or ioutil.ReadFile() with user-controlled path — path traversal vector
6
+ fixHint: Use filepath.Clean() and verify the result is within an allowed base directory.
7
+ rule:
8
+ any:
9
+ - pattern: os.Open($PATH)
10
+ - pattern: ioutil.ReadFile($PATH)
11
+ - pattern: os.ReadFile($PATH)
@@ -0,0 +1,12 @@
1
+ id: path-traversal-py
2
+ language: python
3
+ severity: high
4
+ owaspCategory: A01
5
+ description: File open with path from request or user input — path traversal vector
6
+ fixHint: Use os.path.realpath() and verify the result is under an allowed base directory.
7
+ fix: "open(os.path.join(allowed_base, os.path.basename(request.$PROP)))"
8
+ rule:
9
+ any:
10
+ - pattern: open(request.$PROP)
11
+ - pattern: open(request.args[$KEY])
12
+ - pattern: open(request.form[$KEY])
@@ -0,0 +1,14 @@
1
+ id: path-traversal-readfile-js
2
+ language: [javascript, typescript]
3
+ severity: high
4
+ owaspCategory: A01
5
+ description: File operation with path from request parameter — path traversal vector
6
+ fixHint: Use path.resolve() and verify the result starts with an allowed base directory. Reject paths containing '..'.
7
+ fix: "/* validate path: use path.resolve() and check it starts with allowedBase */"
8
+ rule:
9
+ any:
10
+ - pattern: fs.readFile(req.$PROP, $$$)
11
+ - pattern: fs.readFileSync(req.$PROP, $$$)
12
+ - pattern: fs.createReadStream(req.$PROP, $$$)
13
+ - pattern: fs.open(req.$PROP, $$$)
14
+ - pattern: fs.openSync(req.$PROP, $$$)
@@ -0,0 +1,12 @@
1
+ id: prototype-pollution-js
2
+ language: [javascript, typescript]
3
+ severity: high
4
+ owaspCategory: A08
5
+ description: Assignment to __proto__ enables prototype pollution
6
+ fixHint: Validate object keys before merge. Use Object.create(null) for dictionaries. Avoid merging untrusted objects.
7
+ fix: "/* REMOVE: prototype pollution — use Object.assign({}, ...) instead */"
8
+ rule:
9
+ any:
10
+ - pattern: $OBJ["__proto__"] = $VAL
11
+ - pattern: $OBJ.__proto__ = $VAL
12
+ - pattern: $OBJ["constructor"]["prototype"] = $VAL
@@ -0,0 +1,12 @@
1
+ id: sql-injection-concat-js
2
+ language: [javascript, typescript]
3
+ severity: critical
4
+ owaspCategory: A03
5
+ description: SQL query built by string concatenation — classic injection vector
6
+ fixHint: Use parameterized queries. Never concatenate user-controlled values into SQL strings.
7
+ fix: "/* TODO: use parameterized query */ $DB.query('?', [$B])"
8
+ rule:
9
+ any:
10
+ - pattern: $DB.query($A + $B)
11
+ - pattern: $DB.execute($A + $B)
12
+ - pattern: $DB.run($A + $B)
@@ -0,0 +1,13 @@
1
+ id: sql-injection-java
2
+ language: java
3
+ severity: critical
4
+ owaspCategory: A03
5
+ description: JDBC query built by string concatenation — SQL injection vector
6
+ fixHint: Use PreparedStatement with ? placeholders. Never concatenate user input into SQL.
7
+ fix: "stmt.executeQuery(\"SELECT ... WHERE id = ?\")"
8
+ rule:
9
+ any:
10
+ - pattern: $CONN.createStatement().executeQuery($A + $B)
11
+ - pattern: $STMT.executeQuery($A + $B)
12
+ - pattern: $STMT.execute($A + $B)
13
+ - pattern: $STMT.executeUpdate($A + $B)
@@ -0,0 +1,12 @@
1
+ id: sql-injection-py
2
+ language: python
3
+ severity: critical
4
+ owaspCategory: A03
5
+ description: SQL query built with Python string formatting — injection vector
6
+ fixHint: Use parameterized queries with %s placeholders and pass values as a tuple. Never use % or .format() with SQL.
7
+ fix: "cursor.execute('SELECT ... WHERE col = %s', ($ARGS,))"
8
+ rule:
9
+ any:
10
+ - pattern: cursor.execute($Q % $ARGS)
11
+ - pattern: cursor.execute($Q.format($$$ARGS))
12
+ - pattern: cursor.execute(f"$$$SQL")
@@ -0,0 +1,13 @@
1
+ id: sql-injection-template-js
2
+ language: [javascript, typescript]
3
+ severity: critical
4
+ owaspCategory: A03
5
+ description: SQL query built with template literal containing substitution — injection vector
6
+ fixHint: Use parameterized queries with ? placeholders. Template literals with user data are injectable.
7
+ fix: "/* TODO: replace with parameterized query */"
8
+ rule:
9
+ any:
10
+ - pattern: $DB.query(`$$$`)
11
+ - pattern: $DB.execute(`$$$`)
12
+ - pattern: $DB.run(`$$$`)
13
+ - pattern: $DB.exec(`$$$`)
@@ -0,0 +1,13 @@
1
+ id: weak-crypto-md5-js
2
+ language: [javascript, typescript]
3
+ severity: medium
4
+ owaspCategory: A02
5
+ description: MD5 or SHA-1 are cryptographically broken — do not use for security purposes
6
+ fixHint: Use SHA-256 or SHA-3 for hashing. Use bcrypt/argon2 for passwords. Use AES-GCM for encryption.
7
+ fix: "createHash('sha256')"
8
+ rule:
9
+ any:
10
+ - pattern: createHash('md5')
11
+ - pattern: createHash('sha1')
12
+ - pattern: createHash("md5")
13
+ - pattern: createHash("sha1")
@@ -0,0 +1,13 @@
1
+ id: weak-crypto-py
2
+ language: python
3
+ severity: medium
4
+ owaspCategory: A02
5
+ description: MD5 or SHA-1 are cryptographically broken
6
+ fixHint: Use hashlib.sha256() or hashlib.sha3_256() for hashing. Use bcrypt for passwords.
7
+ fix: "hashlib.sha256($$$)"
8
+ rule:
9
+ any:
10
+ - pattern: hashlib.md5($$$)
11
+ - pattern: hashlib.sha1($$$)
12
+ - pattern: hashlib.new('md5', $$$)
13
+ - pattern: hashlib.new('sha1', $$$)
@@ -0,0 +1,18 @@
1
+ /**
2
+ * KiroGraph PatternLibraryLoader — loads and merges YAML pattern rule files.
3
+ *
4
+ * js-yaml is not a declared dependency, so this uses a lightweight inline parser
5
+ * that handles the flat key:value + nested rule: block format used by KiroGraph
6
+ * pattern rule files.
7
+ */
8
+ import { PatternRule } from './types';
9
+ export declare class PatternLibraryLoader {
10
+ /**
11
+ * Load, validate, and merge rules from the builtin path and optional custom path.
12
+ * User-supplied rules override bundled rules on id collision.
13
+ */
14
+ load(builtinPath: string, customPath?: string): PatternRule[];
15
+ private _loadDirectory;
16
+ private _validate;
17
+ }
18
+ //# sourceMappingURL=loader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"loader.d.ts","sourceRoot":"","sources":["../../src/patterns/loader.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAyMtC,qBAAa,oBAAoB;IAC/B;;;OAGG;IACH,IAAI,CAAC,WAAW,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,WAAW,EAAE;IAmB7D,OAAO,CAAC,cAAc;IAsCtB,OAAO,CAAC,SAAS;CA2ClB"}