0sec-cli 0.22.0 → 0.22.4

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 (107) hide show
  1. package/0.js +56 -45
  2. package/README.md +12 -0
  3. package/chunks/{adapt-loop-7I57LXXR.js → adapt-loop-3CCOWE43.js} +4 -4
  4. package/chunks/{artifact-scraper-PYZ3RU3O.js → artifact-scraper-Z4UUIOH3.js} +2 -2
  5. package/chunks/{assumption-mining-MFLF43IR.js → assumption-mining-2UAKQB6V.js} +18 -14
  6. package/chunks/{chunk-RE5EZDG2.js → chunk-2WWAPKAW.js} +126 -1089
  7. package/chunks/{chunk-LPTRPRZR.js → chunk-3BPX75OR.js} +1 -1
  8. package/chunks/chunk-4ZYYX5GY.js +74 -0
  9. package/chunks/{chunk-RSIUX3RW.js → chunk-5JNTMWPK.js} +2 -2
  10. package/chunks/{chunk-RRD4XXPU.js → chunk-5WAJGLCW.js} +3 -3
  11. package/chunks/{chunk-76KSBWOQ.js → chunk-6KFB6AYN.js} +515 -20
  12. package/chunks/{chunk-HR2TU42B.js → chunk-6WQDXWQC.js} +169 -15
  13. package/chunks/chunk-6YZE552K.js +5603 -0
  14. package/chunks/chunk-BGX53365.js +309 -0
  15. package/chunks/{chunk-7DEHG7YT.js → chunk-C6JPA32H.js} +1 -1
  16. package/chunks/chunk-CF3MNS3O.js +990 -0
  17. package/chunks/{chunk-4VGLO2YS.js → chunk-CPCHLL6A.js} +5 -2
  18. package/chunks/{chunk-DM5C5L5D.js → chunk-DPUXXMJW.js} +1 -1
  19. package/chunks/{chunk-LYUAM3TG.js → chunk-E3OOBVOK.js} +30 -12
  20. package/chunks/{chunk-HUNAPTKV.js → chunk-E74LXQFY.js} +1 -1
  21. package/chunks/{chunk-UU7PQP6N.js → chunk-ELI3BVIK.js} +3 -3
  22. package/chunks/chunk-FFHRANYC.js +547 -0
  23. package/chunks/{chunk-IO7R7WBM.js → chunk-G2BE2FC7.js} +1 -1
  24. package/chunks/chunk-GQ3DGHWE.js +1659 -0
  25. package/chunks/{chunk-V36HVTUL.js → chunk-GVY3S5E5.js} +21 -18
  26. package/chunks/{chunk-UV5QWZGE.js → chunk-H4DH7COV.js} +192 -40
  27. package/chunks/{chunk-SJBCK2EI.js → chunk-H6Q2QAIY.js} +23475 -22747
  28. package/chunks/{chunk-VMRRNRMR.js → chunk-IHPTOTLL.js} +1 -1
  29. package/chunks/chunk-IXAHQICR.js +31 -0
  30. package/chunks/{chunk-TH2LW437.js → chunk-KCA35IL3.js} +2 -190
  31. package/chunks/{chunk-VNRY6AWF.js → chunk-L2CCO4KE.js} +282 -34
  32. package/chunks/{chunk-6YNKRUMC.js → chunk-NJLKFC66.js} +321 -5
  33. package/chunks/{chunk-W6UWZFKL.js → chunk-O6KPVYOI.js} +100 -5
  34. package/chunks/{chunk-EGZGZFAH.js → chunk-OAS5SAVZ.js} +6768 -2100
  35. package/chunks/chunk-PS5E7LUQ.js +277 -0
  36. package/chunks/{chunk-2GV4HQKE.js → chunk-QVIRWJ45.js} +257 -145
  37. package/chunks/{chunk-OWLJYJ5O.js → chunk-QWK4R3DB.js} +9 -9
  38. package/chunks/{chunk-XFCTUKXR.js → chunk-RCRTSKQN.js} +1 -1
  39. package/chunks/chunk-RS4MAN3Q.js +73 -0
  40. package/chunks/{chunk-7UFUALR2.js → chunk-RTBZ36BD.js} +8 -274
  41. package/chunks/{chunk-TZFIAMWZ.js → chunk-SCWWLABR.js} +1 -1
  42. package/chunks/chunk-VDOWARMJ.js +63 -0
  43. package/chunks/{chunk-5MWAG3FT.js → chunk-WBRGXCU2.js} +79 -18
  44. package/chunks/{chunk-LCRTAQN2.js → chunk-WHUAUFSX.js} +1 -1
  45. package/chunks/{chunk-YIQSGNAA.js → chunk-XODDLNBI.js} +1535 -1306
  46. package/chunks/chunk-YAZARMJY.js +355 -0
  47. package/chunks/{chunk-OAYUPGF6.js → chunk-YED25PA4.js} +1 -1
  48. package/chunks/{codex-models-7TLJSY3L.js → codex-models-Z43V3427.js} +9 -3
  49. package/chunks/{commands-NEI7L3QA.js → commands-EUGF4FUZ.js} +5844 -4095
  50. package/chunks/{db-5AP3JB4W.js → db-NVAW4WWR.js} +3 -3
  51. package/chunks/{dist-3FNZIBB4.js → dist-27BNG6WD.js} +195 -112
  52. package/chunks/{dist-5YHYNLI3.js → dist-7RUOKPRJ.js} +12 -2
  53. package/chunks/{dist-KEULE5IQ.js → dist-LNXGATR2.js} +2 -2
  54. package/chunks/{dist-XZB53PS5.js → dist-M2X367VW.js} +2 -2
  55. package/chunks/{dist-DD4H6HMQ.js → dist-NG2HT5XU.js} +27 -1
  56. package/chunks/{eval-runner-43BO2C4T.js → eval-runner-6Q3H52SP.js} +13 -9
  57. package/chunks/{exploit-agent-N4A5ELBK.js → exploit-agent-FCCR2HYX.js} +1 -1
  58. package/chunks/{exploit-autoclimb-N7P6KIF5.js → exploit-autoclimb-X5ZS5FAO.js} +1 -1
  59. package/chunks/{exploit-climb-WNEJUB5W.js → exploit-climb-3JHGEO36.js} +2 -2
  60. package/chunks/{fix-Z452M4EC.js → fix-NSNPU33B.js} +12 -6
  61. package/chunks/{harness-QJJJVSG4.js → harness-KXQOVIDQ.js} +3 -3
  62. package/chunks/{hunt-scan-K6D2V3PX.js → hunt-scan-ELTKGKC4.js} +16 -12
  63. package/chunks/{kernel-primitive-TKUACPKD.js → kernel-primitive-MT7YZSIG.js} +2 -2
  64. package/chunks/{kernel-vm-runner-RAAO2PGT.js → kernel-vm-runner-YFRHYC6G.js} +2 -2
  65. package/chunks/{native-loop-2ZRJENZ3.js → native-loop-OFJDRHPI.js} +18 -8
  66. package/chunks/orchestrate-DRZ2SVCP.js +62 -0
  67. package/chunks/{prepare-KYHGFWCJ.js → prepare-72GWTRVI.js} +6 -2
  68. package/chunks/{process-N245QIQG.js → process-MJYJ2K5E.js} +2 -1
  69. package/chunks/{run-U3XU4CTC.js → run-WTJCZZHV.js} +3091 -6037
  70. package/chunks/{runtime-G75TEWQY.js → runtime-FCKOUB7V.js} +10 -4
  71. package/chunks/{runtime-XFWJTBUO.js → runtime-LCJ4XSKE.js} +5 -1
  72. package/chunks/{scan-stream-BMOCPKQX.js → scan-stream-GT6GKQ3U.js} +7 -1
  73. package/chunks/{scope-WXI46UHJ.js → scope-E5QZUOOH.js} +2 -2
  74. package/chunks/service-plugins-MSK2EQP6.js +62 -0
  75. package/chunks/{session-store-27L3ZU73.js → session-store-H3Q7KCYG.js} +6 -4
  76. package/chunks/{variant-candidates-YWZORZMK.js → variant-candidates-SZKDCOLK.js} +9 -3
  77. package/chunks/{web-recon-prepass-YVMFXCIK.js → web-recon-prepass-IO3GXQMW.js} +11 -6
  78. package/dashboard/apple-touch-icon.png +0 -0
  79. package/dashboard/assets/operations-BvB5Qpmk.css +1 -0
  80. package/dashboard/assets/operations-D8Ii01SV.js +114 -0
  81. package/dashboard/assets/zero-peek-Dzm3MT3X.png +0 -0
  82. package/dashboard/favicon.ico +0 -0
  83. package/dashboard/favicon.svg +10 -0
  84. package/dashboard/index.html +5 -3
  85. package/package.json +1 -1
  86. package/chunks/chunk-6GHSR47F.js +0 -147
  87. package/chunks/chunk-CAYANSH6.js +0 -3524
  88. package/chunks/chunk-GHWODZMR.js +0 -16
  89. package/chunks/chunk-MICHDTBK.js +0 -193
  90. package/chunks/orchestrate-2GWGNTBF.js +0 -58
  91. package/dashboard/assets/bot-Bg1Tp9_d.js +0 -1
  92. package/dashboard/assets/dist-B_dDCPbu.js +0 -1
  93. package/dashboard/assets/findings-page-mayGhNx6.js +0 -5
  94. package/dashboard/assets/format--susmHX7.js +0 -1
  95. package/dashboard/assets/input-TuVPR3Zl.js +0 -1
  96. package/dashboard/assets/jsx-runtime-MGseXjj5.js +0 -3
  97. package/dashboard/assets/live-page-HWWHX99U.js +0 -1
  98. package/dashboard/assets/meta-tile-ckHo-w7k.js +0 -1
  99. package/dashboard/assets/operations-BxZ0OoXO.js +0 -10
  100. package/dashboard/assets/operations-CMFVrXEe.css +0 -2
  101. package/dashboard/assets/operations-app-D3d35rgo.js +0 -46
  102. package/dashboard/assets/overview-page-W_4IteEr.js +0 -1
  103. package/dashboard/assets/page-header-Bw9AJgBV.js +0 -1
  104. package/dashboard/assets/scans-page-CgzVXHnn.js +0 -1
  105. package/dashboard/assets/siren-KQj8QAnJ.js +0 -1
  106. package/dashboard/assets/table-8EDklulN.js +0 -1
  107. package/dashboard/assets/tabs-CFHPOwg8.js +0 -1
@@ -10,7 +10,7 @@ import {
10
10
  } from "./chunk-UEX7PFSE.js";
11
11
  import {
12
12
  runReproducerInKernelVm
13
- } from "./chunk-XFCTUKXR.js";
13
+ } from "./chunk-RCRTSKQN.js";
14
14
 
15
15
  // packages/core/dist/kernel/exploit/harness.js
16
16
  import { existsSync } from "node:fs";
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ import { createRequire as __0CreateRequire } from "node:module";
3
+ const require = __0CreateRequire(import.meta.url);
4
+ import {
5
+ VERSION
6
+ } from "./chunk-6KFB6AYN.js";
7
+
8
+ // packages/cli/src/tui/runtime.ts
9
+ function getRuntimeMetadata() {
10
+ const bun = isBunRuntime();
11
+ return {
12
+ cliVersion: VERSION,
13
+ releaseChannel: process.env["ZERO_DEV_SOURCE_ROOT"]?.trim() ? "dev" : "beta",
14
+ engine: bun ? "Bun" : "Node.js",
15
+ engineVersion: bun ? process.versions.bun ?? "unknown" : process.version,
16
+ platform: process.platform,
17
+ arch: process.arch
18
+ };
19
+ }
20
+ function isBunRuntime() {
21
+ return typeof globalThis === "object" && globalThis !== null && "Bun" in globalThis;
22
+ }
23
+ function canUseOpenTui() {
24
+ return !!(process.stdout.isTTY && process.stdin.isTTY);
25
+ }
26
+
27
+ export {
28
+ getRuntimeMetadata,
29
+ isBunRuntime,
30
+ canUseOpenTui
31
+ };
@@ -2,6 +2,7 @@
2
2
  import { createRequire as __0CreateRequire } from "node:module";
3
3
  const require = __0CreateRequire(import.meta.url);
4
4
  import {
5
+ EventSourceParserStream,
5
6
  _enum,
6
7
  any,
7
8
  array,
@@ -16,7 +17,7 @@ import {
16
17
  toJSONSchema,
17
18
  union,
18
19
  unknown
19
- } from "./chunk-6YNKRUMC.js";
20
+ } from "./chunk-NJLKFC66.js";
20
21
  import {
21
22
  require_auth_errors,
22
23
  require_token_error,
@@ -583,195 +584,6 @@ function isJSONObject(value) {
583
584
  );
584
585
  }
585
586
 
586
- // node_modules/.pnpm/eventsource-parser@3.0.8/node_modules/eventsource-parser/dist/index.js
587
- var ParseError = class extends Error {
588
- constructor(message, options) {
589
- super(message), this.name = "ParseError", this.type = options.type, this.field = options.field, this.value = options.value, this.line = options.line;
590
- }
591
- };
592
- var LF = 10;
593
- var CR = 13;
594
- var SPACE = 32;
595
- function noop(_arg) {
596
- }
597
- function createParser(callbacks) {
598
- if (typeof callbacks == "function")
599
- throw new TypeError(
600
- "`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?"
601
- );
602
- const { onEvent = noop, onError = noop, onRetry = noop, onComment } = callbacks, pendingFragments = [];
603
- let isFirstChunk = true, id, data = "", dataLines = 0, eventType;
604
- function feed(chunk) {
605
- if (isFirstChunk && (isFirstChunk = false, chunk.charCodeAt(0) === 239 && chunk.charCodeAt(1) === 187 && chunk.charCodeAt(2) === 191 && (chunk = chunk.slice(3))), pendingFragments.length === 0) {
606
- const trailing2 = processLines(chunk);
607
- trailing2 !== "" && pendingFragments.push(trailing2);
608
- return;
609
- }
610
- if (chunk.indexOf(`
611
- `) === -1 && chunk.indexOf("\r") === -1) {
612
- pendingFragments.push(chunk);
613
- return;
614
- }
615
- pendingFragments.push(chunk);
616
- const input = pendingFragments.join("");
617
- pendingFragments.length = 0;
618
- const trailing = processLines(input);
619
- trailing !== "" && pendingFragments.push(trailing);
620
- }
621
- function processLines(chunk) {
622
- let searchIndex = 0;
623
- if (chunk.indexOf("\r") === -1) {
624
- let lfIndex = chunk.indexOf(`
625
- `, searchIndex);
626
- for (; lfIndex !== -1; ) {
627
- if (searchIndex === lfIndex) {
628
- dataLines > 0 && onEvent({ id, event: eventType, data }), id = void 0, data = "", dataLines = 0, eventType = void 0, searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
629
- `, searchIndex);
630
- continue;
631
- }
632
- const firstCharCode = chunk.charCodeAt(searchIndex);
633
- if (isDataPrefix(chunk, searchIndex, firstCharCode)) {
634
- const valueStart = chunk.charCodeAt(searchIndex + 5) === SPACE ? searchIndex + 6 : searchIndex + 5, value = chunk.slice(valueStart, lfIndex);
635
- if (dataLines === 0 && chunk.charCodeAt(lfIndex + 1) === LF) {
636
- onEvent({ id, event: eventType, data: value }), id = void 0, data = "", eventType = void 0, searchIndex = lfIndex + 2, lfIndex = chunk.indexOf(`
637
- `, searchIndex);
638
- continue;
639
- }
640
- data = dataLines === 0 ? value : `${data}
641
- ${value}`, dataLines++;
642
- } else isEventPrefix(chunk, searchIndex, firstCharCode) ? eventType = chunk.slice(
643
- chunk.charCodeAt(searchIndex + 6) === SPACE ? searchIndex + 7 : searchIndex + 6,
644
- lfIndex
645
- ) || void 0 : parseLine(chunk, searchIndex, lfIndex);
646
- searchIndex = lfIndex + 1, lfIndex = chunk.indexOf(`
647
- `, searchIndex);
648
- }
649
- return chunk.slice(searchIndex);
650
- }
651
- for (; searchIndex < chunk.length; ) {
652
- const crIndex = chunk.indexOf("\r", searchIndex), lfIndex = chunk.indexOf(`
653
- `, searchIndex);
654
- let lineEnd = -1;
655
- if (crIndex !== -1 && lfIndex !== -1 ? lineEnd = crIndex < lfIndex ? crIndex : lfIndex : crIndex !== -1 ? crIndex === chunk.length - 1 ? lineEnd = -1 : lineEnd = crIndex : lfIndex !== -1 && (lineEnd = lfIndex), lineEnd === -1)
656
- break;
657
- parseLine(chunk, searchIndex, lineEnd), searchIndex = lineEnd + 1, chunk.charCodeAt(searchIndex - 1) === CR && chunk.charCodeAt(searchIndex) === LF && searchIndex++;
658
- }
659
- return chunk.slice(searchIndex);
660
- }
661
- function parseLine(chunk, start, end) {
662
- if (start === end) {
663
- dispatchEvent();
664
- return;
665
- }
666
- const firstCharCode = chunk.charCodeAt(start);
667
- if (isDataPrefix(chunk, start, firstCharCode)) {
668
- const valueStart = chunk.charCodeAt(start + 5) === SPACE ? start + 6 : start + 5, value2 = chunk.slice(valueStart, end);
669
- data = dataLines === 0 ? value2 : `${data}
670
- ${value2}`, dataLines++;
671
- return;
672
- }
673
- if (isEventPrefix(chunk, start, firstCharCode)) {
674
- eventType = chunk.slice(chunk.charCodeAt(start + 6) === SPACE ? start + 7 : start + 6, end) || void 0;
675
- return;
676
- }
677
- if (firstCharCode === 105 && chunk.charCodeAt(start + 1) === 100 && chunk.charCodeAt(start + 2) === 58) {
678
- const value2 = chunk.slice(chunk.charCodeAt(start + 3) === SPACE ? start + 4 : start + 3, end);
679
- id = value2.includes("\0") ? void 0 : value2;
680
- return;
681
- }
682
- if (firstCharCode === 58) {
683
- if (onComment) {
684
- const line2 = chunk.slice(start, end);
685
- onComment(line2.slice(chunk.charCodeAt(start + 1) === SPACE ? 2 : 1));
686
- }
687
- return;
688
- }
689
- const line = chunk.slice(start, end), fieldSeparatorIndex = line.indexOf(":");
690
- if (fieldSeparatorIndex === -1) {
691
- processField(line, "", line);
692
- return;
693
- }
694
- const field = line.slice(0, fieldSeparatorIndex), offset = line.charCodeAt(fieldSeparatorIndex + 1) === SPACE ? 2 : 1, value = line.slice(fieldSeparatorIndex + offset);
695
- processField(field, value, line);
696
- }
697
- function processField(field, value, line) {
698
- switch (field) {
699
- case "event":
700
- eventType = value || void 0;
701
- break;
702
- case "data":
703
- data = dataLines === 0 ? value : `${data}
704
- ${value}`, dataLines++;
705
- break;
706
- case "id":
707
- id = value.includes("\0") ? void 0 : value;
708
- break;
709
- case "retry":
710
- /^\d+$/.test(value) ? onRetry(parseInt(value, 10)) : onError(
711
- new ParseError(`Invalid \`retry\` value: "${value}"`, {
712
- type: "invalid-retry",
713
- value,
714
- line
715
- })
716
- );
717
- break;
718
- default:
719
- onError(
720
- new ParseError(
721
- `Unknown field "${field.length > 20 ? `${field.slice(0, 20)}\u2026` : field}"`,
722
- { type: "unknown-field", field, value, line }
723
- )
724
- );
725
- break;
726
- }
727
- }
728
- function dispatchEvent() {
729
- dataLines > 0 && onEvent({
730
- id,
731
- event: eventType,
732
- data
733
- }), id = void 0, data = "", dataLines = 0, eventType = void 0;
734
- }
735
- function reset(options = {}) {
736
- if (options.consume && pendingFragments.length > 0) {
737
- const incompleteLine = pendingFragments.join("");
738
- parseLine(incompleteLine, 0, incompleteLine.length);
739
- }
740
- isFirstChunk = true, id = void 0, data = "", dataLines = 0, eventType = void 0, pendingFragments.length = 0;
741
- }
742
- return { feed, reset };
743
- }
744
- function isDataPrefix(chunk, i, firstCharCode) {
745
- return firstCharCode === 100 && chunk.charCodeAt(i + 1) === 97 && chunk.charCodeAt(i + 2) === 116 && chunk.charCodeAt(i + 3) === 97 && chunk.charCodeAt(i + 4) === 58;
746
- }
747
- function isEventPrefix(chunk, i, firstCharCode) {
748
- return firstCharCode === 101 && chunk.charCodeAt(i + 1) === 118 && chunk.charCodeAt(i + 2) === 101 && chunk.charCodeAt(i + 3) === 110 && chunk.charCodeAt(i + 4) === 116 && chunk.charCodeAt(i + 5) === 58;
749
- }
750
-
751
- // node_modules/.pnpm/eventsource-parser@3.0.8/node_modules/eventsource-parser/dist/stream.js
752
- var EventSourceParserStream = class extends TransformStream {
753
- constructor({ onError, onRetry, onComment } = {}) {
754
- let parser;
755
- super({
756
- start(controller) {
757
- parser = createParser({
758
- onEvent: (event) => {
759
- controller.enqueue(event);
760
- },
761
- onError(error) {
762
- onError === "terminate" ? controller.error(error) : typeof onError == "function" && onError(error);
763
- },
764
- onRetry,
765
- onComment
766
- });
767
- },
768
- transform(chunk) {
769
- parser.feed(chunk);
770
- }
771
- });
772
- }
773
- };
774
-
775
587
  // node_modules/.pnpm/@workflow+serde@4.1.0/node_modules/@workflow/serde/dist/index.js
776
588
  var WORKFLOW_SERIALIZE = /* @__PURE__ */ Symbol.for("workflow-serialize");
777
589
  var WORKFLOW_DESERIALIZE = /* @__PURE__ */ Symbol.for("workflow-deserialize");