0sec-cli 0.18.0 → 0.22.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 (329) hide show
  1. package/{0sec.js → 0.js} +90 -82
  2. package/LICENSE +1 -1
  3. package/README.md +62 -46
  4. package/chunks/adapt-loop-7I57LXXR.js +18 -0
  5. package/chunks/{adgraph-JLGA6RYI.js → adgraph-AUDQTBYA.js} +5 -5
  6. package/chunks/agent/skills/frameworks/entra-id.yaml +2 -2
  7. package/chunks/agent/skills/techniques/assumption-mining.yaml +2 -2
  8. package/chunks/agent/skills/techniques/cve-poc-adaptation.yaml +2 -2
  9. package/chunks/agent/skills/techniques/entra-attack-paths.yaml +1 -1
  10. package/chunks/agent/skills/techniques/kernel-weaponization.yaml +1 -1
  11. package/chunks/agent/skills/techniques/llm-prompt-injection.yaml +2 -2
  12. package/chunks/agent/skills/techniques/npm-ecosystem.yaml +1 -1
  13. package/chunks/agent/skills/techniques/poc-verification.yaml +1 -1
  14. package/chunks/agent/skills/techniques/seedless-depth-review.yaml +20 -38
  15. package/chunks/{artifact-scraper-HQ7HLP6V.js → artifact-scraper-PYZ3RU3O.js} +6 -6
  16. package/chunks/{assumption-mining-5SNIVVDN.js → assumption-mining-MFLF43IR.js} +24 -26
  17. package/chunks/{chunk-7DQEV5QI.js → chunk-23DG5YKS.js} +4 -4
  18. package/chunks/{chunk-UR4ELX2Y.js → chunk-2GV4HQKE.js} +340 -703
  19. package/chunks/{chunk-P6WKNFWX.js → chunk-2OQOQ2FZ.js} +8 -8
  20. package/chunks/{chunk-5G3ZXFBW.js → chunk-2WNCI664.js} +3 -3
  21. package/chunks/{chunk-DW5UWPFY.js → chunk-4VGLO2YS.js} +6 -5
  22. package/chunks/{chunk-KLTNTE2Z.js → chunk-5IBCBQEH.js} +13 -14
  23. package/chunks/{chunk-N7BOUYEV.js → chunk-5MWAG3FT.js} +14 -14
  24. package/chunks/{chunk-OEFNRYI2.js → chunk-6GHSR47F.js} +3 -6
  25. package/chunks/chunk-6YNKRUMC.js +4474 -0
  26. package/chunks/{chunk-6L26OBWI.js → chunk-76KSBWOQ.js} +255 -35
  27. package/chunks/chunk-7DEHG7YT.js +2143 -0
  28. package/chunks/{chunk-AD7WXDH6.js → chunk-7UFUALR2.js} +288 -22
  29. package/chunks/{chunk-53G27VPS.js → chunk-AZ7L3HFD.js} +7 -2
  30. package/chunks/{chunk-TSK2AG6J.js → chunk-CAYANSH6.js} +173 -1757
  31. package/chunks/{chunk-SAFFWQW4.js → chunk-DKSCN2AB.js} +7 -7
  32. package/chunks/{chunk-2JCCA2JL.js → chunk-DM5C5L5D.js} +3 -3
  33. package/chunks/{chunk-RWONANDA.js → chunk-DQTNI3KY.js} +5 -5
  34. package/chunks/{chunk-5JI7L7KV.js → chunk-EGZGZFAH.js} +10036 -12938
  35. package/chunks/{chunk-6LKRLK2R.js → chunk-FHC2B7LN.js} +3 -3
  36. package/chunks/{chunk-MYVT64FN.js → chunk-GHWODZMR.js} +2 -2
  37. package/chunks/{chunk-2RMLOJVB.js → chunk-GVD6SJGH.js} +2 -2
  38. package/chunks/{chunk-SF4KZ4O3.js → chunk-HLFS6WV2.js} +2 -2
  39. package/chunks/chunk-HR2TU42B.js +1228 -0
  40. package/chunks/{chunk-BFRB6HB2.js → chunk-HUNAPTKV.js} +3 -3
  41. package/chunks/chunk-IO7R7WBM.js +114 -0
  42. package/chunks/{chunk-WEBMRWEG.js → chunk-IXT64DV5.js} +656 -1868
  43. package/chunks/{chunk-3MOLBTLS.js → chunk-K2PWUPUI.js} +2 -2
  44. package/chunks/{chunk-WXQ6BJ6A.js → chunk-LCRTAQN2.js} +7 -7
  45. package/chunks/{chunk-SVJEDVYK.js → chunk-LPTRPRZR.js} +5 -5
  46. package/chunks/{chunk-CMKXP5RR.js → chunk-LYUAM3TG.js} +3 -3
  47. package/chunks/{chunk-BVAZO4WA.js → chunk-MICHDTBK.js} +3 -3
  48. package/chunks/{chunk-UCYRA73C.js → chunk-OAYUPGF6.js} +4 -4
  49. package/chunks/{chunk-XM5NLHYU.js → chunk-OWLJYJ5O.js} +14 -14
  50. package/chunks/{chunk-BKZFDZ23.js → chunk-QCUFBVIZ.js} +3 -3
  51. package/chunks/chunk-RE5EZDG2.js +5523 -0
  52. package/chunks/{chunk-ASUR522M.js → chunk-RRD4XXPU.js} +9 -9
  53. package/chunks/{chunk-AHTBZC3E.js → chunk-RSIUX3RW.js} +4 -4
  54. package/chunks/{chunk-BZNEY2ZS.js → chunk-SJBCK2EI.js} +15268 -16053
  55. package/chunks/{chunk-IOL7D5YV.js → chunk-SQCBHFWN.js} +3 -3
  56. package/chunks/chunk-TH2LW437.js +7829 -0
  57. package/chunks/{chunk-WVTBZEQO.js → chunk-TM74SSHC.js} +8 -8
  58. package/chunks/{chunk-U5FLXGHT.js → chunk-TO35Y326.js} +13 -729
  59. package/chunks/chunk-TRH2PJSN.js +547 -0
  60. package/chunks/{chunk-YYRBQVFE.js → chunk-TZFIAMWZ.js} +70 -16
  61. package/chunks/chunk-UELXHK2Y.js +1950 -0
  62. package/chunks/{chunk-RJWOYEOG.js → chunk-UEX7PFSE.js} +5 -5
  63. package/chunks/{chunk-VQG4FT5D.js → chunk-UFHN6RIU.js} +2 -2
  64. package/chunks/{chunk-JQHOLLTD.js → chunk-UU7PQP6N.js} +9 -9
  65. package/chunks/{chunk-BFR2CDV5.js → chunk-UV5QWZGE.js} +283 -153
  66. package/chunks/{chunk-WU6AFRAZ.js → chunk-V36HVTUL.js} +12 -12
  67. package/chunks/{chunk-IR537GON.js → chunk-VCSFCHAJ.js} +2 -2
  68. package/chunks/{chunk-YLMN3N25.js → chunk-VIT5ALXF.js} +3 -3
  69. package/chunks/{chunk-BATRQBOR.js → chunk-VMRRNRMR.js} +41 -41
  70. package/chunks/{chunk-72CISA2D.js → chunk-VNRY6AWF.js} +89 -41
  71. package/chunks/chunk-W6UWZFKL.js +298 -0
  72. package/chunks/{chunk-3KPWWJCI.js → chunk-XFCTUKXR.js} +88 -88
  73. package/chunks/{chunk-GMT2AZKM.js → chunk-YIQSGNAA.js} +897 -130
  74. package/chunks/codex-models-7TLJSY3L.js +17 -0
  75. package/chunks/{commands-TBC2F5CE.js → commands-NEI7L3QA.js} +2836 -1424
  76. package/chunks/corpus-v1.json +2 -2
  77. package/chunks/data/appsec-archetypes.json +2 -2
  78. package/chunks/data/chromium-archetypes.json +1 -1
  79. package/chunks/data/freebsd-archetypes.json +1 -1
  80. package/chunks/data/kernel-archetypes.json +2 -2
  81. package/chunks/db-5AP3JB4W.js +16 -0
  82. package/chunks/{disclose-EKTWSCGW.js → disclose-LDNKAVRH.js} +13 -11
  83. package/chunks/{dist-4YICS2J2.js → dist-3FNZIBB4.js} +394 -404
  84. package/chunks/{dist-4MAW5X6L.js → dist-5YHYNLI3.js} +6 -6
  85. package/chunks/{dist-FMGSR3DW.js → dist-DD4H6HMQ.js} +13 -5
  86. package/chunks/dist-KEULE5IQ.js +21914 -0
  87. package/chunks/dist-XZB53PS5.js +53 -0
  88. package/chunks/eval-runner-43BO2C4T.js +26 -0
  89. package/chunks/example-manifest.json +2 -2
  90. package/chunks/{exploit-agent-45YQOHPJ.js → exploit-agent-N4A5ELBK.js} +4 -4
  91. package/chunks/{exploit-autoclimb-UZGEMGYT.js → exploit-autoclimb-N7P6KIF5.js} +6 -6
  92. package/chunks/{exploit-climb-SG23KB2G.js → exploit-climb-WNEJUB5W.js} +12 -12
  93. package/chunks/fix-Z452M4EC.js +26 -0
  94. package/chunks/{github-issues-MJ6OYOOU.js → github-issues-IGTTWM7V.js} +7 -7
  95. package/chunks/harness-QJJJVSG4.js +22 -0
  96. package/chunks/http-conformance-U5F6GKYG.js +11 -0
  97. package/chunks/http-sender-I5XFFY35.js +10 -0
  98. package/chunks/hunt-scan-K6D2V3PX.js +36 -0
  99. package/chunks/{identity-6ZAIIWOR.js → identity-62SVRW4H.js} +5 -5
  100. package/chunks/{kernel-primitive-7U6CWHXD.js → kernel-primitive-TKUACPKD.js} +6 -6
  101. package/chunks/{kernel-vm-runner-3JAU4O6J.js → kernel-vm-runner-RAAO2PGT.js} +6 -6
  102. package/chunks/memsafety-scan-FCPAXIZE.js +16 -0
  103. package/chunks/{native-loop-RJCJPOUS.js → native-loop-2ZRJENZ3.js} +17 -18
  104. package/chunks/{npm-detectors-KB5Y5ZFX.js → npm-detectors-Z2ZIQCN4.js} +6 -6
  105. package/chunks/npm-dynamic-discovery-5J7FT3XM.js +13 -0
  106. package/chunks/orchestrate-2GWGNTBF.js +58 -0
  107. package/chunks/{pre-recon-cve-66EB6G4M.js → pre-recon-cve-X2K2P5YQ.js} +4 -4
  108. package/chunks/prepare-KYHGFWCJ.js +13 -0
  109. package/chunks/process-N245QIQG.js +12 -0
  110. package/chunks/{run-D56MPDKY.js → run-U3XU4CTC.js} +11507 -13632
  111. package/chunks/{runtime-G7YWIO3B.js → runtime-G75TEWQY.js} +10 -11
  112. package/chunks/runtime-XFWJTBUO.js +12 -0
  113. package/chunks/{scan-stream-FHI2FYZE.js → scan-stream-BMOCPKQX.js} +7 -7
  114. package/chunks/scope-WXI46UHJ.js +21 -0
  115. package/chunks/{session-store-GZ4A4KYT.js → session-store-27L3ZU73.js} +6 -6
  116. package/chunks/source-files-REHOM44I.js +12 -0
  117. package/chunks/{specdrift-WCLH6TTQ.js → specdrift-AFS54WEJ.js} +5 -5
  118. package/chunks/token-KRWP5JYA.js +72 -0
  119. package/chunks/token-util-DWTL33S3.js +8 -0
  120. package/chunks/variant-candidates-YWZORZMK.js +13 -0
  121. package/chunks/{web-recon-prepass-JJGPEOLE.js → web-recon-prepass-YVMFXCIK.js} +9 -9
  122. package/cli-path-traversal-fixture.js +352 -0
  123. package/dashboard/assets/bot-Bg1Tp9_d.js +1 -0
  124. package/dashboard/assets/dist-B_dDCPbu.js +1 -0
  125. package/dashboard/assets/findings-page-mayGhNx6.js +5 -0
  126. package/dashboard/assets/format--susmHX7.js +1 -0
  127. package/dashboard/assets/input-TuVPR3Zl.js +1 -0
  128. package/dashboard/assets/jsx-runtime-MGseXjj5.js +3 -0
  129. package/dashboard/assets/live-page-HWWHX99U.js +1 -0
  130. package/dashboard/assets/meta-tile-ckHo-w7k.js +1 -0
  131. package/dashboard/assets/operations-BxZ0OoXO.js +10 -0
  132. package/dashboard/assets/operations-CMFVrXEe.css +2 -0
  133. package/dashboard/assets/operations-app-D3d35rgo.js +46 -0
  134. package/dashboard/assets/overview-page-W_4IteEr.js +1 -0
  135. package/dashboard/assets/page-header-Bw9AJgBV.js +1 -0
  136. package/dashboard/assets/scans-page-CgzVXHnn.js +1 -0
  137. package/dashboard/assets/siren-KQj8QAnJ.js +1 -0
  138. package/dashboard/assets/table-8EDklulN.js +1 -0
  139. package/dashboard/assets/tabs-CFHPOwg8.js +1 -0
  140. package/dashboard/index.html +4 -5
  141. package/node_modules/node-addon-api/LICENSE.md +9 -0
  142. package/node_modules/node-addon-api/README.md +95 -0
  143. package/node_modules/node-addon-api/common.gypi +21 -0
  144. package/node_modules/node-addon-api/except.gypi +25 -0
  145. package/node_modules/node-addon-api/index.js +14 -0
  146. package/node_modules/node-addon-api/napi-inl.deprecated.h +186 -0
  147. package/node_modules/node-addon-api/napi-inl.h +7250 -0
  148. package/node_modules/node-addon-api/napi.h +3463 -0
  149. package/node_modules/node-addon-api/node_addon_api.gyp +42 -0
  150. package/node_modules/node-addon-api/node_api.gyp +9 -0
  151. package/node_modules/node-addon-api/noexcept.gypi +26 -0
  152. package/node_modules/node-addon-api/nothing.c +0 -0
  153. package/node_modules/node-addon-api/package-support.json +21 -0
  154. package/node_modules/node-addon-api/package.json +481 -0
  155. package/node_modules/node-addon-api/tools/README.md +73 -0
  156. package/node_modules/node-addon-api/tools/check-napi.js +99 -0
  157. package/node_modules/node-addon-api/tools/clang-format.js +71 -0
  158. package/node_modules/node-addon-api/tools/conversion.js +301 -0
  159. package/node_modules/node-gyp-build/LICENSE +21 -0
  160. package/node_modules/node-gyp-build/README.md +58 -0
  161. package/node_modules/node-gyp-build/SECURITY.md +5 -0
  162. package/node_modules/node-gyp-build/bin.js +84 -0
  163. package/node_modules/node-gyp-build/build-test.js +19 -0
  164. package/node_modules/node-gyp-build/index.js +6 -0
  165. package/node_modules/node-gyp-build/node-gyp-build.js +207 -0
  166. package/node_modules/node-gyp-build/optional.js +7 -0
  167. package/node_modules/node-gyp-build/package.json +43 -0
  168. package/node_modules/tree-sitter/LICENSE +21 -0
  169. package/node_modules/tree-sitter/README.md +90 -0
  170. package/node_modules/tree-sitter/binding.gyp +76 -0
  171. package/node_modules/tree-sitter/index.js +895 -0
  172. package/node_modules/tree-sitter/package.json +62 -0
  173. package/node_modules/tree-sitter/prebuilds/darwin-arm64/tree-sitter.node +0 -0
  174. package/node_modules/tree-sitter/prebuilds/darwin-x64/tree-sitter.node +0 -0
  175. package/node_modules/tree-sitter/prebuilds/linux-x64/tree-sitter.node +0 -0
  176. package/node_modules/tree-sitter/prebuilds/win32-x64/tree-sitter.node +0 -0
  177. package/node_modules/tree-sitter/src/addon_data.h +47 -0
  178. package/node_modules/tree-sitter/src/binding.cc +35 -0
  179. package/node_modules/tree-sitter/src/conversions.cc +140 -0
  180. package/node_modules/tree-sitter/src/conversions.h +22 -0
  181. package/node_modules/tree-sitter/src/language.cc +106 -0
  182. package/node_modules/tree-sitter/src/language.h +17 -0
  183. package/node_modules/tree-sitter/src/logger.cc +70 -0
  184. package/node_modules/tree-sitter/src/logger.h +19 -0
  185. package/node_modules/tree-sitter/src/lookaheaditerator.cc +122 -0
  186. package/node_modules/tree-sitter/src/lookaheaditerator.h +33 -0
  187. package/node_modules/tree-sitter/src/node.cc +1056 -0
  188. package/node_modules/tree-sitter/src/node.h +30 -0
  189. package/node_modules/tree-sitter/src/parser.cc +298 -0
  190. package/node_modules/tree-sitter/src/parser.h +35 -0
  191. package/node_modules/tree-sitter/src/query.cc +383 -0
  192. package/node_modules/tree-sitter/src/query.h +39 -0
  193. package/node_modules/tree-sitter/src/tree.cc +307 -0
  194. package/node_modules/tree-sitter/src/tree.h +45 -0
  195. package/node_modules/tree-sitter/src/tree_cursor.cc +213 -0
  196. package/node_modules/tree-sitter/src/tree_cursor.h +52 -0
  197. package/node_modules/tree-sitter/tree-sitter.d.ts +211 -0
  198. package/node_modules/tree-sitter/vendor/tree-sitter/LICENSE +21 -0
  199. package/node_modules/tree-sitter/vendor/tree-sitter/README.md +21 -0
  200. package/node_modules/tree-sitter/vendor/tree-sitter/lib/README.md +6 -0
  201. package/node_modules/tree-sitter/vendor/tree-sitter/lib/include/tree_sitter/api.h +1266 -0
  202. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.c +48 -0
  203. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/alloc.h +41 -0
  204. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/array.h +290 -0
  205. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/atomic.h +68 -0
  206. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/clock.h +146 -0
  207. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/error_costs.h +11 -0
  208. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.c +501 -0
  209. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/get_changed_ranges.h +36 -0
  210. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/host.h +21 -0
  211. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.c +221 -0
  212. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/language.h +299 -0
  213. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/length.h +52 -0
  214. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.c +419 -0
  215. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lexer.h +49 -0
  216. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/lib.c +14 -0
  217. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/node.c +774 -0
  218. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.c +2151 -0
  219. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/parser.h +230 -0
  220. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/point.h +62 -0
  221. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/query.c +4134 -0
  222. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reduce_action.h +34 -0
  223. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/reusable_node.h +95 -0
  224. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.c +899 -0
  225. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/stack.h +133 -0
  226. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.c +1060 -0
  227. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/subtree.h +382 -0
  228. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.c +165 -0
  229. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree.h +31 -0
  230. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.c +714 -0
  231. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/tree_cursor.h +48 -0
  232. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ICU_SHA +1 -0
  233. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/LICENSE +414 -0
  234. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/README.md +29 -0
  235. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/ptypes.h +1 -0
  236. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/umachine.h +448 -0
  237. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/urename.h +1 -0
  238. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf.h +1 -0
  239. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf16.h +733 -0
  240. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode/utf8.h +881 -0
  241. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/unicode.h +50 -0
  242. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib-symbols.txt +23 -0
  243. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/stdlib.c +109 -0
  244. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm/wasm-stdlib.h +1294 -0
  245. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.c +1823 -0
  246. package/node_modules/tree-sitter/vendor/tree-sitter/lib/src/wasm_store.h +31 -0
  247. package/node_modules/tree-sitter/vendor/tree-sitter/test/fixtures/grammars/.gitkeep +0 -0
  248. package/node_modules/tree-sitter-c/LICENSE +21 -0
  249. package/node_modules/tree-sitter-c/README.md +18 -0
  250. package/node_modules/tree-sitter-c/binding.gyp +20 -0
  251. package/node_modules/tree-sitter-c/bindings/node/binding.cc +20 -0
  252. package/node_modules/tree-sitter-c/bindings/node/index.d.ts +28 -0
  253. package/node_modules/tree-sitter-c/bindings/node/index.js +7 -0
  254. package/node_modules/tree-sitter-c/grammar.js +1463 -0
  255. package/node_modules/tree-sitter-c/package.json +108 -0
  256. package/node_modules/tree-sitter-c/prebuilds/darwin-arm64/tree-sitter-c.node +0 -0
  257. package/node_modules/tree-sitter-c/prebuilds/darwin-x64/tree-sitter-c.node +0 -0
  258. package/node_modules/tree-sitter-c/prebuilds/linux-x64/tree-sitter-c.node +0 -0
  259. package/node_modules/tree-sitter-c/prebuilds/win32-x64/tree-sitter-c.node +0 -0
  260. package/node_modules/tree-sitter-c/queries/highlights.scm +81 -0
  261. package/node_modules/tree-sitter-c/queries/tags.scm +9 -0
  262. package/node_modules/tree-sitter-c/src/grammar.json +9682 -0
  263. package/node_modules/tree-sitter-c/src/node-types.json +4556 -0
  264. package/node_modules/tree-sitter-c/src/parser.c +113852 -0
  265. package/node_modules/tree-sitter-c/src/tree_sitter/alloc.h +54 -0
  266. package/node_modules/tree-sitter-c/src/tree_sitter/array.h +290 -0
  267. package/node_modules/tree-sitter-c/src/tree_sitter/parser.h +265 -0
  268. package/package.json +20 -13
  269. package/vendor/tree-sitter-0.21.1-node24.json +16 -0
  270. package/vendor/tree-sitter-0.21.1-node24.tgz +0 -0
  271. package/chunks/adapt-loop-SMH6V4PD.js +0 -18
  272. package/chunks/appsec-catalog-CBWHGTEL.js +0 -24
  273. package/chunks/chunk-242TMK6G.js +0 -110
  274. package/chunks/chunk-57ZENEX2.js +0 -169
  275. package/chunks/chunk-ADOLI6DT.js +0 -102
  276. package/chunks/chunk-ATATQACO.js +0 -471
  277. package/chunks/chunk-C2WXWFBB.js +0 -1070
  278. package/chunks/chunk-F3WBKITT.js +0 -687
  279. package/chunks/chunk-H2FFLZNK.js +0 -3
  280. package/chunks/chunk-LP3HHYQU.js +0 -245
  281. package/chunks/chunk-QI233I24.js +0 -333
  282. package/chunks/chunk-RRMJC3ZE.js +0 -105
  283. package/chunks/chunk-Z5FA2XOX.js +0 -2798
  284. package/chunks/cost-ledger-NU63MYZM.js +0 -13
  285. package/chunks/db-KFWOAUUB.js +0 -16
  286. package/chunks/eval-runner-7ZF472KV.js +0 -27
  287. package/chunks/fix-IG7LYXH3.js +0 -12
  288. package/chunks/harness-7ODOLOWU.js +0 -22
  289. package/chunks/http-conformance-DU66MZIU.js +0 -11
  290. package/chunks/http-sender-GWH2IYEA.js +0 -10
  291. package/chunks/hunt-scan-MMKUOETU.js +0 -38
  292. package/chunks/memsafety-scan-J7SECV5W.js +0 -16
  293. package/chunks/npm-dynamic-discovery-AHROOZDB.js +0 -13
  294. package/chunks/orchestrate-OC2VZN2X.js +0 -62
  295. package/chunks/pipeline-BZK5BLJR.js +0 -14
  296. package/chunks/prepare-MYY743TK.js +0 -13
  297. package/chunks/process-LQRCS5OY.js +0 -13
  298. package/chunks/replay-runner-45G3VU7X.js +0 -39
  299. package/chunks/runtime-J7PLXZNM.js +0 -12
  300. package/chunks/scope-BI7BF4ZY.js +0 -18
  301. package/chunks/source-files-PWRQR6LY.js +0 -12
  302. package/chunks/variant-candidates-YERCYMPD.js +0 -13
  303. package/dashboard/assets/0sec-icon-66SreztZ.gif +0 -0
  304. package/dashboard/assets/bot-yILPnRgD.js +0 -1
  305. package/dashboard/assets/chevron-down-BeDJ-Vka.js +0 -1
  306. package/dashboard/assets/circle-alert-BEnMBMT-.js +0 -1
  307. package/dashboard/assets/client-DRYsuOGl.js +0 -9
  308. package/dashboard/assets/copy-Bi5vzoF9.js +0 -1
  309. package/dashboard/assets/desktop-CXTQonNm.js +0 -32
  310. package/dashboard/assets/desktop-NOekk4QS.css +0 -1
  311. package/dashboard/assets/dist-CmX-h7a4.js +0 -1
  312. package/dashboard/assets/dist-DAwYQmf_.js +0 -45
  313. package/dashboard/assets/findings-page-CACW9nw2.js +0 -5
  314. package/dashboard/assets/format-PoISqsES.js +0 -1
  315. package/dashboard/assets/jsx-runtime-C7oxC63R.js +0 -1
  316. package/dashboard/assets/live-page-DrgQqQK5.js +0 -1
  317. package/dashboard/assets/meta-tile-CcskIV_o.js +0 -1
  318. package/dashboard/assets/operations-BKE8T-vY.css +0 -2
  319. package/dashboard/assets/operations-D8nUP5_m.js +0 -4
  320. package/dashboard/assets/operations-app-CQQhG54n.js +0 -2
  321. package/dashboard/assets/overview-page-DTGS8dPo.js +0 -1
  322. package/dashboard/assets/page-header-MFVvEtZW.js +0 -1
  323. package/dashboard/assets/play-Dwo-9xt6.js +0 -1
  324. package/dashboard/assets/scans-page-ChVtq8Us.js +0 -1
  325. package/dashboard/assets/search-CiooTLck.js +0 -1
  326. package/dashboard/assets/siren-CCBwTSuk.js +0 -1
  327. package/dashboard/assets/table-BYS-nIVA.js +0 -1
  328. package/dashboard/assets/tabs-DivxbhQy.js +0 -1
  329. package/dashboard/desktop.html +0 -21
@@ -0,0 +1,419 @@
1
+ #include <stdio.h>
2
+ #include "./lexer.h"
3
+ #include "./subtree.h"
4
+ #include "./length.h"
5
+ #include "./unicode.h"
6
+
7
+ #define LOG(message, character) \
8
+ if (self->logger.log) { \
9
+ snprintf( \
10
+ self->debug_buffer, \
11
+ TREE_SITTER_SERIALIZATION_BUFFER_SIZE, \
12
+ 32 <= character && character < 127 ? \
13
+ message " character:'%c'" : \
14
+ message " character:%d", \
15
+ character \
16
+ ); \
17
+ self->logger.log( \
18
+ self->logger.payload, \
19
+ TSLogTypeLex, \
20
+ self->debug_buffer \
21
+ ); \
22
+ }
23
+
24
+ static const int32_t BYTE_ORDER_MARK = 0xFEFF;
25
+
26
+ static const TSRange DEFAULT_RANGE = {
27
+ .start_point = {
28
+ .row = 0,
29
+ .column = 0,
30
+ },
31
+ .end_point = {
32
+ .row = UINT32_MAX,
33
+ .column = UINT32_MAX,
34
+ },
35
+ .start_byte = 0,
36
+ .end_byte = UINT32_MAX
37
+ };
38
+
39
+ // Check if the lexer has reached EOF. This state is stored
40
+ // by setting the lexer's `current_included_range_index` such that
41
+ // it has consumed all of its available ranges.
42
+ static bool ts_lexer__eof(const TSLexer *_self) {
43
+ Lexer *self = (Lexer *)_self;
44
+ return self->current_included_range_index == self->included_range_count;
45
+ }
46
+
47
+ // Clear the currently stored chunk of source code, because the lexer's
48
+ // position has changed.
49
+ static void ts_lexer__clear_chunk(Lexer *self) {
50
+ self->chunk = NULL;
51
+ self->chunk_size = 0;
52
+ self->chunk_start = 0;
53
+ }
54
+
55
+ // Call the lexer's input callback to obtain a new chunk of source code
56
+ // for the current position.
57
+ static void ts_lexer__get_chunk(Lexer *self) {
58
+ self->chunk_start = self->current_position.bytes;
59
+ self->chunk = self->input.read(
60
+ self->input.payload,
61
+ self->current_position.bytes,
62
+ self->current_position.extent,
63
+ &self->chunk_size
64
+ );
65
+ if (!self->chunk_size) {
66
+ self->current_included_range_index = self->included_range_count;
67
+ self->chunk = NULL;
68
+ }
69
+ }
70
+
71
+ // Decode the next unicode character in the current chunk of source code.
72
+ // This assumes that the lexer has already retrieved a chunk of source
73
+ // code that spans the current position.
74
+ static void ts_lexer__get_lookahead(Lexer *self) {
75
+ uint32_t position_in_chunk = self->current_position.bytes - self->chunk_start;
76
+ uint32_t size = self->chunk_size - position_in_chunk;
77
+
78
+ if (size == 0) {
79
+ self->lookahead_size = 1;
80
+ self->data.lookahead = '\0';
81
+ return;
82
+ }
83
+
84
+ const uint8_t *chunk = (const uint8_t *)self->chunk + position_in_chunk;
85
+ UnicodeDecodeFunction decode = self->input.encoding == TSInputEncodingUTF8
86
+ ? ts_decode_utf8
87
+ : ts_decode_utf16;
88
+
89
+ self->lookahead_size = decode(chunk, size, &self->data.lookahead);
90
+
91
+ // If this chunk ended in the middle of a multi-byte character,
92
+ // try again with a fresh chunk.
93
+ if (self->data.lookahead == TS_DECODE_ERROR && size < 4) {
94
+ ts_lexer__get_chunk(self);
95
+ chunk = (const uint8_t *)self->chunk;
96
+ size = self->chunk_size;
97
+ self->lookahead_size = decode(chunk, size, &self->data.lookahead);
98
+ }
99
+
100
+ if (self->data.lookahead == TS_DECODE_ERROR) {
101
+ self->lookahead_size = 1;
102
+ }
103
+ }
104
+
105
+ static void ts_lexer_goto(Lexer *self, Length position) {
106
+ self->current_position = position;
107
+
108
+ // Move to the first valid position at or after the given position.
109
+ bool found_included_range = false;
110
+ for (unsigned i = 0; i < self->included_range_count; i++) {
111
+ TSRange *included_range = &self->included_ranges[i];
112
+ if (
113
+ included_range->end_byte > self->current_position.bytes &&
114
+ included_range->end_byte > included_range->start_byte
115
+ ) {
116
+ if (included_range->start_byte >= self->current_position.bytes) {
117
+ self->current_position = (Length) {
118
+ .bytes = included_range->start_byte,
119
+ .extent = included_range->start_point,
120
+ };
121
+ }
122
+
123
+ self->current_included_range_index = i;
124
+ found_included_range = true;
125
+ break;
126
+ }
127
+ }
128
+
129
+ if (found_included_range) {
130
+ // If the current position is outside of the current chunk of text,
131
+ // then clear out the current chunk of text.
132
+ if (self->chunk && (
133
+ self->current_position.bytes < self->chunk_start ||
134
+ self->current_position.bytes >= self->chunk_start + self->chunk_size
135
+ )) {
136
+ ts_lexer__clear_chunk(self);
137
+ }
138
+
139
+ self->lookahead_size = 0;
140
+ self->data.lookahead = '\0';
141
+ }
142
+
143
+ // If the given position is beyond any of included ranges, move to the EOF
144
+ // state - past the end of the included ranges.
145
+ else {
146
+ self->current_included_range_index = self->included_range_count;
147
+ TSRange *last_included_range = &self->included_ranges[self->included_range_count - 1];
148
+ self->current_position = (Length) {
149
+ .bytes = last_included_range->end_byte,
150
+ .extent = last_included_range->end_point,
151
+ };
152
+ ts_lexer__clear_chunk(self);
153
+ self->lookahead_size = 1;
154
+ self->data.lookahead = '\0';
155
+ }
156
+ }
157
+
158
+ // Intended to be called only from functions that control logging.
159
+ static void ts_lexer__do_advance(Lexer *self, bool skip) {
160
+ if (self->lookahead_size) {
161
+ self->current_position.bytes += self->lookahead_size;
162
+ if (self->data.lookahead == '\n') {
163
+ self->current_position.extent.row++;
164
+ self->current_position.extent.column = 0;
165
+ } else {
166
+ self->current_position.extent.column += self->lookahead_size;
167
+ }
168
+ }
169
+
170
+ const TSRange *current_range = &self->included_ranges[self->current_included_range_index];
171
+ while (
172
+ self->current_position.bytes >= current_range->end_byte ||
173
+ current_range->end_byte == current_range->start_byte
174
+ ) {
175
+ if (self->current_included_range_index < self->included_range_count) {
176
+ self->current_included_range_index++;
177
+ }
178
+ if (self->current_included_range_index < self->included_range_count) {
179
+ current_range++;
180
+ self->current_position = (Length) {
181
+ current_range->start_byte,
182
+ current_range->start_point,
183
+ };
184
+ } else {
185
+ current_range = NULL;
186
+ break;
187
+ }
188
+ }
189
+
190
+ if (skip) self->token_start_position = self->current_position;
191
+
192
+ if (current_range) {
193
+ if (
194
+ self->current_position.bytes < self->chunk_start ||
195
+ self->current_position.bytes >= self->chunk_start + self->chunk_size
196
+ ) {
197
+ ts_lexer__get_chunk(self);
198
+ }
199
+ ts_lexer__get_lookahead(self);
200
+ } else {
201
+ ts_lexer__clear_chunk(self);
202
+ self->data.lookahead = '\0';
203
+ self->lookahead_size = 1;
204
+ }
205
+ }
206
+
207
+ // Advance to the next character in the source code, retrieving a new
208
+ // chunk of source code if needed.
209
+ static void ts_lexer__advance(TSLexer *_self, bool skip) {
210
+ Lexer *self = (Lexer *)_self;
211
+ if (!self->chunk) return;
212
+
213
+ if (skip) {
214
+ LOG("skip", self->data.lookahead)
215
+ } else {
216
+ LOG("consume", self->data.lookahead)
217
+ }
218
+
219
+ ts_lexer__do_advance(self, skip);
220
+ }
221
+
222
+ // Mark that a token match has completed. This can be called multiple
223
+ // times if a longer match is found later.
224
+ static void ts_lexer__mark_end(TSLexer *_self) {
225
+ Lexer *self = (Lexer *)_self;
226
+ if (!ts_lexer__eof(&self->data)) {
227
+ // If the lexer is right at the beginning of included range,
228
+ // then the token should be considered to end at the *end* of the
229
+ // previous included range, rather than here.
230
+ TSRange *current_included_range = &self->included_ranges[
231
+ self->current_included_range_index
232
+ ];
233
+ if (
234
+ self->current_included_range_index > 0 &&
235
+ self->current_position.bytes == current_included_range->start_byte
236
+ ) {
237
+ TSRange *previous_included_range = current_included_range - 1;
238
+ self->token_end_position = (Length) {
239
+ previous_included_range->end_byte,
240
+ previous_included_range->end_point,
241
+ };
242
+ return;
243
+ }
244
+ }
245
+ self->token_end_position = self->current_position;
246
+ }
247
+
248
+ static uint32_t ts_lexer__get_column(TSLexer *_self) {
249
+ Lexer *self = (Lexer *)_self;
250
+
251
+ uint32_t goal_byte = self->current_position.bytes;
252
+
253
+ self->did_get_column = true;
254
+ self->current_position.bytes -= self->current_position.extent.column;
255
+ self->current_position.extent.column = 0;
256
+
257
+ if (self->current_position.bytes < self->chunk_start) {
258
+ ts_lexer__get_chunk(self);
259
+ }
260
+
261
+ uint32_t result = 0;
262
+ if (!ts_lexer__eof(_self)) {
263
+ ts_lexer__get_lookahead(self);
264
+ while (self->current_position.bytes < goal_byte && self->chunk) {
265
+ result++;
266
+ ts_lexer__do_advance(self, false);
267
+ if (ts_lexer__eof(_self)) break;
268
+ }
269
+ }
270
+
271
+ return result;
272
+ }
273
+
274
+ // Is the lexer at a boundary between two disjoint included ranges of
275
+ // source code? This is exposed as an API because some languages' external
276
+ // scanners need to perform custom actions at these boundaries.
277
+ static bool ts_lexer__is_at_included_range_start(const TSLexer *_self) {
278
+ const Lexer *self = (const Lexer *)_self;
279
+ if (self->current_included_range_index < self->included_range_count) {
280
+ TSRange *current_range = &self->included_ranges[self->current_included_range_index];
281
+ return self->current_position.bytes == current_range->start_byte;
282
+ } else {
283
+ return false;
284
+ }
285
+ }
286
+
287
+ void ts_lexer_init(Lexer *self) {
288
+ *self = (Lexer) {
289
+ .data = {
290
+ // The lexer's methods are stored as struct fields so that generated
291
+ // parsers can call them without needing to be linked against this
292
+ // library.
293
+ .advance = ts_lexer__advance,
294
+ .mark_end = ts_lexer__mark_end,
295
+ .get_column = ts_lexer__get_column,
296
+ .is_at_included_range_start = ts_lexer__is_at_included_range_start,
297
+ .eof = ts_lexer__eof,
298
+ .lookahead = 0,
299
+ .result_symbol = 0,
300
+ },
301
+ .chunk = NULL,
302
+ .chunk_size = 0,
303
+ .chunk_start = 0,
304
+ .current_position = {0, {0, 0}},
305
+ .logger = {
306
+ .payload = NULL,
307
+ .log = NULL
308
+ },
309
+ .included_ranges = NULL,
310
+ .included_range_count = 0,
311
+ .current_included_range_index = 0,
312
+ };
313
+ ts_lexer_set_included_ranges(self, NULL, 0);
314
+ }
315
+
316
+ void ts_lexer_delete(Lexer *self) {
317
+ ts_free(self->included_ranges);
318
+ }
319
+
320
+ void ts_lexer_set_input(Lexer *self, TSInput input) {
321
+ self->input = input;
322
+ ts_lexer__clear_chunk(self);
323
+ ts_lexer_goto(self, self->current_position);
324
+ }
325
+
326
+ // Move the lexer to the given position. This doesn't do any work
327
+ // if the parser is already at the given position.
328
+ void ts_lexer_reset(Lexer *self, Length position) {
329
+ if (position.bytes != self->current_position.bytes) {
330
+ ts_lexer_goto(self, position);
331
+ }
332
+ }
333
+
334
+ void ts_lexer_start(Lexer *self) {
335
+ self->token_start_position = self->current_position;
336
+ self->token_end_position = LENGTH_UNDEFINED;
337
+ self->data.result_symbol = 0;
338
+ self->did_get_column = false;
339
+ if (!ts_lexer__eof(&self->data)) {
340
+ if (!self->chunk_size) ts_lexer__get_chunk(self);
341
+ if (!self->lookahead_size) ts_lexer__get_lookahead(self);
342
+ if (
343
+ self->current_position.bytes == 0 &&
344
+ self->data.lookahead == BYTE_ORDER_MARK
345
+ ) ts_lexer__advance(&self->data, true);
346
+ }
347
+ }
348
+
349
+ void ts_lexer_finish(Lexer *self, uint32_t *lookahead_end_byte) {
350
+ if (length_is_undefined(self->token_end_position)) {
351
+ ts_lexer__mark_end(&self->data);
352
+ }
353
+
354
+ // If the token ended at an included range boundary, then its end position
355
+ // will have been reset to the end of the preceding range. Reset the start
356
+ // position to match.
357
+ if (self->token_end_position.bytes < self->token_start_position.bytes) {
358
+ self->token_start_position = self->token_end_position;
359
+ }
360
+
361
+ uint32_t current_lookahead_end_byte = self->current_position.bytes + 1;
362
+
363
+ // In order to determine that a byte sequence is invalid UTF8 or UTF16,
364
+ // the character decoding algorithm may have looked at the following byte.
365
+ // Therefore, the next byte *after* the current (invalid) character
366
+ // affects the interpretation of the current character.
367
+ if (self->data.lookahead == TS_DECODE_ERROR) {
368
+ current_lookahead_end_byte++;
369
+ }
370
+
371
+ if (current_lookahead_end_byte > *lookahead_end_byte) {
372
+ *lookahead_end_byte = current_lookahead_end_byte;
373
+ }
374
+ }
375
+
376
+ void ts_lexer_advance_to_end(Lexer *self) {
377
+ while (self->chunk) {
378
+ ts_lexer__advance(&self->data, false);
379
+ }
380
+ }
381
+
382
+ void ts_lexer_mark_end(Lexer *self) {
383
+ ts_lexer__mark_end(&self->data);
384
+ }
385
+
386
+ bool ts_lexer_set_included_ranges(
387
+ Lexer *self,
388
+ const TSRange *ranges,
389
+ uint32_t count
390
+ ) {
391
+ if (count == 0 || !ranges) {
392
+ ranges = &DEFAULT_RANGE;
393
+ count = 1;
394
+ } else {
395
+ uint32_t previous_byte = 0;
396
+ for (unsigned i = 0; i < count; i++) {
397
+ const TSRange *range = &ranges[i];
398
+ if (
399
+ range->start_byte < previous_byte ||
400
+ range->end_byte < range->start_byte
401
+ ) return false;
402
+ previous_byte = range->end_byte;
403
+ }
404
+ }
405
+
406
+ size_t size = count * sizeof(TSRange);
407
+ self->included_ranges = ts_realloc(self->included_ranges, size);
408
+ memcpy(self->included_ranges, ranges, size);
409
+ self->included_range_count = count;
410
+ ts_lexer_goto(self, self->current_position);
411
+ return true;
412
+ }
413
+
414
+ TSRange *ts_lexer_included_ranges(const Lexer *self, uint32_t *count) {
415
+ *count = self->included_range_count;
416
+ return self->included_ranges;
417
+ }
418
+
419
+ #undef LOG
@@ -0,0 +1,49 @@
1
+ #ifndef TREE_SITTER_LEXER_H_
2
+ #define TREE_SITTER_LEXER_H_
3
+
4
+ #ifdef __cplusplus
5
+ extern "C" {
6
+ #endif
7
+
8
+ #include "./length.h"
9
+ #include "./subtree.h"
10
+ #include "tree_sitter/api.h"
11
+ #include "./parser.h"
12
+
13
+ typedef struct {
14
+ TSLexer data;
15
+ Length current_position;
16
+ Length token_start_position;
17
+ Length token_end_position;
18
+
19
+ TSRange *included_ranges;
20
+ const char *chunk;
21
+ TSInput input;
22
+ TSLogger logger;
23
+
24
+ uint32_t included_range_count;
25
+ uint32_t current_included_range_index;
26
+ uint32_t chunk_start;
27
+ uint32_t chunk_size;
28
+ uint32_t lookahead_size;
29
+ bool did_get_column;
30
+
31
+ char debug_buffer[TREE_SITTER_SERIALIZATION_BUFFER_SIZE];
32
+ } Lexer;
33
+
34
+ void ts_lexer_init(Lexer *);
35
+ void ts_lexer_delete(Lexer *);
36
+ void ts_lexer_set_input(Lexer *, TSInput);
37
+ void ts_lexer_reset(Lexer *, Length);
38
+ void ts_lexer_start(Lexer *);
39
+ void ts_lexer_finish(Lexer *, uint32_t *);
40
+ void ts_lexer_advance_to_end(Lexer *);
41
+ void ts_lexer_mark_end(Lexer *);
42
+ bool ts_lexer_set_included_ranges(Lexer *self, const TSRange *ranges, uint32_t count);
43
+ TSRange *ts_lexer_included_ranges(const Lexer *self, uint32_t *count);
44
+
45
+ #ifdef __cplusplus
46
+ }
47
+ #endif
48
+
49
+ #endif // TREE_SITTER_LEXER_H_
@@ -0,0 +1,14 @@
1
+ #define _POSIX_C_SOURCE 200112L
2
+
3
+ #include "./alloc.c"
4
+ #include "./get_changed_ranges.c"
5
+ #include "./language.c"
6
+ #include "./lexer.c"
7
+ #include "./node.c"
8
+ #include "./parser.c"
9
+ #include "./query.c"
10
+ #include "./stack.c"
11
+ #include "./subtree.c"
12
+ #include "./tree_cursor.c"
13
+ #include "./tree.c"
14
+ #include "./wasm_store.c"