0sec-cli 0.22.4 → 0.23.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.
- package/0.js +47 -41
- package/README.md +68 -60
- package/chunks/{adapt-loop-3CCOWE43.js → adapt-loop-V3JFWOKC.js} +4 -4
- package/chunks/{artifact-scraper-Z4UUIOH3.js → artifact-scraper-NYKUF2M5.js} +2 -2
- package/chunks/{assumption-mining-2UAKQB6V.js → assumption-mining-ZX3YVWEH.js} +17 -17
- package/chunks/backend-connections-H52NIVH2.js +23 -0
- package/chunks/{chunk-YED25PA4.js → chunk-3E54JYS4.js} +1 -1
- package/chunks/{chunk-FFHRANYC.js → chunk-3P3XXSIJ.js} +4 -88
- package/chunks/{chunk-5WAJGLCW.js → chunk-3ZNI7F42.js} +3 -3
- package/chunks/{chunk-OAS5SAVZ.js → chunk-4HGGNBKK.js} +703 -190
- package/chunks/{chunk-TM74SSHC.js → chunk-62ENS6XO.js} +1 -1
- package/chunks/{chunk-CPCHLL6A.js → chunk-65H3MRBF.js} +1 -1
- package/chunks/{chunk-6YZE552K.js → chunk-A2ADXAC5.js} +131 -405
- package/chunks/{chunk-4ZYYX5GY.js → chunk-A5QO7N3S.js} +1 -1
- package/chunks/{chunk-CF3MNS3O.js → chunk-AAA4PRWK.js} +2 -2
- package/chunks/{chunk-QVIRWJ45.js → chunk-BF5FIK7H.js} +3 -3
- package/chunks/{chunk-YAZARMJY.js → chunk-CP6HANBE.js} +2 -2
- package/chunks/{chunk-H6Q2QAIY.js → chunk-EH2WTNY7.js} +35 -35
- package/chunks/{chunk-ELI3BVIK.js → chunk-EJH2TNVH.js} +3 -3
- package/chunks/chunk-EWXOG6D3.js +1695 -0
- package/chunks/{chunk-RCRTSKQN.js → chunk-F344NYUN.js} +1 -1
- package/chunks/chunk-FXR3BT2G.js +226 -0
- package/chunks/{chunk-XODDLNBI.js → chunk-HFDSIHTE.js} +92 -13
- package/chunks/{chunk-BGX53365.js → chunk-I3OCJ2OA.js} +1 -1
- package/chunks/{chunk-C6JPA32H.js → chunk-ITES7BCY.js} +1 -1
- package/chunks/{chunk-SCWWLABR.js → chunk-JEYIWMGL.js} +1 -1
- package/chunks/{chunk-G2BE2FC7.js → chunk-K55B4OH4.js} +1 -1
- package/chunks/{chunk-GQ3DGHWE.js → chunk-KHPOSLCF.js} +2 -2
- package/chunks/chunk-LT7BFGXA.js +733 -0
- package/chunks/{chunk-6KFB6AYN.js → chunk-LTEE2JWK.js} +286 -15
- package/chunks/{chunk-DPUXXMJW.js → chunk-LVGZGG63.js} +1 -1
- package/chunks/{chunk-PS5E7LUQ.js → chunk-MQJVU2GZ.js} +6 -6
- package/chunks/{chunk-2WWAPKAW.js → chunk-NI6QYQSK.js} +3 -3
- package/chunks/{chunk-5JNTMWPK.js → chunk-NX4H6L4M.js} +2 -2
- package/chunks/{chunk-WHUAUFSX.js → chunk-O6Z4XPOM.js} +1 -1
- package/chunks/{chunk-RTBZ36BD.js → chunk-OLSKXTQZ.js} +2 -2
- package/chunks/{chunk-H4DH7COV.js → chunk-P7KDN5PK.js} +25 -15
- package/chunks/chunk-PIR6BNE7.js +83 -0
- package/chunks/{chunk-E3OOBVOK.js → chunk-QMICC5O2.js} +2 -2
- package/chunks/chunk-R35KKJA4.js +90 -0
- package/chunks/{chunk-L2CCO4KE.js → chunk-T7ZEVY5G.js} +26 -1
- package/chunks/{chunk-IXAHQICR.js → chunk-TPUJZ74W.js} +7 -2
- package/chunks/{chunk-WBRGXCU2.js → chunk-UZUELPFW.js} +1 -1
- package/chunks/{chunk-QWK4R3DB.js → chunk-V2BWXPZP.js} +6 -6
- package/chunks/{chunk-3BPX75OR.js → chunk-W5VNCB57.js} +1 -1
- package/chunks/{chunk-E74LXQFY.js → chunk-WIYNYNL2.js} +1 -1
- package/chunks/chunk-WYNZFNMF.js +457 -0
- package/chunks/{chunk-IHPTOTLL.js → chunk-XORZUR2H.js} +1 -1
- package/chunks/{chunk-2OQOQ2FZ.js → chunk-Y4HJRUFE.js} +20 -4
- package/chunks/{chunk-GVY3S5E5.js → chunk-YAEJAZYW.js} +2 -2
- package/chunks/{chunk-6WQDXWQC.js → chunk-YYS2H33A.js} +2 -2
- package/chunks/{codex-models-Z43V3427.js → codex-models-Y457ND6Q.js} +6 -6
- package/chunks/{commands-EUGF4FUZ.js → commands-PBDAOZKA.js} +1842 -2509
- package/chunks/{db-NVAW4WWR.js → db-TPSI552V.js} +3 -3
- package/chunks/deep-review-DKED6EN5.js +81 -0
- package/chunks/{dist-27BNG6WD.js → dist-4LGRIBOC.js} +44 -30
- package/chunks/{dist-7RUOKPRJ.js → dist-7Q5A6TQM.js} +2 -2
- package/chunks/{dist-NG2HT5XU.js → dist-RLPNLRZD.js} +53 -1
- package/chunks/{eval-runner-6Q3H52SP.js → eval-runner-RZKDOQ2G.js} +13 -13
- package/chunks/{exploit-agent-FCCR2HYX.js → exploit-agent-RMFYNG7H.js} +1 -1
- package/chunks/{exploit-autoclimb-X5ZS5FAO.js → exploit-autoclimb-2A2PQI4E.js} +1 -1
- package/chunks/{exploit-climb-3JHGEO36.js → exploit-climb-DEJ232QN.js} +2 -2
- package/chunks/{fix-NSNPU33B.js → fix-JGBW7XUN.js} +6 -6
- package/chunks/{harness-KXQOVIDQ.js → harness-CBOLMUHB.js} +3 -3
- package/chunks/{hunt-scan-ELTKGKC4.js → hunt-scan-MIRMABY4.js} +15 -15
- package/chunks/{kernel-primitive-MT7YZSIG.js → kernel-primitive-NAPDMJC7.js} +2 -2
- package/chunks/{kernel-vm-runner-YFRHYC6G.js → kernel-vm-runner-PR5OSDQ2.js} +2 -2
- package/chunks/managed-operation-YNQQEA5V.js +59 -0
- package/chunks/{memsafety-scan-FCPAXIZE.js → memsafety-scan-RPS446CD.js} +2 -2
- package/chunks/{native-loop-OFJDRHPI.js → native-loop-CGOJMNHV.js} +12 -12
- package/chunks/{orchestrate-DRZ2SVCP.js → orchestrate-5NK34H3W.js} +30 -30
- package/chunks/{prepare-72GWTRVI.js → prepare-YVNENPNL.js} +5 -5
- package/chunks/remote-workflow-runtime-RGQ5ECMN.js +96 -0
- package/chunks/{run-WTJCZZHV.js → run-VH4OIDKF.js} +73 -56
- package/chunks/{runtime-LCJ4XSKE.js → runtime-4TAJFVF7.js} +4 -2
- package/chunks/{runtime-FCKOUB7V.js → runtime-HWL6HG7A.js} +6 -6
- package/chunks/{scan-stream-GT6GKQ3U.js → scan-stream-HJAZJONE.js} +2 -2
- package/chunks/{scope-E5QZUOOH.js → scope-Q5PIX2IS.js} +2 -2
- package/chunks/service-plugins-QYFITODK.js +63 -0
- package/chunks/{session-store-H3Q7KCYG.js → session-store-2FEIZGSV.js} +2 -2
- package/chunks/{variant-candidates-SZKDCOLK.js → variant-candidates-TX5V6XOT.js} +6 -6
- package/chunks/{web-recon-prepass-IO3GXQMW.js → web-recon-prepass-6HOUGF7Q.js} +5 -5
- package/chunks/workflow-runtime-ZEEBJFQG.js +64 -0
- package/dashboard/assets/abnfDiagram-VCTEODGH-BuvumFYR.js +1 -0
- package/dashboard/assets/arc-DZzWDuCG.js +1 -0
- package/dashboard/assets/architecture-7GRP2DOG-DK9bv1Md.js +1 -0
- package/dashboard/assets/architectureDiagram-5GKGNRK7-Bw5el_EL.js +36 -0
- package/dashboard/assets/array-BifhSqXX.js +1 -0
- package/dashboard/assets/blockDiagram-I7D4REHJ-BjVLEApp.js +129 -0
- package/dashboard/assets/c4Diagram-7LVT6UL2-B9nNzx2J.js +38 -0
- package/dashboard/assets/channel-Ck17eKdX.js +1 -0
- package/dashboard/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/dashboard/assets/chunk-4HAMMTFA-y72Q95nW.js +62 -0
- package/dashboard/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/dashboard/assets/chunk-75Z2AOVW-BOhrOGMO.js +2 -0
- package/dashboard/assets/chunk-DU6HZSFF-B0EhAaNb.js +127 -0
- package/dashboard/assets/chunk-F27PBJKO-BR-hiDvM.js +1 -0
- package/dashboard/assets/chunk-FOHPRMQF-DHwB1DNv.js +161 -0
- package/dashboard/assets/chunk-GMAD6QVW-H15vJYXg.js +72 -0
- package/dashboard/assets/chunk-GVQU2GXP-BRndps0o.js +1 -0
- package/dashboard/assets/chunk-IMKFNOWR-CIzC_OWx.js +231 -0
- package/dashboard/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/dashboard/assets/chunk-L3NEJ4N5-NR4P1Vko.js +1 -0
- package/dashboard/assets/chunk-OSK3NFVY-DtjTDf8S.js +10 -0
- package/dashboard/assets/chunk-P2QGCYS3-CYT11Qjx.js +1 -0
- package/dashboard/assets/chunk-POPQ4Y6H-Duj2Ygwu.js +1 -0
- package/dashboard/assets/chunk-PWAF6VOD-z4p5Tf_y.js +1 -0
- package/dashboard/assets/chunk-SHT3W25Y-DYeLYLS3.js +168 -0
- package/dashboard/assets/chunk-SVP7TREG-BKowxCVI.js +88 -0
- package/dashboard/assets/chunk-TICWLB2K-GDAwEFlH.js +206 -0
- package/dashboard/assets/chunk-XXDRQBXY-DRD79Mjx.js +1 -0
- package/dashboard/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/dashboard/assets/classDiagram-ZZMXUADV-BaeZA6LE.js +1 -0
- package/dashboard/assets/classDiagram-v2-VYDZK3BY-BaeZA6LE.js +1 -0
- package/dashboard/assets/common-vnzd7UOF.js +5 -0
- package/dashboard/assets/cose-bilkent-JH36ORCC-GqCLsRyf.js +1 -0
- package/dashboard/assets/cynefin-OW5HDTMX-CJN9YwWN.js +1 -0
- package/dashboard/assets/cynefinDiagram-5FMLGOSQ-DVJHCYQY.js +62 -0
- package/dashboard/assets/cytoscape.esm-CGd-uY3x.js +321 -0
- package/dashboard/assets/dagre-GXQ25YYZ-BMCrrJJR.js +4 -0
- package/dashboard/assets/dagre-PrKaheQc.js +1 -0
- package/dashboard/assets/defaultLocale-BFoDCU3G.js +1 -0
- package/dashboard/assets/diagram-S7CK7UJ4-CLYDdOEm.js +30 -0
- package/dashboard/assets/diagram-UQ7AKVKN-CnPuAZK7.js +41 -0
- package/dashboard/assets/diagram-VSXAHHWV-Cr2I2DnG.js +3 -0
- package/dashboard/assets/diagram-VX7I27RA-_mGW1wpp.js +24 -0
- package/dashboard/assets/diagram-Z3DM3KII-igybB0l9.js +24 -0
- package/dashboard/assets/dist-Bb7_-x5y.js +1 -0
- package/dashboard/assets/ebnfDiagram-PWID7BFC-CVCICf2R.js +1 -0
- package/dashboard/assets/erDiagram-RLTQ6QDP-CRjnfgxj.js +99 -0
- package/dashboard/assets/eventmodeling-NTZA5JFV-po5oDydv.js +1 -0
- package/dashboard/assets/flowDiagram-HODETNUW-TSV9s7q4.js +1 -0
- package/dashboard/assets/ganttDiagram-EL5Y4UJY-DppD7sD7.js +292 -0
- package/dashboard/assets/gitGraph-4MIJSDKK-Tw0vNnQc.js +1 -0
- package/dashboard/assets/gitGraphDiagram-WWUBYQGX-Cpf96-z3.js +106 -0
- package/dashboard/assets/graphlib-DS17s2tU.js +1 -0
- package/dashboard/assets/info-A6RAGUB7-DLyt9arx.js +1 -0
- package/dashboard/assets/infoDiagram-27XIBGKW-B6_piSNS.js +2 -0
- package/dashboard/assets/init-C-OQMol4.js +1 -0
- package/dashboard/assets/ishikawaDiagram-5VMMS53U-DvMO0B0X.js +70 -0
- package/dashboard/assets/journeyDiagram-3NMN7TZE-f7ZK98b6.js +139 -0
- package/dashboard/assets/kanban-definition-UXKFOSKX-Dso0nAxL.js +89 -0
- package/dashboard/assets/katex-CXMH3UgJ.js +257 -0
- package/dashboard/assets/line-VcKaFG0G.js +1 -0
- package/dashboard/assets/linear-D7YnpiWh.js +1 -0
- package/dashboard/assets/mermaid-parser.core-DriL2hrV.js +7 -0
- package/dashboard/assets/mermaid.core-DJWYDh_P.js +44 -0
- package/dashboard/assets/mindmap-definition-YA3MSWOX-DZsoIeac.js +96 -0
- package/dashboard/assets/operations-BIaUSnYv.js +121 -0
- package/dashboard/assets/operations-BeCdkT4S.css +1 -0
- package/dashboard/assets/ordinal-BDEzSJ7C.js +1 -0
- package/dashboard/assets/packet-AYTQ26CC-BQBIXKxk.js +1 -0
- package/dashboard/assets/path-fybaL0A-.js +1 -0
- package/dashboard/assets/pegDiagram-XKGWAZYB-B0-lslgW.js +1 -0
- package/dashboard/assets/pie-WAS4IAKB-DoY6dwQs.js +1 -0
- package/dashboard/assets/pieDiagram-E7YTZNPT-ElmdRjp5.js +39 -0
- package/dashboard/assets/quadrantDiagram-AXDQQJYC-Ci1h98Q2.js +7 -0
- package/dashboard/assets/radar-RG4KPBEZ-DHod2WgB.js +1 -0
- package/dashboard/assets/railroad-74A4TZTK-90JxB4xV.js +1 -0
- package/dashboard/assets/railroad-abnf-HS5TGJTU-BkXGl114.js +1 -0
- package/dashboard/assets/railroad-ebnf-LZEXJU2U-QVAERn2C.js +1 -0
- package/dashboard/assets/railroad-peg-WCYAUIDC-B1-PM01z.js +1 -0
- package/dashboard/assets/railroadDiagram-O6MQD6OU-k3190A6L.js +1 -0
- package/dashboard/assets/requirementDiagram-BXWQKSXE-C3-eR7I5.js +84 -0
- package/dashboard/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/dashboard/assets/sankeyDiagram-P5KCCOFB-Bc86pi8w.js +40 -0
- package/dashboard/assets/sequenceDiagram-WJ2MYXX4-Bv_MvEmz.js +162 -0
- package/dashboard/assets/sizeCapture-INFHLROL-B0uUizjq.js +1 -0
- package/dashboard/assets/src-D7Dqq5yP.js +1 -0
- package/dashboard/assets/stateDiagram-D77RDMKH-Bq_GVmeW.js +1 -0
- package/dashboard/assets/stateDiagram-v2-MP3YSRHH-z1XRaftz.js +1 -0
- package/dashboard/assets/swimlanes-42K2YHIH-q0iK-e0P.js +1 -0
- package/dashboard/assets/swimlanesDiagram-VR7AAH4N-C9L6XBQj.js +8 -0
- package/dashboard/assets/timeline-definition-24CTP7MA-CNfF07hM.js +120 -0
- package/dashboard/assets/treeView-Q6P3EWNA-m629ePnS.js +1 -0
- package/dashboard/assets/treemap-WGGIJYW6-D9Cb2ETv.js +1 -0
- package/dashboard/assets/vennDiagram-4TSXK5OY-v4dKF-FE.js +34 -0
- package/dashboard/assets/wardley-WFR3VGLG-DkwH_nRe.js +1 -0
- package/dashboard/assets/wardleyDiagram-VM6X3IG4-3ImohVu4.js +78 -0
- package/dashboard/assets/xychartDiagram-S5SC5T6Z-QJu3dm7K.js +7 -0
- package/dashboard/assets/zero-connect-BGDY0PMZ.webp +0 -0
- package/dashboard/assets/zero-curious-DovTLOs8.webp +0 -0
- package/dashboard/assets/zero-planning-CBeHDrG_.webp +0 -0
- package/dashboard/index.html +2 -2
- package/package.json +1 -1
- package/chunks/service-plugins-MSK2EQP6.js +0 -62
- package/dashboard/assets/operations-BvB5Qpmk.css +0 -1
- package/dashboard/assets/operations-D8Ii01SV.js +0 -114
|
@@ -67,7 +67,7 @@ import { fileURLToPath } from "node:url";
|
|
|
67
67
|
import { dirname, join } from "node:path";
|
|
68
68
|
function loadVersion() {
|
|
69
69
|
if (true) {
|
|
70
|
-
return "0.
|
|
70
|
+
return "0.23.0";
|
|
71
71
|
}
|
|
72
72
|
try {
|
|
73
73
|
const here = dirname(fileURLToPath(import.meta.url));
|
|
@@ -1546,10 +1546,63 @@ var executionSchema = external_exports.object({
|
|
|
1546
1546
|
instructions: external_exports.string().trim().max(16e3),
|
|
1547
1547
|
allowedAgentTools: external_exports.array(external_exports.string().trim().min(1).max(128).regex(/^[A-Za-z0-9_.:-]+$/)).max(128).refine((tools) => new Set(tools).size === tools.length, "Agent tool names must be unique.").optional()
|
|
1548
1548
|
}).strict();
|
|
1549
|
-
var
|
|
1549
|
+
var SECURITY_WORKFLOW_OPERATIONS = ["audit", "verify", "fix", "research", "deep-review"];
|
|
1550
|
+
function isSecurityWorkflowOperation(node) {
|
|
1551
|
+
return SECURITY_WORKFLOW_OPERATIONS.includes(node.type);
|
|
1552
|
+
}
|
|
1553
|
+
var SecurityWorkflowBindingsSchema = external_exports.unknown().superRefine((bindings, context) => {
|
|
1554
|
+
const pending = [{ value: bindings, depth: 0 }];
|
|
1555
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1556
|
+
let visited = 0;
|
|
1557
|
+
while (pending.length) {
|
|
1558
|
+
const { value, depth } = pending.pop();
|
|
1559
|
+
if (++visited > 1e4 || depth > 20) {
|
|
1560
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Workflow inputs exceed nesting or item limits." });
|
|
1561
|
+
return;
|
|
1562
|
+
}
|
|
1563
|
+
if (value === null || typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value))
|
|
1564
|
+
continue;
|
|
1565
|
+
if (typeof value !== "object" || seen.has(value)) {
|
|
1566
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Workflow inputs must contain finite JSON values without cycles." });
|
|
1567
|
+
return;
|
|
1568
|
+
}
|
|
1569
|
+
if (!Array.isArray(value) && Object.getPrototypeOf(value) !== Object.prototype && Object.getPrototypeOf(value) !== null) {
|
|
1570
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Workflow inputs must contain plain JSON objects." });
|
|
1571
|
+
return;
|
|
1572
|
+
}
|
|
1573
|
+
seen.add(value);
|
|
1574
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
1575
|
+
if (["__proto__", "constructor", "prototype"].includes(key)) {
|
|
1576
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Reserved workflow input key." });
|
|
1577
|
+
return;
|
|
1578
|
+
}
|
|
1579
|
+
pending.push({ value: entry, depth: depth + 1 });
|
|
1580
|
+
}
|
|
1581
|
+
}
|
|
1582
|
+
if (new TextEncoder().encode(JSON.stringify(bindings)).byteLength > 32768)
|
|
1583
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Workflow inputs must be at most 32 KiB." });
|
|
1584
|
+
}).pipe(external_exports.record(external_exports.unknown()));
|
|
1585
|
+
var inputSchema = external_exports.object({ findingId: identifier.optional(), scanId: identifier.optional(), dbPath: external_exports.string().trim().min(1).max(4096).optional(), fromStep: identifier.optional(), artifactId: identifier.optional() }).strict();
|
|
1586
|
+
var nodeSchema = external_exports.object({ id: identifier, type: external_exports.enum(["trigger", "audit", "report", "verify", "fix", "research", "deep-review"]), label: external_exports.string().trim().min(1).max(160), enabled: external_exports.boolean(), plan: planSchema.optional(), execution: executionSchema.optional(), input: inputSchema.optional(), inputs: SecurityWorkflowBindingsSchema.superRefine((bindings, context) => {
|
|
1587
|
+
const pending = [bindings];
|
|
1588
|
+
const visited = /* @__PURE__ */ new Set();
|
|
1589
|
+
while (pending.length) {
|
|
1590
|
+
const value = pending.pop();
|
|
1591
|
+
if (!value || typeof value !== "object" || visited.has(value))
|
|
1592
|
+
continue;
|
|
1593
|
+
visited.add(value);
|
|
1594
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
1595
|
+
if (["allowApply", "applyApproval", "approval", "secrets", "apiKey"].includes(key))
|
|
1596
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Portable step inputs cannot contain authorization grants or secrets." });
|
|
1597
|
+
if (entry && typeof entry === "object")
|
|
1598
|
+
pending.push(entry);
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
}).optional(), fix: external_exports.object({ mode: external_exports.enum(["candidate", "apply"]) }).strict().optional() }).strict();
|
|
1550
1602
|
var SecurityWorkflowInputSchema = external_exports.object({
|
|
1551
1603
|
id: identifier.optional(),
|
|
1552
1604
|
revision: external_exports.number().int().positive().optional(),
|
|
1605
|
+
template: external_exports.object({ id: identifier, revision: external_exports.number().int().positive() }).strict().optional(),
|
|
1553
1606
|
name: external_exports.string().trim().min(1).max(160),
|
|
1554
1607
|
instructions: external_exports.string().trim().max(16e3),
|
|
1555
1608
|
target: external_exports.string().trim().max(4096),
|
|
@@ -1565,12 +1618,14 @@ var SecurityWorkflowInputSchema = external_exports.object({
|
|
|
1565
1618
|
issue("A workflow requires exactly one trigger.");
|
|
1566
1619
|
if (triggers.some((node) => !node.enabled))
|
|
1567
1620
|
issue("The manual trigger must remain enabled.");
|
|
1568
|
-
if (!workflow.nodes.some(
|
|
1569
|
-
issue("A workflow requires at least one
|
|
1621
|
+
if (!workflow.nodes.some(isSecurityWorkflowOperation))
|
|
1622
|
+
issue("A workflow requires at least one executable step.");
|
|
1570
1623
|
if (workflow.nodes.filter((node) => node.type === "report").length > 1)
|
|
1571
1624
|
issue("A workflow supports at most one report.");
|
|
1572
|
-
if (workflow.nodes.some((node) => node
|
|
1573
|
-
issue("Only
|
|
1625
|
+
if (workflow.nodes.some((node) => !isSecurityWorkflowOperation(node) && (node.plan !== void 0 || node.execution !== void 0 || node.input !== void 0 || node.inputs !== void 0)))
|
|
1626
|
+
issue("Only executable steps accept plans, policies, and input bindings.");
|
|
1627
|
+
if (workflow.nodes.some((node) => node.type !== "fix" && node.fix !== void 0))
|
|
1628
|
+
issue("Only fix steps accept fix options.");
|
|
1574
1629
|
const edges = /* @__PURE__ */ new Set();
|
|
1575
1630
|
const successors = /* @__PURE__ */ new Map();
|
|
1576
1631
|
for (const edge of workflow.edges) {
|
|
@@ -1586,6 +1641,22 @@ var SecurityWorkflowInputSchema = external_exports.object({
|
|
|
1586
1641
|
if (target?.type === "trigger" || source?.type === "report")
|
|
1587
1642
|
issue("Triggers must start the graph and reports must end it.");
|
|
1588
1643
|
}
|
|
1644
|
+
for (const node of workflow.nodes) {
|
|
1645
|
+
if (!node.input?.fromStep)
|
|
1646
|
+
continue;
|
|
1647
|
+
const ancestors = /* @__PURE__ */ new Set();
|
|
1648
|
+
const pending = workflow.edges.filter((edge) => edge.target === node.id).map((edge) => edge.source);
|
|
1649
|
+
while (pending.length) {
|
|
1650
|
+
const id = pending.pop();
|
|
1651
|
+
if (ancestors.has(id))
|
|
1652
|
+
continue;
|
|
1653
|
+
ancestors.add(id);
|
|
1654
|
+
pending.push(...workflow.edges.filter((edge) => edge.target === id).map((edge) => edge.source));
|
|
1655
|
+
}
|
|
1656
|
+
const referenced = workflow.nodes.find((entry) => entry.id === node.input.fromStep);
|
|
1657
|
+
if (node.input.fromStep === node.id || !referenced || !isSecurityWorkflowOperation(referenced) || !ancestors.has(node.input.fromStep))
|
|
1658
|
+
issue("Step input references must name a connected preceding executable step.");
|
|
1659
|
+
}
|
|
1589
1660
|
const visiting = /* @__PURE__ */ new Set();
|
|
1590
1661
|
const visited = /* @__PURE__ */ new Set();
|
|
1591
1662
|
const visit = (id) => {
|
|
@@ -1619,12 +1690,12 @@ var SecurityWorkflowInputSchema = external_exports.object({
|
|
|
1619
1690
|
});
|
|
1620
1691
|
function parseSecurityWorkflowInput(value) {
|
|
1621
1692
|
const workflow = SecurityWorkflowInputSchema.parse(value);
|
|
1622
|
-
return { ...workflow, nodes: workflow.nodes.map((node) => node
|
|
1693
|
+
return { ...workflow, nodes: workflow.nodes.map((node) => isSecurityWorkflowOperation(node) ? { ...node, plan: node.plan ?? { ...DEFAULT_SECURITY_WORKFLOW_PLAN }, ...node.type === "fix" ? { fix: node.fix ?? { mode: "candidate" } } : {} } : node) };
|
|
1623
1694
|
}
|
|
1624
1695
|
var codeEnvelope = external_exports.object({ schemaVersion: external_exports.literal(1), workflow: external_exports.unknown() }).strict();
|
|
1625
1696
|
function exportSecurityWorkflowCode(value) {
|
|
1626
|
-
const { name, instructions, target, nodes, edges } = value;
|
|
1627
|
-
const parsed = parseSecurityWorkflowInput({ name, instructions, target, nodes, edges });
|
|
1697
|
+
const { name, instructions, target, nodes, edges, template: template2 } = value;
|
|
1698
|
+
const parsed = parseSecurityWorkflowInput({ name, instructions, target, nodes, edges, ...template2 ? { template: template2 } : {} });
|
|
1628
1699
|
const json = JSON.stringify({ schemaVersion: 1, workflow: parsed }, null, 2);
|
|
1629
1700
|
if (new TextEncoder().encode(json).byteLength > 65536)
|
|
1630
1701
|
throw new Error("Workflow JSON must be at most 64 KiB.");
|
|
@@ -1650,9 +1721,15 @@ function phase(id, label, goal, instructions, depth = "default") {
|
|
|
1650
1721
|
return { id, type: "audit", label, enabled: true, plan: { goal, depth, runCount: 1, executionMode: "sequential", timeCapMs: 6e5, costCapUsd: 5 }, execution: { instructions } };
|
|
1651
1722
|
}
|
|
1652
1723
|
function template(id, name, description, category, phases) {
|
|
1653
|
-
const nodes = [{ id: "start", type: "trigger", label: "Start manually", enabled: true }, ...phases, { id: "report", type: "report", label: "Collect
|
|
1654
|
-
|
|
1724
|
+
const nodes = [{ id: "start", type: "trigger", label: "Start manually", enabled: true }, ...phases, { id: "report", type: "report", label: "Collect results", enabled: true }];
|
|
1725
|
+
const compatibleTargetTypes = category === "web" || category === "security" ? ["url", "web-app"] : category === "package" ? ["source-code", "npm-package", "pypi-package", "cargo-package"] : ["source-code"];
|
|
1726
|
+
return { id, revision: 1, name, description, category, compatibleTargetTypes, executor: "assessment", profile: "default", expectedOutputs: ["findings", "artifacts"], inputRequirements: [], definition: parseSecurityWorkflowInput({ name, instructions: description, target: "", nodes, edges: nodes.slice(1).map((node, index) => ({ source: nodes[index].id, target: node.id })) }) };
|
|
1727
|
+
}
|
|
1728
|
+
function operationTemplate(id, name, description, operation, compatibleTargetTypes, inputRequirements, inputs) {
|
|
1729
|
+
const base = template(id, name, description, "repository", [{ id: "operation", type: operation, label: name, enabled: true, ...inputs ? { inputs } : {} }]);
|
|
1730
|
+
return { ...base, executor: operation, compatibleTargetTypes, inputRequirements, expectedOutputs: operation === "fix" ? ["candidate", "validation", "artifacts"] : operation === "verify" ? ["verification", "artifacts"] : ["findings", "artifacts"] };
|
|
1655
1731
|
}
|
|
1732
|
+
var FINDING_INPUT_REQUIREMENT = { names: ["finding", "findingPath", "findingId"], required: true, description: "Supply an existing finding, a finding JSON path, or a retained finding ID. Connected earlier finding evidence can also provide the input." };
|
|
1656
1733
|
var SECURITY_WORKFLOW_TEMPLATES = [
|
|
1657
1734
|
template("repository-review", "Repository security review", "Review a local repository's trust boundaries, dependency exposure, and security-sensitive code.", "repository", [
|
|
1658
1735
|
phase("dependencies", "Dependency exposure", "known-vulnerabilities", "Inspect dependency manifests and lockfiles. Prioritize reachable vulnerable dependencies and supply-chain trust boundaries; distinguish confirmed exposure from version-only matches.", "quick"),
|
|
@@ -1690,13 +1767,30 @@ var SECURITY_WORKFLOW_TEMPLATES = [
|
|
|
1690
1767
|
template("native-code-review", "Native code boundary review", "Review an authorized native source repository for parser, memory, and privilege-boundary issues.", "repository", [
|
|
1691
1768
|
phase("parsers", "Parsers and memory boundaries", "unknown-vulnerabilities", "Trace untrusted input through parsing, length calculations, ownership, and memory operations. Prioritize reachable paths and concrete invalid-state evidence in the authorized source.", "deep"),
|
|
1692
1769
|
phase("privileges", "Privilege and resource boundaries", "unknown-vulnerabilities", "Review privilege transitions, filesystem paths, subprocess inputs, concurrency, and resource lifetime. Avoid speculative issues without a supported attacker-controlled path.", "deep")
|
|
1693
|
-
])
|
|
1770
|
+
]),
|
|
1771
|
+
operationTemplate("finding-verification", "Finding verification", "Verify an existing finding using an explicitly selected execution runner and preserve the verification evidence.", "verify", ["source-code", "url", "web-app"], [FINDING_INPUT_REQUIREMENT, { names: ["runner"], required: true, description: "Select local, smolvm, docker, or qemu. Existing verification scope and prerequisite checks apply." }]),
|
|
1772
|
+
operationTemplate("fix-candidate", "Fix candidate and validation", "Propose and test a source fix candidate without applying it to the repository.", "fix", ["source-code"], [FINDING_INPUT_REQUIREMENT, { names: ["testCommand"], required: true, description: "Provide the explicit repository regression test command." }]),
|
|
1773
|
+
operationTemplate("security-research", "Security research", "Run the existing security research pipeline against an authorized source repository, retaining findings and research artifacts.", "research", ["source-code"], [], { engine: "pipeline" }),
|
|
1774
|
+
operationTemplate("deep-source-review", "Deep source review", "Run the existing deep source review engine against an authorized repository, retaining its supported evidence and results.", "deep-review", ["source-code"], [])
|
|
1694
1775
|
];
|
|
1695
|
-
function
|
|
1776
|
+
function getSecurityWorkflowTemplate(id, revision) {
|
|
1696
1777
|
const found = SECURITY_WORKFLOW_TEMPLATES.find((entry) => entry.id === id);
|
|
1697
1778
|
if (!found)
|
|
1698
1779
|
throw new Error("Unknown security workflow template.");
|
|
1699
|
-
|
|
1780
|
+
if (revision !== void 0 && revision !== found.revision)
|
|
1781
|
+
throw new Error(`Template revision mismatch: ${id} is revision ${found.revision}.`);
|
|
1782
|
+
return structuredClone(found);
|
|
1783
|
+
}
|
|
1784
|
+
function checkSecurityWorkflowTemplateTarget(template2, targetType) {
|
|
1785
|
+
if (!template2.compatibleTargetTypes.includes(targetType)) {
|
|
1786
|
+
throw new Error(`Template ${template2.id} does not support target type ${targetType}. Supported types: ${template2.compatibleTargetTypes.join(", ")}.`);
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
function createSecurityWorkflowTemplate(id, options = {}) {
|
|
1790
|
+
const found = getSecurityWorkflowTemplate(id, options.revision);
|
|
1791
|
+
if (options.targetType !== void 0)
|
|
1792
|
+
checkSecurityWorkflowTemplateTarget(found, options.targetType);
|
|
1793
|
+
return parseSecurityWorkflowInput({ ...found.definition, template: { id: found.id, revision: found.revision }, ...options.target !== void 0 ? { target: options.target } : {} });
|
|
1700
1794
|
}
|
|
1701
1795
|
|
|
1702
1796
|
// packages/shared/dist/service-plugins.js
|
|
@@ -1713,6 +1807,157 @@ var SERVICE_PLUGIN_CATALOG = [
|
|
|
1713
1807
|
{ id: "teams", name: "Microsoft Teams", description: "Read teams and share channel summaries.", category: "Messaging", docsUrl: "https://learn.microsoft.com/en-us/graph/auth/auth-concepts", fields: [{ ...token, label: "Microsoft Graph access token" }], credentialNote: "Delegated token with Teams access. Reconnect when it expires." }
|
|
1714
1808
|
];
|
|
1715
1809
|
|
|
1810
|
+
// packages/shared/dist/backend-protocol.js
|
|
1811
|
+
var BACKEND_PROTOCOL_VERSION = 1;
|
|
1812
|
+
var BACKEND_CAPABILITIES = [
|
|
1813
|
+
"sessions",
|
|
1814
|
+
"workflows",
|
|
1815
|
+
"workflow-engine",
|
|
1816
|
+
"schedules",
|
|
1817
|
+
"approvals",
|
|
1818
|
+
"events",
|
|
1819
|
+
"workspaces",
|
|
1820
|
+
"artifacts",
|
|
1821
|
+
"model-connections",
|
|
1822
|
+
"process-controls",
|
|
1823
|
+
"operator-services"
|
|
1824
|
+
];
|
|
1825
|
+
var BackendCapabilitySchema = external_exports.enum(BACKEND_CAPABILITIES);
|
|
1826
|
+
var BackendIdSchema = external_exports.string().min(1).max(128).regex(/^[A-Za-z0-9][A-Za-z0-9_.-]*$/).refine((value) => !["__proto__", "constructor", "prototype"].includes(value), "Reserved backend identifier.");
|
|
1827
|
+
var backendId = BackendIdSchema;
|
|
1828
|
+
var BackendRequestIdSchema = external_exports.string().min(1).max(128).regex(/^[A-Za-z0-9][A-Za-z0-9_.:-]*$/).refine((value) => !["__proto__", "constructor", "prototype"].includes(value), "Reserved request identifier.");
|
|
1829
|
+
var resourceId = external_exports.string().min(1).max(4096);
|
|
1830
|
+
var capabilityList = external_exports.array(external_exports.string().min(1).max(128).regex(/^[a-z][a-z0-9.-]*$/)).max(128).refine((values) => new Set(values).size === values.length, "Backend capabilities must be unique.");
|
|
1831
|
+
var BackendConnectionStatusSchema = external_exports.enum(["connecting", "connected", "disconnected", "incompatible", "error"]);
|
|
1832
|
+
var BackendPlatformSchema = external_exports.object({ os: external_exports.string().min(1).max(64), pathStyle: external_exports.enum(["posix", "windows"]) }).strict();
|
|
1833
|
+
var BackendDescriptorSchema = external_exports.object({
|
|
1834
|
+
id: backendId,
|
|
1835
|
+
name: external_exports.string().trim().min(1).max(160),
|
|
1836
|
+
transport: external_exports.enum(["local", "http"]),
|
|
1837
|
+
status: BackendConnectionStatusSchema,
|
|
1838
|
+
protocolVersion: external_exports.number().int().positive().optional(),
|
|
1839
|
+
/** Unknown advertised names are retained for forward compatibility, never implicitly dispatched. */
|
|
1840
|
+
capabilities: capabilityList.default([]),
|
|
1841
|
+
platform: BackendPlatformSchema.optional(),
|
|
1842
|
+
error: external_exports.string().max(4096).optional()
|
|
1843
|
+
}).strict();
|
|
1844
|
+
var BackendListSchema = external_exports.object({ backends: external_exports.array(BackendDescriptorSchema).min(1).max(64) }).strict().superRefine((value, context) => {
|
|
1845
|
+
if (new Set(value.backends.map((backend) => backend.id)).size !== value.backends.length)
|
|
1846
|
+
context.addIssue({ code: external_exports.ZodIssueCode.custom, message: "Backend IDs must be unique." });
|
|
1847
|
+
});
|
|
1848
|
+
var BackendHandshakeSchema = external_exports.object({
|
|
1849
|
+
protocolVersion: external_exports.number().int().positive(),
|
|
1850
|
+
engineId: backendId,
|
|
1851
|
+
capabilities: capabilityList,
|
|
1852
|
+
platform: BackendPlatformSchema,
|
|
1853
|
+
/** Connection epoch for detecting restarted event streams; does not replace retained run identity. */
|
|
1854
|
+
serverInstanceId: backendId.optional()
|
|
1855
|
+
}).strict();
|
|
1856
|
+
function parseBackendHandshake(value) {
|
|
1857
|
+
const handshake = BackendHandshakeSchema.parse(value);
|
|
1858
|
+
if (handshake.protocolVersion !== BACKEND_PROTOCOL_VERSION)
|
|
1859
|
+
throw new Error(`Incompatible backend protocol ${handshake.protocolVersion}; this client supports ${BACKEND_PROTOCOL_VERSION}.`);
|
|
1860
|
+
return handshake;
|
|
1861
|
+
}
|
|
1862
|
+
function hasBackendCapability(backend, capability) {
|
|
1863
|
+
return backend.capabilities.includes(capability);
|
|
1864
|
+
}
|
|
1865
|
+
function requireBackendCapability(backend, capability) {
|
|
1866
|
+
if (backend.status !== "connected")
|
|
1867
|
+
throw new Error(`Backend ${backend.id} is ${backend.status}.`);
|
|
1868
|
+
if (backend.protocolVersion !== BACKEND_PROTOCOL_VERSION)
|
|
1869
|
+
throw new Error(`Backend ${backend.id} uses an incompatible protocol.`);
|
|
1870
|
+
if (!hasBackendCapability(backend, capability))
|
|
1871
|
+
throw new Error(`Backend ${backend.id} does not support ${capability}.`);
|
|
1872
|
+
}
|
|
1873
|
+
var BackendResourceRefSchema = external_exports.object({ backendId, id: resourceId }).strict();
|
|
1874
|
+
function backendResourceKey(kind, reference) {
|
|
1875
|
+
const ref = BackendResourceRefSchema.parse(reference);
|
|
1876
|
+
return JSON.stringify(["backend", ref.backendId, kind, ref.id]);
|
|
1877
|
+
}
|
|
1878
|
+
function backendResourceQueryKey(kind, reference) {
|
|
1879
|
+
const ref = BackendResourceRefSchema.parse(reference);
|
|
1880
|
+
return ["backend", ref.backendId, kind, ref.id];
|
|
1881
|
+
}
|
|
1882
|
+
var BackendRequestContextSchema = external_exports.object({
|
|
1883
|
+
backendId,
|
|
1884
|
+
requestId: BackendRequestIdSchema,
|
|
1885
|
+
idempotencyKey: external_exports.string().min(1).max(128).optional()
|
|
1886
|
+
}).strict();
|
|
1887
|
+
var BackendEventCursorSchema = external_exports.object({
|
|
1888
|
+
backendId,
|
|
1889
|
+
resourceId,
|
|
1890
|
+
sequence: external_exports.number().int().nonnegative().safe(),
|
|
1891
|
+
serverInstanceId: backendId.optional()
|
|
1892
|
+
}).strict();
|
|
1893
|
+
var BackendApprovalRefSchema = external_exports.object({
|
|
1894
|
+
backendId,
|
|
1895
|
+
id: resourceId,
|
|
1896
|
+
sessionId: resourceId,
|
|
1897
|
+
runId: resourceId.optional(),
|
|
1898
|
+
requestId: BackendRequestIdSchema,
|
|
1899
|
+
operationDigest: external_exports.string().min(1).max(256)
|
|
1900
|
+
}).strict();
|
|
1901
|
+
function assertBackendReference(backendIdValue, reference) {
|
|
1902
|
+
backendId.parse(backendIdValue);
|
|
1903
|
+
const ref = BackendResourceRefSchema.parse(reference);
|
|
1904
|
+
if (ref.backendId !== backendIdValue)
|
|
1905
|
+
throw new Error("Resource belongs to another backend.");
|
|
1906
|
+
}
|
|
1907
|
+
function backendCapabilitiesForApiPath(pathname) {
|
|
1908
|
+
if (!pathname.startsWith("/api/") || /[?#\\\x00-\x20]/.test(pathname) || new URL(pathname, "http://backend.invalid").pathname !== pathname)
|
|
1909
|
+
throw new Error("Backend capability classification requires a canonical API pathname.");
|
|
1910
|
+
const parts = pathname.slice("/api/".length).split("/");
|
|
1911
|
+
const capabilities = /* @__PURE__ */ new Set();
|
|
1912
|
+
const add = (capability) => {
|
|
1913
|
+
capabilities.add(capability);
|
|
1914
|
+
};
|
|
1915
|
+
if (pathname === "/api/backend/handshake")
|
|
1916
|
+
return [];
|
|
1917
|
+
if (pathname === "/api/workflow-engine/call")
|
|
1918
|
+
return ["workflow-engine"];
|
|
1919
|
+
if (parts[0] === "control" && parts.length === 2 && ["recover-stale-workers", "prune-stopped-workers", "reset-database", "start-daemon", "stop-daemon", "launch-run"].includes(parts[1]))
|
|
1920
|
+
return ["process-controls"];
|
|
1921
|
+
if (pathname === "/api/dashboard" || parts[0] === "scans" || parts[0] === "finding-family")
|
|
1922
|
+
add("artifacts");
|
|
1923
|
+
else if (parts[0] === "events" || pathname === "/api/v1/presentation/events")
|
|
1924
|
+
add("events");
|
|
1925
|
+
else if (parts[0] === "console") {
|
|
1926
|
+
const family = parts[1];
|
|
1927
|
+
if (["sessions", "saved"].includes(family ?? "")) {
|
|
1928
|
+
add("sessions");
|
|
1929
|
+
const operation = parts[3];
|
|
1930
|
+
if (operation === "decisions" || operation === "approvals")
|
|
1931
|
+
add("approvals");
|
|
1932
|
+
if (operation === "events")
|
|
1933
|
+
add("events");
|
|
1934
|
+
if (["models", "providers", "connections", "accounts", "runtime"].includes(operation ?? ""))
|
|
1935
|
+
add("model-connections");
|
|
1936
|
+
if (["files", "directories", "paths", "workspace", "project"].includes(operation ?? ""))
|
|
1937
|
+
add("workspaces");
|
|
1938
|
+
} else if (["workflow-triggers", "workflow-schedules"].includes(family ?? ""))
|
|
1939
|
+
add("schedules");
|
|
1940
|
+
else if (["workflows", "workflow-definitions", "workflow-executions", "workflow-tool-catalog", "fixes"].includes(family ?? "")) {
|
|
1941
|
+
add("workflows");
|
|
1942
|
+
if (family === "fixes" && (["apply", "publish"].includes(parts[2] ?? "") || ["apply", "publish"].includes(parts[3] ?? "")))
|
|
1943
|
+
add("approvals");
|
|
1944
|
+
if (parts[3] === "events")
|
|
1945
|
+
add("events");
|
|
1946
|
+
} else if (["connections", "providers", "accounts", "runtime", "models", "auth"].includes(family ?? ""))
|
|
1947
|
+
add("model-connections");
|
|
1948
|
+
else if (["files", "directories", "paths", "workspace", "project"].includes(family ?? ""))
|
|
1949
|
+
add("workspaces");
|
|
1950
|
+
else if (["settings", "themes", "plugins", "service-plugins", "doctor", "tools", "checks", "feedback", "github", "execution"].includes(family ?? "")) {
|
|
1951
|
+
add("operator-services");
|
|
1952
|
+
if (family === "checks")
|
|
1953
|
+
add("workspaces");
|
|
1954
|
+
}
|
|
1955
|
+
}
|
|
1956
|
+
if (capabilities.has("artifacts") && parts[0] === "scans" && parts[2] === "events")
|
|
1957
|
+
add("events");
|
|
1958
|
+
return [...capabilities];
|
|
1959
|
+
}
|
|
1960
|
+
|
|
1716
1961
|
export {
|
|
1717
1962
|
validateScanPlan,
|
|
1718
1963
|
defaultRoleFor,
|
|
@@ -1799,11 +2044,37 @@ export {
|
|
|
1799
2044
|
findCommand,
|
|
1800
2045
|
filterCommands,
|
|
1801
2046
|
DEFAULT_SECURITY_WORKFLOW_PLAN,
|
|
2047
|
+
SECURITY_WORKFLOW_OPERATIONS,
|
|
2048
|
+
isSecurityWorkflowOperation,
|
|
2049
|
+
SecurityWorkflowBindingsSchema,
|
|
1802
2050
|
SecurityWorkflowInputSchema,
|
|
1803
2051
|
parseSecurityWorkflowInput,
|
|
1804
2052
|
exportSecurityWorkflowCode,
|
|
1805
2053
|
parseSecurityWorkflowCode,
|
|
1806
2054
|
SECURITY_WORKFLOW_TEMPLATES,
|
|
2055
|
+
getSecurityWorkflowTemplate,
|
|
2056
|
+
checkSecurityWorkflowTemplateTarget,
|
|
1807
2057
|
createSecurityWorkflowTemplate,
|
|
1808
|
-
SERVICE_PLUGIN_CATALOG
|
|
2058
|
+
SERVICE_PLUGIN_CATALOG,
|
|
2059
|
+
BACKEND_PROTOCOL_VERSION,
|
|
2060
|
+
BACKEND_CAPABILITIES,
|
|
2061
|
+
BackendCapabilitySchema,
|
|
2062
|
+
BackendIdSchema,
|
|
2063
|
+
BackendRequestIdSchema,
|
|
2064
|
+
BackendConnectionStatusSchema,
|
|
2065
|
+
BackendPlatformSchema,
|
|
2066
|
+
BackendDescriptorSchema,
|
|
2067
|
+
BackendListSchema,
|
|
2068
|
+
BackendHandshakeSchema,
|
|
2069
|
+
parseBackendHandshake,
|
|
2070
|
+
hasBackendCapability,
|
|
2071
|
+
requireBackendCapability,
|
|
2072
|
+
BackendResourceRefSchema,
|
|
2073
|
+
backendResourceKey,
|
|
2074
|
+
backendResourceQueryKey,
|
|
2075
|
+
BackendRequestContextSchema,
|
|
2076
|
+
BackendEventCursorSchema,
|
|
2077
|
+
BackendApprovalRefSchema,
|
|
2078
|
+
assertBackendReference,
|
|
2079
|
+
backendCapabilitiesForApiPath
|
|
1809
2080
|
};
|
|
@@ -3,7 +3,7 @@ import { createRequire as __0CreateRequire } from "node:module";
|
|
|
3
3
|
const require = __0CreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
severityRank
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LTEE2JWK.js";
|
|
7
7
|
|
|
8
8
|
// packages/core/dist/triage/kernel-primitive.js
|
|
9
9
|
function maxSeverity(a, b) {
|
|
@@ -9,21 +9,21 @@ import {
|
|
|
9
9
|
resolveWorkbenchGuestSettings,
|
|
10
10
|
workbenchConfigPath,
|
|
11
11
|
workbenchNetworkEnabled
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-HFDSIHTE.js";
|
|
13
13
|
import {
|
|
14
14
|
createWorkbenchProviderBroker
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-4HGGNBKK.js";
|
|
16
16
|
import {
|
|
17
17
|
osecDB
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-T7ZEVY5G.js";
|
|
19
19
|
import {
|
|
20
20
|
isAdmittedSmolvmWorkbench
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-NI6QYQSK.js";
|
|
22
22
|
import {
|
|
23
23
|
SERVICE_PLUGIN_CATALOG,
|
|
24
24
|
findingSchema,
|
|
25
25
|
homeStateDir
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-LTEE2JWK.js";
|
|
27
27
|
|
|
28
28
|
// packages/cli/src/web/service-plugins.ts
|
|
29
29
|
import { constants, closeSync, fstatSync, lstatSync, mkdirSync, openSync, readFileSync, renameSync, rmSync, writeFileSync, chmodSync } from "node:fs";
|
|
@@ -217,7 +217,7 @@ var ServicePluginServices = class {
|
|
|
217
217
|
}
|
|
218
218
|
async #probe(connection) {
|
|
219
219
|
try {
|
|
220
|
-
const probe = this.#options.probe ?? (await import("./dist-
|
|
220
|
+
const probe = this.#options.probe ?? (await import("./dist-4LGRIBOC.js")).testServicePluginConnection;
|
|
221
221
|
const result = await probe(connection);
|
|
222
222
|
if (!Array.isArray(result.tools) || result.tools.length > 512 || result.tools.some((tool) => typeof tool.name !== "string" || tool.name.length > 256 || typeof tool.description !== "string" || tool.description.length > 16384)) throw new Error("Invalid tool catalog.");
|
|
223
223
|
const configurations = [...readStore(this.#options.homeDir), connection];
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
} from "./chunk-UELXHK2Y.js";
|
|
7
7
|
import {
|
|
8
8
|
eventBus
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-A5QO7N3S.js";
|
|
10
10
|
import {
|
|
11
11
|
ScopePolicy
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ITES7BCY.js";
|
|
13
13
|
import {
|
|
14
14
|
allowlistedChildEnv,
|
|
15
15
|
sanitizedEnv
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
VERSION,
|
|
19
19
|
cloudStateDir,
|
|
20
20
|
homeStateDir
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-LTEE2JWK.js";
|
|
22
22
|
import {
|
|
23
23
|
external_exports
|
|
24
24
|
} from "./chunk-VIT5ALXF.js";
|
|
@@ -4,10 +4,10 @@ const require = __0CreateRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
getToolsForRole,
|
|
6
6
|
runNativeAgentLoop
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-EH2WTNY7.js";
|
|
8
8
|
import {
|
|
9
9
|
LlmApiRuntime
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-BF5FIK7H.js";
|
|
11
11
|
|
|
12
12
|
// packages/core/dist/eval-runner.js
|
|
13
13
|
import { randomUUID } from "node:crypto";
|
|
@@ -3,10 +3,10 @@ import { createRequire as __0CreateRequire } from "node:module";
|
|
|
3
3
|
const require = __0CreateRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
loadLayeredSettings
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HFDSIHTE.js";
|
|
7
7
|
import {
|
|
8
8
|
homeStateDir
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-LTEE2JWK.js";
|
|
10
10
|
import {
|
|
11
11
|
__commonJS,
|
|
12
12
|
__require,
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
registerSignalCleanup,
|
|
18
18
|
runNativeAgentLoop,
|
|
19
19
|
toolCallPreview
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-EH2WTNY7.js";
|
|
21
21
|
import {
|
|
22
22
|
WafDetector
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-JEYIWMGL.js";
|
|
24
24
|
import {
|
|
25
25
|
RECIPE_LIBRARY
|
|
26
26
|
} from "./chunk-UEX7PFSE.js";
|
|
@@ -28,29 +28,29 @@ import {
|
|
|
28
28
|
createRuntime,
|
|
29
29
|
detectAvailableRuntimes,
|
|
30
30
|
pickRuntimeForStage
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-UZUELPFW.js";
|
|
32
32
|
import {
|
|
33
33
|
osecDB
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-T7ZEVY5G.js";
|
|
35
35
|
import {
|
|
36
36
|
CLI_RUNTIME_TYPES
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-65H3MRBF.js";
|
|
38
38
|
import {
|
|
39
39
|
addRuntimeUsage,
|
|
40
40
|
scanGoalPrompt
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-CP6HANBE.js";
|
|
42
42
|
import {
|
|
43
43
|
LlmApiRuntime,
|
|
44
44
|
features
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-BF5FIK7H.js";
|
|
46
46
|
import {
|
|
47
47
|
analyticsPipeline,
|
|
48
48
|
reportUnsupportedContributionMode
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-NI6QYQSK.js";
|
|
50
50
|
import {
|
|
51
51
|
estimateCost,
|
|
52
52
|
modelProvider
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-LTEE2JWK.js";
|
|
54
54
|
import {
|
|
55
55
|
external_exports
|
|
56
56
|
} from "./chunk-VIT5ALXF.js";
|
|
@@ -5087,7 +5087,7 @@ function cleanupHuntDb(path2) {
|
|
|
5087
5087
|
}
|
|
5088
5088
|
}
|
|
5089
5089
|
async function runSourceHunt(config, hint, purpose, emit = () => {
|
|
5090
|
-
}) {
|
|
5090
|
+
}, nativeRuntime) {
|
|
5091
5091
|
const dbPath = freshHuntDb();
|
|
5092
5092
|
const db = new osecDB(dbPath);
|
|
5093
5093
|
try {
|
|
@@ -5100,7 +5100,7 @@ async function runSourceHunt(config, hint, purpose, emit = () => {
|
|
|
5100
5100
|
scopePath: sourceRoot,
|
|
5101
5101
|
target: config.target,
|
|
5102
5102
|
scanId,
|
|
5103
|
-
config,
|
|
5103
|
+
config: { ...config, ...nativeRuntime ? { nativeRuntime } : {} },
|
|
5104
5104
|
db,
|
|
5105
5105
|
emit,
|
|
5106
5106
|
cliPrompt: prompt,
|
|
@@ -5316,6 +5316,8 @@ LENS FOCUS \u2014 concentrate this refute pass specifically on: ${opts.focus}`;
|
|
|
5316
5316
|
const baseConfig = {
|
|
5317
5317
|
...opts.costCeilingUsd !== void 0 ? { costCeilingUsd: opts.costCeilingUsd } : {},
|
|
5318
5318
|
...opts.costLedger ? { costLedger: opts.costLedger } : {},
|
|
5319
|
+
...opts.signal ? { signal: opts.signal } : {},
|
|
5320
|
+
...opts.plan ? { plan: opts.plan } : {},
|
|
5319
5321
|
target: resolve(opts.sourceRoot, candidate.path),
|
|
5320
5322
|
depth: "quick",
|
|
5321
5323
|
format: "json",
|
|
@@ -5326,7 +5328,7 @@ LENS FOCUS \u2014 concentrate this refute pass specifically on: ${opts.focus}`;
|
|
|
5326
5328
|
};
|
|
5327
5329
|
const refutePass = async (model) => {
|
|
5328
5330
|
const config = { ...baseConfig, ...model ? { model } : {} };
|
|
5329
|
-
const report = await runSourceHunt(config, hint, "verify");
|
|
5331
|
+
const report = await runSourceHunt(config, hint, "verify", void 0, opts.nativeRuntime);
|
|
5330
5332
|
return report.findings.length > 0;
|
|
5331
5333
|
};
|
|
5332
5334
|
let choice = refuter;
|
|
@@ -5404,6 +5406,9 @@ function makeMultiLensVerifier(lenses, opts) {
|
|
|
5404
5406
|
const makePass = opts.makePass ?? ((lens) => makeSkepticVerifier({
|
|
5405
5407
|
sourceRoot: opts.sourceRoot,
|
|
5406
5408
|
runtime: opts.runtime,
|
|
5409
|
+
...opts.signal ? { signal: opts.signal } : {},
|
|
5410
|
+
...opts.nativeRuntime ? { nativeRuntime: opts.nativeRuntime } : {},
|
|
5411
|
+
...opts.plan ? { plan: opts.plan } : {},
|
|
5407
5412
|
...opts.model ? { model: opts.model } : {},
|
|
5408
5413
|
...opts.negatives ? { negatives: opts.negatives } : {},
|
|
5409
5414
|
...opts.costCeilingUsd !== void 0 ? { costCeilingUsd: opts.costCeilingUsd } : {},
|
|
@@ -5474,6 +5479,7 @@ function siteGroupKey(candidatePath, model, lensId) {
|
|
|
5474
5479
|
return lensId ? `${base} ${lensId}` : base;
|
|
5475
5480
|
}
|
|
5476
5481
|
async function runHuntScan(opts) {
|
|
5482
|
+
opts.signal?.throwIfAborted();
|
|
5477
5483
|
const log = opts.log ?? (() => {
|
|
5478
5484
|
});
|
|
5479
5485
|
const models = opts.models && opts.models.length > 0 ? opts.models : [void 0];
|
|
@@ -5515,6 +5521,7 @@ async function runHuntScan(opts) {
|
|
|
5515
5521
|
const aimd = huntAimdEnabled() ? new AimdState(concurrency) : null;
|
|
5516
5522
|
const effectiveConcurrency = costCeilingEnabled ? 1 : aimd ?? concurrency;
|
|
5517
5523
|
const reports = await pool(runs, effectiveConcurrency, async (run) => {
|
|
5524
|
+
opts.signal?.throwIfAborted();
|
|
5518
5525
|
const version = run.lens.versionDigest ? { lensVersionDigest: run.lens.versionDigest } : {};
|
|
5519
5526
|
if (costCeilingReached()) {
|
|
5520
5527
|
return {
|
|
@@ -5538,7 +5545,7 @@ async function runHuntScan(opts) {
|
|
|
5538
5545
|
model: run.model,
|
|
5539
5546
|
attempt: run.attempt,
|
|
5540
5547
|
challengeHint: huntHint(opts.brief, run.candidate, run.lens.challengeHint),
|
|
5541
|
-
...finderAbort ? { signal: finderAbort.signal } : {}
|
|
5548
|
+
...opts.signal || finderAbort ? { signal: opts.signal && finderAbort ? AbortSignal.any([opts.signal, finderAbort.signal]) : opts.signal ?? finderAbort?.signal } : {}
|
|
5542
5549
|
});
|
|
5543
5550
|
lateRef.current = scanPromise2;
|
|
5544
5551
|
return await scanPromise2;
|
|
@@ -5553,7 +5560,9 @@ async function runHuntScan(opts) {
|
|
|
5553
5560
|
repoPath: opts.sourceRoot,
|
|
5554
5561
|
...run.model ? { model: run.model } : {},
|
|
5555
5562
|
...costCeilingUsd !== void 0 ? { costCeilingUsd } : {},
|
|
5556
|
-
...costLedger ? { costLedger } : {}
|
|
5563
|
+
...costLedger ? { costLedger } : {},
|
|
5564
|
+
...opts.signal ? { signal: opts.signal } : {},
|
|
5565
|
+
...opts.plan ? { plan: opts.plan } : {}
|
|
5557
5566
|
};
|
|
5558
5567
|
const scanPromise = runSourceHunt(config, huntHint(opts.brief, run.candidate, run.lens.challengeHint), "research", (event) => {
|
|
5559
5568
|
if (event.type !== "finding")
|
|
@@ -5561,11 +5570,12 @@ async function runHuntScan(opts) {
|
|
|
5561
5570
|
const partial = partialFindingFromEvent(event.data);
|
|
5562
5571
|
if (partial)
|
|
5563
5572
|
partials.push(partial);
|
|
5564
|
-
});
|
|
5573
|
+
}, opts.nativeRuntime);
|
|
5565
5574
|
lateRef.current = scanPromise;
|
|
5566
5575
|
return await scanPromise;
|
|
5567
5576
|
};
|
|
5568
5577
|
const outcome = await runFinderResilient(attemptOnce, { timeoutMs: finderTimeoutMs, maxRetries: finderMaxRetries });
|
|
5578
|
+
opts.signal?.throwIfAborted();
|
|
5569
5579
|
if (outcome.status === "timed-out")
|
|
5570
5580
|
finderAbort?.abort();
|
|
5571
5581
|
let findings;
|