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
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire as __0secCreateRequire } from "node:module";
3
- const require = __0secCreateRequire(import.meta.url);
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
4
  import {
5
5
  CliNativeRuntime,
6
6
  DEFAULT_ENSEMBLE_MODELS,
@@ -11,20 +11,19 @@ import {
11
11
  detectAvailableRuntimes,
12
12
  getRuntimeInfo,
13
13
  pickRuntimeForStage
14
- } from "./chunk-N7BOUYEV.js";
14
+ } from "./chunk-5MWAG3FT.js";
15
+ import {
16
+ ProcessRuntime
17
+ } from "./chunk-W6UWZFKL.js";
15
18
  import {
16
19
  LlmApiRuntime,
17
20
  OperatorAbortError,
18
21
  QuotaExhaustedError,
19
22
  parseUsageLimitReached
20
- } from "./chunk-UR4ELX2Y.js";
21
- import {
22
- ProcessRuntime
23
- } from "./chunk-ATATQACO.js";
24
- import "./chunk-ADOLI6DT.js";
25
- import "./chunk-6L26OBWI.js";
26
- import "./chunk-YLMN3N25.js";
27
- import "./chunk-IR537GON.js";
23
+ } from "./chunk-2GV4HQKE.js";
24
+ import "./chunk-76KSBWOQ.js";
25
+ import "./chunk-VIT5ALXF.js";
26
+ import "./chunk-VCSFCHAJ.js";
28
27
  export {
29
28
  CliNativeRuntime,
30
29
  DEFAULT_ENSEMBLE_MODELS,
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
+ import {
5
+ canUseOpenTui,
6
+ isBunRuntime
7
+ } from "./chunk-GHWODZMR.js";
8
+ import "./chunk-VCSFCHAJ.js";
9
+ export {
10
+ canUseOpenTui,
11
+ isBunRuntime
12
+ };
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire as __0secCreateRequire } from "node:module";
3
- const require = __0secCreateRequire(import.meta.url);
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
4
  import {
5
5
  source_default
6
- } from "./chunk-SF4KZ4O3.js";
7
- import "./chunk-IR537GON.js";
6
+ } from "./chunk-HLFS6WV2.js";
7
+ import "./chunk-VCSFCHAJ.js";
8
8
 
9
9
  // packages/cli/src/ui/scan-stream.ts
10
10
  var STAGE_TAG = {
@@ -15,7 +15,7 @@ var STAGE_TAG = {
15
15
  report: source_default.gray
16
16
  };
17
17
  function tagFor(stage) {
18
- if (!stage) return source_default.gray("[0sec]");
18
+ if (!stage) return source_default.gray("[0]");
19
19
  const colour = STAGE_TAG[stage] ?? source_default.gray;
20
20
  return colour(`[${stage}]`);
21
21
  }
@@ -36,7 +36,7 @@ function severityColour(sev) {
36
36
  function renderScanStream(opts) {
37
37
  const { version, target, depth, mode } = opts;
38
38
  console.log("");
39
- console.log(` ${source_default.bold("0sec")} ${source_default.dim(`v${version}`)}`);
39
+ console.log(` ${source_default.bold("0")} ${source_default.dim(`v${version}`)}`);
40
40
  console.log(` ${source_default.dim(`${mode}ing target ${target} \xB7 depth ${depth}`)}`);
41
41
  console.log("");
42
42
  const onEvent = (event) => {
@@ -63,7 +63,7 @@ function renderScanStream(opts) {
63
63
  if (event.message) console.log(`${tag} ${event.message}`);
64
64
  return;
65
65
  case "thinking":
66
- if (process.env["0SEC_VERBOSE"] && event.message) {
66
+ if (process.env["ZERO_VERBOSE"] && event.message) {
67
67
  console.log(`${source_default.gray(" \u2026")} ${source_default.dim(event.message.slice(0, 200))}`);
68
68
  }
69
69
  return;
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
+ import {
5
+ ScopePolicy,
6
+ extractUrls,
7
+ loadScope,
8
+ matchUrl,
9
+ normalizeScopeHostname
10
+ } from "./chunk-7DEHG7YT.js";
11
+ import "./chunk-5IBCBQEH.js";
12
+ import "./chunk-76KSBWOQ.js";
13
+ import "./chunk-VIT5ALXF.js";
14
+ import "./chunk-VCSFCHAJ.js";
15
+ export {
16
+ ScopePolicy,
17
+ extractUrls,
18
+ loadScope,
19
+ matchUrl,
20
+ normalizeScopeHostname
21
+ };
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire as __0secCreateRequire } from "node:module";
3
- const require = __0secCreateRequire(import.meta.url);
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
4
  import {
5
5
  DEFAULT_PRUNE_KEEP,
6
6
  deleteSession,
@@ -11,10 +11,10 @@ import {
11
11
  relativeAge,
12
12
  saveSession,
13
13
  sessionsDir
14
- } from "./chunk-BVAZO4WA.js";
15
- import "./chunk-6L26OBWI.js";
16
- import "./chunk-YLMN3N25.js";
17
- import "./chunk-IR537GON.js";
14
+ } from "./chunk-MICHDTBK.js";
15
+ import "./chunk-76KSBWOQ.js";
16
+ import "./chunk-VIT5ALXF.js";
17
+ import "./chunk-VCSFCHAJ.js";
18
18
  export {
19
19
  DEFAULT_PRUNE_KEEP,
20
20
  deleteSession,
@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
+ import {
5
+ collectScopeFiles,
6
+ countScopeFilesUpTo
7
+ } from "./chunk-AZ7L3HFD.js";
8
+ import "./chunk-VCSFCHAJ.js";
9
+ export {
10
+ collectScopeFiles,
11
+ countScopeFilesUpTo
12
+ };
@@ -1,15 +1,15 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire as __0secCreateRequire } from "node:module";
3
- const require = __0secCreateRequire(import.meta.url);
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
4
  import {
5
5
  extractSpecInvariants,
6
6
  mapInvariantsToImplementation,
7
7
  planSpecdriftHypotheses,
8
8
  runSpecdriftPlan,
9
9
  runSpecdriftScan
10
- } from "./chunk-BKZFDZ23.js";
11
- import "./chunk-53G27VPS.js";
12
- import "./chunk-IR537GON.js";
10
+ } from "./chunk-QCUFBVIZ.js";
11
+ import "./chunk-AZ7L3HFD.js";
12
+ import "./chunk-VCSFCHAJ.js";
13
13
  export {
14
14
  extractSpecInvariants,
15
15
  mapInvariantsToImplementation,
@@ -0,0 +1,72 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
+ import {
5
+ require_token_error,
6
+ require_token_util
7
+ } from "./chunk-TRH2PJSN.js";
8
+ import {
9
+ __commonJS
10
+ } from "./chunk-VCSFCHAJ.js";
11
+
12
+ // node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token.js
13
+ var require_token = __commonJS({
14
+ "node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
15
+ var __defProp = Object.defineProperty;
16
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
17
+ var __getOwnPropNames = Object.getOwnPropertyNames;
18
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
19
+ var __export = (target, all) => {
20
+ for (var name in all)
21
+ __defProp(target, name, { get: all[name], enumerable: true });
22
+ };
23
+ var __copyProps = (to, from, except, desc) => {
24
+ if (from && typeof from === "object" || typeof from === "function") {
25
+ for (let key of __getOwnPropNames(from))
26
+ if (!__hasOwnProp.call(to, key) && key !== except)
27
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
28
+ }
29
+ return to;
30
+ };
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32
+ var token_exports = {};
33
+ __export(token_exports, {
34
+ refreshToken: () => refreshToken
35
+ });
36
+ module.exports = __toCommonJS(token_exports);
37
+ var import_token_error = require_token_error();
38
+ var import_token_util = require_token_util();
39
+ async function refreshToken(options) {
40
+ let projectId = options?.project;
41
+ let teamId = options?.team;
42
+ if (!projectId && !teamId) {
43
+ const projectInfo = (0, import_token_util.findProjectInfo)();
44
+ projectId = projectInfo.projectId;
45
+ teamId = projectInfo.teamId;
46
+ } else if (!projectId || !teamId) {
47
+ const projectInfo = (0, import_token_util.findProjectInfo)();
48
+ projectId = projectId ?? projectInfo.projectId;
49
+ teamId = teamId ?? projectInfo.teamId;
50
+ }
51
+ if (!projectId) {
52
+ throw new import_token_error.VercelOidcTokenError(
53
+ "Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`"
54
+ );
55
+ }
56
+ let maybeToken = (0, import_token_util.loadToken)(projectId);
57
+ if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token), options?.expirationBufferMs)) {
58
+ const authToken = await (0, import_token_util.getVercelToken)({
59
+ expirationBufferMs: options?.expirationBufferMs
60
+ });
61
+ maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
62
+ if (!maybeToken) {
63
+ throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
64
+ }
65
+ (0, import_token_util.saveToken)(maybeToken, projectId);
66
+ }
67
+ process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
68
+ return;
69
+ }
70
+ }
71
+ });
72
+ export default require_token();
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
+ import {
5
+ require_token_util
6
+ } from "./chunk-TRH2PJSN.js";
7
+ import "./chunk-VCSFCHAJ.js";
8
+ export default require_token_util();
@@ -0,0 +1,13 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
+ import {
5
+ generateVariantCandidates
6
+ } from "./chunk-HUNAPTKV.js";
7
+ import "./chunk-2GV4HQKE.js";
8
+ import "./chunk-76KSBWOQ.js";
9
+ import "./chunk-VIT5ALXF.js";
10
+ import "./chunk-VCSFCHAJ.js";
11
+ export {
12
+ generateVariantCandidates
13
+ };
@@ -1,20 +1,20 @@
1
1
  #!/usr/bin/env node
2
- import { createRequire as __0secCreateRequire } from "node:module";
3
- const require = __0secCreateRequire(import.meta.url);
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
4
  import {
5
5
  enumerateJsChunkUrls,
6
6
  fingerprintWebStack,
7
7
  runBaselineWebChecks,
8
8
  summarizeWebStackFingerprint
9
- } from "./chunk-CMKXP5RR.js";
9
+ } from "./chunk-LYUAM3TG.js";
10
10
  import {
11
11
  enumerateSubdomains,
12
12
  scanJsArtifacts,
13
13
  searchAdvisories
14
- } from "./chunk-YYRBQVFE.js";
15
- import "./chunk-6L26OBWI.js";
16
- import "./chunk-YLMN3N25.js";
17
- import "./chunk-IR537GON.js";
14
+ } from "./chunk-TZFIAMWZ.js";
15
+ import "./chunk-76KSBWOQ.js";
16
+ import "./chunk-VIT5ALXF.js";
17
+ import "./chunk-VCSFCHAJ.js";
18
18
 
19
19
  // packages/core/dist/stages/web-recon-prepass.js
20
20
  import { randomUUID } from "node:crypto";
@@ -459,7 +459,7 @@ async function checkRscBypass(opts) {
459
459
  }
460
460
  var DJANGO_DEBUG_ID = "DJANGO-DEBUG-TRUE-INFO-DISCLOSURE";
461
461
  var DJANGO_DEBUG_TITLE = "Django DEBUG=True exposes traceback / settings on error pages";
462
- var DJANGO_DEBUG_PROBE_PATH = "/0sec-debug-probe-0nonexistent-9z/?__0sec_debug_check__=1";
462
+ var DJANGO_DEBUG_PROBE_PATH = "/0-debug-probe-0nonexistent-9z/?__0_debug_check__=1";
463
463
  var DJANGO_DEBUG_PROOF_RE = /You'?re seeing this error because you have\s+DEBUG\s*=\s*True/i;
464
464
  var DJANGO_DEBUG_CORROBORATING_RES = [
465
465
  /Django Version/i,
@@ -801,7 +801,7 @@ async function runWebReconPrePass(config, options = {}) {
801
801
  const resetEndpoint = baseline?.body ? findPasswordResetEndpoint(base, baseline.body) : void 0;
802
802
  if (resetBurstProbeAllowed && resetEndpoint && isInScopeUrl(resetEndpoint, targetHost, domain)) {
803
803
  try {
804
- const invalidEmail = `0sec-noreply-${randomUUID().slice(0, 8)}@invalid.example`;
804
+ const invalidEmail = `0-noreply-${randomUUID().slice(0, 8)}@invalid.example`;
805
805
  const probe = await probeRateLimit({
806
806
  request: async () => {
807
807
  if (limiter)
@@ -0,0 +1,352 @@
1
+ import { spawn } from "node:child_process";
2
+ import { createServer } from "node:http";
3
+ import { access, mkdir, mkdtemp, realpath, rm, writeFile } from "node:fs/promises";
4
+ import { constants } from "node:fs";
5
+ import { homedir, tmpdir } from "node:os";
6
+ import { join, resolve, sep } from "node:path";
7
+ const FIXTURE_ID = "fixture:cli-path-traversal";
8
+ const DEFAULT_TIMEOUT_MS = 10_000;
9
+ const SIGKILL_GRACE_MS = 1_000;
10
+ const CAPTURE_BYTES = 1024 * 1024;
11
+ const EXCERPT_BYTES = 4 * 1024;
12
+ function excerpt(text, max = EXCERPT_BYTES) {
13
+ if (text.length <= max)
14
+ return text;
15
+ return text.slice(0, max) + "...[truncated]";
16
+ }
17
+ function isInside(root, candidate) {
18
+ return candidate === root || candidate.startsWith(root + sep);
19
+ }
20
+ async function exists(path) {
21
+ try {
22
+ await access(path, constants.F_OK);
23
+ return true;
24
+ }
25
+ catch {
26
+ return false;
27
+ }
28
+ }
29
+ function appendCapped(current, chunk) {
30
+ if (current.length >= CAPTURE_BYTES)
31
+ return current;
32
+ const next = current + chunk.toString("utf8");
33
+ if (next.length <= CAPTURE_BYTES)
34
+ return next;
35
+ return next.slice(0, CAPTURE_BYTES) + "\n...[truncated at 1MiB]";
36
+ }
37
+ async function runCommand(argv, options) {
38
+ return await new Promise((resolveCommand) => {
39
+ let stdout = "";
40
+ let stderr = "";
41
+ let settled = false;
42
+ let timedOut = false;
43
+ let timer;
44
+ let killTimer;
45
+ const child = spawn(argv[0], argv.slice(1), {
46
+ cwd: options.cwd,
47
+ stdio: ["ignore", "pipe", "pipe"],
48
+ });
49
+ const finish = (result) => {
50
+ if (settled)
51
+ return;
52
+ settled = true;
53
+ if (timer)
54
+ clearTimeout(timer);
55
+ if (killTimer)
56
+ clearTimeout(killTimer);
57
+ resolveCommand(result);
58
+ };
59
+ timer = setTimeout(() => {
60
+ timedOut = true;
61
+ child.kill("SIGTERM");
62
+ killTimer = setTimeout(() => {
63
+ if (settled)
64
+ return;
65
+ child.kill("SIGKILL");
66
+ finish({
67
+ exitCode: null,
68
+ stdout,
69
+ stderr,
70
+ timedOut,
71
+ error: `command timed out after ${options.timeoutMs}ms and did not exit after SIGTERM`,
72
+ });
73
+ }, SIGKILL_GRACE_MS);
74
+ }, options.timeoutMs);
75
+ child.stdout?.on("data", (chunk) => {
76
+ stdout = appendCapped(stdout, chunk);
77
+ });
78
+ child.stderr?.on("data", (chunk) => {
79
+ stderr = appendCapped(stderr, chunk);
80
+ });
81
+ child.on("error", (err) => {
82
+ finish({
83
+ exitCode: null,
84
+ stdout,
85
+ stderr,
86
+ timedOut,
87
+ error: err instanceof Error ? err.message : String(err),
88
+ });
89
+ });
90
+ child.on("close", (code) => {
91
+ finish({
92
+ exitCode: code,
93
+ stdout,
94
+ stderr,
95
+ timedOut,
96
+ error: timedOut ? `command timed out after ${options.timeoutMs}ms` : undefined,
97
+ });
98
+ });
99
+ });
100
+ }
101
+ async function startMaliciousExportServer() {
102
+ const payload = {
103
+ rootPath: "demo",
104
+ paperclipExtensionPath: null,
105
+ warnings: [],
106
+ files: {
107
+ "../escaped-marker": "0 deterministic verification\n",
108
+ "README.md": "normal export content\n",
109
+ },
110
+ };
111
+ const server = createServer((req, res) => {
112
+ if (req.method === "GET" && req.url === "/company/export") {
113
+ res.statusCode = 200;
114
+ res.setHeader("content-type", "application/json");
115
+ res.end(JSON.stringify(payload));
116
+ return;
117
+ }
118
+ res.statusCode = 404;
119
+ res.end("not found");
120
+ });
121
+ await new Promise((resolveListen, rejectListen) => {
122
+ server.once("error", rejectListen);
123
+ server.listen(0, "127.0.0.1", () => resolveListen());
124
+ });
125
+ const address = server.address();
126
+ if (!address || typeof address === "string") {
127
+ await closeServer(server);
128
+ throw new Error("failed to allocate fixture server port");
129
+ }
130
+ return {
131
+ server,
132
+ baseUrl: `http://127.0.0.1:${address.port}`,
133
+ };
134
+ }
135
+ async function closeServer(server) {
136
+ await new Promise((resolveClose) => {
137
+ server.close(() => resolveClose());
138
+ });
139
+ }
140
+ function expandCommandArgv(argv, replacements) {
141
+ return argv.map((arg) => arg
142
+ .replaceAll("{{apiUrl}}", replacements.apiUrl)
143
+ .replaceAll("{{exportDir}}", replacements.exportDir)
144
+ .replaceAll("{{fixtureMode}}", replacements.fixtureMode));
145
+ }
146
+ function assertion(kind, passed, detail) {
147
+ return { kind, passed, detail };
148
+ }
149
+ async function buildAssertions(paths) {
150
+ const [sandboxReal, exportReal] = await Promise.all([
151
+ realpath(paths.sandboxRoot),
152
+ realpath(paths.exportDir),
153
+ ]);
154
+ const escapedExists = await exists(paths.escapedPath);
155
+ const insideExportExists = await exists(paths.insideExportPath);
156
+ let escapedReal = resolve(paths.escapedPath);
157
+ if (escapedExists) {
158
+ escapedReal = await realpath(paths.escapedPath);
159
+ }
160
+ const homeReal = await realpath(homedir()).catch(() => homedir());
161
+ const profileNames = new Set([".bashrc", ".zshrc", ".profile", ".bash_profile"]);
162
+ const escapedBase = escapedReal.split(sep).at(-1) ?? "";
163
+ const escapedInsideHome = isInside(homeReal, escapedReal);
164
+ const escapedMatchesProfile = profileNames.has(escapedBase);
165
+ const noHomeProfileTouch = !escapedInsideHome && !escapedMatchesProfile;
166
+ const noHomeProfileTouchDetail = escapedInsideHome
167
+ ? `touched path ${escapedReal} is inside home directory ${homeReal}`
168
+ : escapedMatchesProfile
169
+ ? `touched path ${escapedReal} matches profile basename ${escapedBase}`
170
+ : `touched path ${escapedReal} is not a home directory or shell profile target`;
171
+ return [
172
+ assertion("filesystem_exists", escapedExists, escapedExists
173
+ ? `escaped marker exists at ${escapedReal}`
174
+ : `escaped marker not found at ${paths.escapedPath}`),
175
+ assertion("filesystem_not_exists", !insideExportExists, insideExportExists
176
+ ? `unexpected marker found inside export root at ${paths.insideExportPath}`
177
+ : `no escaped marker exists inside export root at ${paths.insideExportPath}`),
178
+ assertion("path_outside_export_root", escapedExists && !isInside(exportReal, escapedReal), escapedExists
179
+ ? `escaped marker realpath ${escapedReal} is outside export root ${exportReal}`
180
+ : "escaped marker missing, so export-root escape was not reproduced"),
181
+ assertion("path_inside_sandbox", escapedExists && isInside(sandboxReal, escapedReal), escapedExists
182
+ ? `escaped marker stayed inside sandbox ${sandboxReal}`
183
+ : "escaped marker missing, so sandbox containment could not be proven"),
184
+ assertion("no_home_profile_touch", noHomeProfileTouch, noHomeProfileTouchDetail),
185
+ ];
186
+ }
187
+ function resultStatus(args) {
188
+ const required = new Set([
189
+ "filesystem_exists",
190
+ "filesystem_not_exists",
191
+ "path_outside_export_root",
192
+ "path_inside_sandbox",
193
+ "no_home_profile_touch",
194
+ ]);
195
+ const filesystemAssertions = args.assertions.filter((a) => required.has(a.kind));
196
+ if (filesystemAssertions.length > 0) {
197
+ if (filesystemAssertions.some((a) => a.kind === "filesystem_exists" && a.passed)) {
198
+ return "reproduced";
199
+ }
200
+ if (args.command.timedOut)
201
+ return "error";
202
+ if (args.command.error && args.command.exitCode === null)
203
+ return "error";
204
+ return "not_reproduced";
205
+ }
206
+ if (args.command.error && args.command.exitCode === null)
207
+ return "error";
208
+ if (args.command.timedOut)
209
+ return "error";
210
+ if (args.command.exitCode !== 0)
211
+ return "error";
212
+ return "inconclusive";
213
+ }
214
+ function summaryFor(status) {
215
+ switch (status) {
216
+ case "reproduced":
217
+ return "CLI path traversal replay wrote a marker outside the selected export directory inside the sandbox.";
218
+ case "not_reproduced":
219
+ return "CLI path traversal replay completed but did not write outside the selected export directory.";
220
+ case "inconclusive":
221
+ return "CLI path traversal replay was inconclusive.";
222
+ case "error":
223
+ return "CLI path traversal replay failed before reaching a reliable verdict.";
224
+ }
225
+ }
226
+ /**
227
+ * Run the deterministic CLI path traversal replay from 0#195.
228
+ *
229
+ * The fixture starts a malicious local API server and runs the caller-supplied
230
+ * CLI command against a sandboxed export directory. The harness itself never
231
+ * implements export behavior; the verdict comes from the CLI under test plus
232
+ * filesystem assertions over the sandbox.
233
+ */
234
+ export async function runCliPathTraversalReplayFixture(options = {}) {
235
+ const startedAt = new Date().toISOString();
236
+ const fixtureMode = options.fixtureMode ?? "vulnerable";
237
+ const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
238
+ const retainArtifacts = options.retainArtifacts || Boolean(options.artifactDir);
239
+ const sandboxRoot = options.artifactDir
240
+ ? resolve(options.artifactDir)
241
+ : await mkdtemp(join(tmpdir(), "0-verify-"));
242
+ const exportDir = join(sandboxRoot, "export");
243
+ const harnessDir = join(sandboxRoot, "harness");
244
+ const harnessRef = join(harnessDir, "harness.json");
245
+ const stdoutRef = join(sandboxRoot, "stdout.log");
246
+ const stderrRef = join(sandboxRoot, "stderr.log");
247
+ const artifacts = {};
248
+ if (retainArtifacts) {
249
+ artifacts.sandbox_ref = sandboxRoot;
250
+ artifacts.harness_ref = harnessRef;
251
+ artifacts.stdout_ref = stdoutRef;
252
+ artifacts.stderr_ref = stderrRef;
253
+ artifacts.export_ref = exportDir;
254
+ }
255
+ let server;
256
+ let argv = [];
257
+ let command;
258
+ try {
259
+ await mkdir(exportDir, { recursive: true });
260
+ const fixture = await startMaliciousExportServer();
261
+ server = fixture.server;
262
+ if (!options.commandArgv || options.commandArgv.length === 0) {
263
+ throw new Error("cli-path-traversal fixture requires commandArgv for the real CLI under test");
264
+ }
265
+ argv = expandCommandArgv(options.commandArgv, {
266
+ apiUrl: fixture.baseUrl,
267
+ exportDir,
268
+ fixtureMode,
269
+ });
270
+ await mkdir(harnessDir, { recursive: true });
271
+ await writeFile(harnessRef, JSON.stringify({
272
+ fixture: "cli-path-traversal",
273
+ fixtureMode,
274
+ commandArgv: options.commandArgv,
275
+ expandedArgv: argv,
276
+ apiUrl: fixture.baseUrl,
277
+ exportDir,
278
+ }, null, 2) + "\n", "utf8");
279
+ command = await runCommand(argv, {
280
+ cwd: sandboxRoot,
281
+ timeoutMs,
282
+ });
283
+ await writeFile(stdoutRef, command.stdout, "utf8");
284
+ await writeFile(stderrRef, command.stderr, "utf8");
285
+ const assertions = await buildAssertions({
286
+ sandboxRoot,
287
+ exportDir,
288
+ escapedPath: join(sandboxRoot, "escaped-marker"),
289
+ insideExportPath: join(exportDir, "escaped-marker"),
290
+ });
291
+ if (command.exitCode !== 0 || command.error) {
292
+ assertions.unshift(assertion("command_exit_zero", false, command.error ?? `fixture command exited ${String(command.exitCode)}`));
293
+ }
294
+ else {
295
+ assertions.unshift(assertion("command_exit_zero", true, "fixture command exited 0"));
296
+ }
297
+ const status = resultStatus({ command, assertions });
298
+ return {
299
+ status,
300
+ mode: "deterministic_replay",
301
+ finding_id: FIXTURE_ID,
302
+ engine_version: options.engineVersion ?? "unknown",
303
+ started_at: startedAt,
304
+ completed_at: new Date().toISOString(),
305
+ commands: [
306
+ {
307
+ argv,
308
+ exit_code: command.exitCode,
309
+ stdout_excerpt: excerpt(command.stdout),
310
+ stderr_excerpt: excerpt(command.stderr),
311
+ },
312
+ ],
313
+ assertions,
314
+ artifacts,
315
+ summary: summaryFor(status),
316
+ error_reason: status === "error" ? command.error ?? "fixture command failed" : null,
317
+ };
318
+ }
319
+ catch (err) {
320
+ const reason = err instanceof Error ? err.message : String(err);
321
+ return {
322
+ status: "error",
323
+ mode: "deterministic_replay",
324
+ finding_id: FIXTURE_ID,
325
+ engine_version: options.engineVersion ?? "unknown",
326
+ started_at: startedAt,
327
+ completed_at: new Date().toISOString(),
328
+ commands: command
329
+ ? [
330
+ {
331
+ argv,
332
+ exit_code: command.exitCode,
333
+ stdout_excerpt: excerpt(command.stdout),
334
+ stderr_excerpt: excerpt(command.stderr),
335
+ },
336
+ ]
337
+ : [],
338
+ assertions: [],
339
+ artifacts,
340
+ summary: summaryFor("error"),
341
+ error_reason: reason,
342
+ };
343
+ }
344
+ finally {
345
+ if (server)
346
+ await closeServer(server);
347
+ if (!retainArtifacts) {
348
+ await rm(sandboxRoot, { recursive: true, force: true });
349
+ }
350
+ }
351
+ }
352
+ //# sourceMappingURL=cli-path-traversal-fixture.js.map
@@ -0,0 +1 @@
1
+ import{_ as e}from"./input-TuVPR3Zl.js";var t=e(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]);export{t};