0sec-cli 0.24.1 → 0.26.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 +67 -62
- package/README.md +121 -82
- package/chunks/{adapt-loop-L77BWMNE.js → adapt-loop-P4HKONB5.js} +6 -5
- package/chunks/{artifact-scraper-BV67RAP5.js → artifact-scraper-IIRJNYKT.js} +4 -3
- package/chunks/{assumption-mining-RPVR77A3.js → assumption-mining-YA6VJ2V6.js} +22 -20
- package/chunks/{backend-connections-ACIXNYZN.js → backend-connections-64PKYKL7.js} +5 -4
- package/chunks/chunk-36J5ZLFE.js +18729 -0
- package/chunks/{chunk-ZM6ANQZJ.js → chunk-3MWQNNJU.js} +16180 -34467
- package/chunks/{chunk-GV5WXDHY.js → chunk-3VQ5EZKG.js} +11 -9
- package/chunks/chunk-5XOYTAOK.js +1546 -0
- package/chunks/{chunk-UJE4WOQS.js → chunk-6GV5G6U3.js} +1 -1
- package/chunks/{chunk-X2ZMSRTP.js → chunk-6SNOKNCS.js} +333 -3
- package/chunks/{chunk-BMDG6T7D.js → chunk-72PU46MS.js} +178 -133
- package/chunks/{chunk-KCA35IL3.js → chunk-7PUJI64A.js} +11 -9
- package/chunks/chunk-A7G6S5RA.js +90 -0
- package/chunks/chunk-ABKUI3QB.js +196 -0
- package/chunks/{chunk-5ETI27Q3.js → chunk-AFJ2UMPR.js} +3 -3
- package/chunks/{chunk-XA2IBHPB.js → chunk-B7XL6RON.js} +1 -1
- package/chunks/{chunk-TVS6WVSK.js → chunk-BM6EYP2D.js} +3 -3
- package/chunks/{chunk-7UHAXEOV.js → chunk-D4M5WURF.js} +226 -4
- package/chunks/{chunk-K74DRDC5.js → chunk-EHNVP6QB.js} +1 -1
- package/chunks/{chunk-I43YYHDU.js → chunk-FBZBJYZS.js} +5 -50
- package/chunks/{chunk-GXXX7AGH.js → chunk-GYEYTNHK.js} +144 -14
- package/chunks/{chunk-IJ6UPW3H.js → chunk-HS2NQ7K6.js} +393 -58
- package/chunks/chunk-HUZ2EC2R.js +196 -0
- package/chunks/{chunk-SU4IHQQI.js → chunk-IUUNIJPM.js} +1 -1
- package/chunks/chunk-JGDA6EIJ.js +49 -0
- package/chunks/{chunk-CJRZSWII.js → chunk-K3PTYN43.js} +3 -3
- package/chunks/{chunk-2NBZZFRG.js → chunk-KCABBZHN.js} +8 -10
- package/chunks/{chunk-3LPBJMHB.js → chunk-LRD5N2TQ.js} +1 -1
- package/chunks/{chunk-SQCBHFWN.js → chunk-LWMEJYCP.js} +2 -2
- package/chunks/chunk-MNK373HF.js +57 -0
- package/chunks/{chunk-R2XBH476.js → chunk-MOEVVXML.js} +2 -2
- package/chunks/{chunk-F2P25DJY.js → chunk-MOGWEHSC.js} +1448 -1050
- package/chunks/{chunk-6XMFCVJS.js → chunk-N7YCONYR.js} +1 -1
- package/chunks/{chunk-3WUPCZGF.js → chunk-NA3FKCI2.js} +1 -1
- package/chunks/{chunk-S2GITRD5.js → chunk-NABVDAAO.js} +2 -2
- package/chunks/{chunk-SZDD77KX.js → chunk-NNMOTHKC.js} +6 -10
- package/chunks/{chunk-LMP2T4G2.js → chunk-OILVEROI.js} +22 -172
- package/chunks/{chunk-YERUDEXT.js → chunk-PAE7ZAV6.js} +2780 -1255
- package/chunks/{chunk-NBV4I237.js → chunk-PAMJEXE2.js} +1 -1
- package/chunks/{chunk-PJU24AKR.js → chunk-R7VWEY45.js} +337 -257
- package/chunks/{chunk-QNRYOJEB.js → chunk-RZZ6VPRY.js} +1 -1
- package/chunks/{chunk-WUPN3D37.js → chunk-S4DFH2FJ.js} +26 -1
- package/chunks/{chunk-5WAHHZBF.js → chunk-SIR7XW2S.js} +61910 -30777
- package/chunks/{chunk-BD7WULFS.js → chunk-SSPP64FF.js} +3 -2
- package/chunks/{chunk-BOBIAHKA.js → chunk-STPHTPSD.js} +3 -333
- package/chunks/{chunk-Q7JKIKKF.js → chunk-UGCTPKJG.js} +89 -17
- package/chunks/{chunk-5PFRE522.js → chunk-ULRLUXSS.js} +1 -1
- package/chunks/{chunk-GZA7RGK7.js → chunk-UQS7XCBV.js} +2085 -1093
- package/chunks/{chunk-X2IPO5JO.js → chunk-V2KJQVYE.js} +2676 -2959
- package/chunks/{chunk-CGBDEST2.js → chunk-VJBEB2K6.js} +1 -1
- package/chunks/{chunk-ILRMLA6J.js → chunk-VWE36MUN.js} +1 -1
- package/chunks/{chunk-RURJYCWY.js → chunk-WNWDQ2TO.js} +1 -1
- package/chunks/{chunk-GTED3FSZ.js → chunk-WPJMA5AK.js} +4 -99
- package/chunks/{chunk-5NFIY2SJ.js → chunk-XJ2TBEV7.js} +3 -3
- package/chunks/{chunk-PVJUPIQG.js → chunk-XOVYV7TT.js} +6 -6
- package/chunks/{chunk-IXT64DV5.js → chunk-XPDJE537.js} +97 -1
- package/chunks/{chunk-YKWARO3T.js → chunk-YGYJ2FTH.js} +95 -21
- package/chunks/{chunk-JWSOUKFF.js → chunk-YJGPPPUB.js} +66 -21
- package/chunks/chunk-YP2DHYNI.js +650 -0
- package/chunks/{chunk-RVJVM5L4.js → chunk-Z2VLJEQJ.js} +5 -5
- package/chunks/chunk-ZPVSDB63.js +3839 -0
- package/chunks/{codex-models-6XVNFRXZ.js → codex-models-CI22KIHY.js} +9 -8
- package/chunks/{commands-FRPOFIO4.js → commands-C2WRSCNB.js} +909 -610
- package/chunks/dashboard-XO2X2SPD.js +75 -0
- package/chunks/{db-BXJNWUYJ.js → db-FU3OIGQK.js} +5 -4
- package/chunks/{deep-review-GSJEBLCG.js → deep-review-5AL6QYTK.js} +37 -38
- package/chunks/{disclose-OU6Z6GVT.js → disclose-YPV5KIUU.js} +6 -5
- package/chunks/{dist-M2X367VW.js → dist-JAZWL3SC.js} +3 -2
- package/chunks/{dist-TQMHMSBZ.js → dist-ONIRKDH6.js} +376 -333
- package/chunks/{dist-RKLQIXDT.js → dist-QLMPTFT7.js} +4 -3
- package/chunks/{dist-7KSYDDSG.js → dist-QXJKD743.js} +5 -2
- package/chunks/{dist-LNXGATR2.js → dist-WNAOCQGA.js} +5 -4
- package/chunks/eval-runner-D3RUCU3R.js +38 -0
- package/chunks/{exploit-agent-Y2P4GFIY.js → exploit-agent-4E4HXKUA.js} +1 -1
- package/chunks/{exploit-autoclimb-YRZ3TMS2.js → exploit-autoclimb-5GRXI6VQ.js} +1 -1
- package/chunks/{exploit-climb-4LEY4SDW.js → exploit-climb-AHQEJ2I2.js} +4 -3
- package/chunks/{fix-RQSIG75B.js → fix-CHD7LXDS.js} +9 -8
- package/chunks/{harness-3NVC3DDY.js → harness-E63KDHPG.js} +5 -4
- package/chunks/{http-conformance-U5F6GKYG.js → http-conformance-AXMUOE6C.js} +3 -2
- package/chunks/hunt-scan-ME2Z4CTC.js +43 -0
- package/chunks/{kernel-primitive-T47V3RD3.js → kernel-primitive-S566GXWP.js} +4 -3
- package/chunks/{kernel-vm-runner-AEL5E3SV.js → kernel-vm-runner-KREBY4DC.js} +4 -3
- package/chunks/{local-engine-ZCW4YC6E.js → local-engine-ZRTZVSSX.js} +7 -6
- package/chunks/managed-operation-ZMLLRCCQ.js +59 -0
- package/chunks/{memsafety-scan-L2Z7E7TE.js → memsafety-scan-Q2MBZEGJ.js} +1 -2
- package/chunks/{native-loop-26X2CHBV.js → native-loop-UV3Z4Z2F.js} +31 -16
- package/chunks/operator-services-JOCREEBA.js +79 -0
- package/chunks/orchestrate-ZF6ZTSIQ.js +62 -0
- package/chunks/{prepare-C3KGMBXT.js → prepare-PLDVGLDX.js} +7 -6
- package/chunks/{provider-model-discovery-QGUGL3XW.js → provider-model-discovery-3X6DON3Y.js} +7 -2
- package/chunks/{remote-workflow-runtime-DB52SINR.js → remote-workflow-runtime-GOI4TYP5.js} +4 -3
- package/chunks/routing-WCQLO5SP.js +61 -0
- package/chunks/{runtime-AUBLQUOH.js → runtime-6ZIXFTW5.js} +4 -3
- package/chunks/{runtime-U66JNSAY.js → runtime-TVH5ORUK.js} +13 -8
- package/chunks/{scan-stream-34F3LTPV.js → scan-stream-HJVTWZ44.js} +6 -4
- package/chunks/{scope-HSTG63TQ.js → scope-RCYXVGJR.js} +4 -3
- package/chunks/service-plugins-TN6KDX4L.js +63 -0
- package/chunks/{session-store-MKAAP3WL.js → session-store-6QR3CVUA.js} +8 -5
- package/chunks/{variant-candidates-LG767HWH.js → variant-candidates-SGLKPPHI.js} +9 -8
- package/chunks/{web-recon-prepass-NJP6J3E4.js → web-recon-prepass-GO7CTMVQ.js} +7 -6
- package/chunks/{workflow-runtime-AR627I26.js → workflow-runtime-CQTDASFA.js} +50 -49
- package/dashboard/assets/{abnfDiagram-VCTEODGH-Cq149Jpk.js → abnfDiagram-VCTEODGH-DDZsU70-.js} +1 -1
- package/dashboard/assets/{arc-CpP-3TRW.js → arc-iDXNTSL6.js} +1 -1
- package/dashboard/assets/architecture-7GRP2DOG-DJcY9RFg.js +1 -0
- package/dashboard/assets/architectureDiagram-5GKGNRK7-d0ZuOniQ.js +36 -0
- package/dashboard/assets/{blockDiagram-I7D4REHJ-CZYkRRDi.js → blockDiagram-I7D4REHJ-B-EWfMy1.js} +2 -2
- package/dashboard/assets/{c4Diagram-7LVT6UL2-CV7Iu3_Z.js → c4Diagram-7LVT6UL2-KcZRuXZC.js} +1 -1
- package/dashboard/assets/channel-CeWMIm0w.js +1 -0
- package/dashboard/assets/{chunk-4HAMMTFA-PKCyW4m-.js → chunk-4HAMMTFA-DXWulBlo.js} +1 -1
- package/dashboard/assets/{chunk-75Z2AOVW-C5MlFTc_.js → chunk-75Z2AOVW-RiLZItrz.js} +1 -1
- package/dashboard/assets/chunk-DU6HZSFF-MBcaIyTX.js +127 -0
- package/dashboard/assets/{chunk-F27PBJKO-DTAok0qM.js → chunk-F27PBJKO-kLWCBX_W.js} +1 -1
- package/dashboard/assets/{chunk-FOHPRMQF-DHwB1DNv.js → chunk-FOHPRMQF-COOliuUh.js} +14 -14
- package/dashboard/assets/{chunk-GMAD6QVW-CPsr2F33.js → chunk-GMAD6QVW-BeQeSjpW.js} +7 -7
- package/dashboard/assets/{chunk-GVQU2GXP-C2AXGf9A.js → chunk-GVQU2GXP-CjCMlOIB.js} +1 -1
- package/dashboard/assets/{chunk-IMKFNOWR-DMG6yD_O.js → chunk-IMKFNOWR-BwNst53D.js} +1 -1
- package/dashboard/assets/{chunk-L3NEJ4N5-BSvwdbXx.js → chunk-L3NEJ4N5-CHXWQrkL.js} +1 -1
- package/dashboard/assets/{chunk-OSK3NFVY-CfB8V7FU.js → chunk-OSK3NFVY-B2vd19Ed.js} +1 -1
- package/dashboard/assets/{chunk-P2QGCYS3-CvmZvq6n.js → chunk-P2QGCYS3-Dk7Fyh6n.js} +1 -1
- package/dashboard/assets/{chunk-POPQ4Y6H-D_TvwDxL.js → chunk-POPQ4Y6H-CPAgOvYe.js} +1 -1
- package/dashboard/assets/{chunk-PWAF6VOD-Da5GnuOY.js → chunk-PWAF6VOD-BotyfMha.js} +1 -1
- package/dashboard/assets/{chunk-SHT3W25Y-CcsMJpR-.js → chunk-SHT3W25Y-Buz5gLRP.js} +1 -1
- package/dashboard/assets/{chunk-SVP7TREG-COojjieJ.js → chunk-SVP7TREG-_rpYEZcs.js} +1 -1
- package/dashboard/assets/{chunk-TICWLB2K-nBAmJwx6.js → chunk-TICWLB2K-DOJxPoec.js} +2 -2
- package/dashboard/assets/{chunk-XXDRQBXY-r5HyhWDv.js → chunk-XXDRQBXY-EXxKJbAs.js} +1 -1
- package/dashboard/assets/classDiagram-ZZMXUADV-DV_h1NoS.js +1 -0
- package/dashboard/assets/classDiagram-v2-VYDZK3BY-DV_h1NoS.js +1 -0
- package/dashboard/assets/common-VLJRx-Jq.js +5 -0
- package/dashboard/assets/cose-bilkent-JH36ORCC-B1SVC57o.js +1 -0
- package/dashboard/assets/cynefin-OW5HDTMX-BzhRorj4.js +1 -0
- package/dashboard/assets/{cynefinDiagram-5FMLGOSQ-xodkuQtW.js → cynefinDiagram-5FMLGOSQ-JXzRmldX.js} +1 -1
- package/dashboard/assets/cytoscape.esm-BbBREfsg.js +321 -0
- package/dashboard/assets/dagre-D7JM2Yhv.js +1 -0
- package/dashboard/assets/dagre-GXQ25YYZ-1LZ-X0-Z.js +4 -0
- package/dashboard/assets/{diagram-S7CK7UJ4-DNoTMlCO.js → diagram-S7CK7UJ4-C_-J_LQ4.js} +2 -2
- package/dashboard/assets/{diagram-UQ7AKVKN-COccuyew.js → diagram-UQ7AKVKN-CnxL1k8g.js} +1 -1
- package/dashboard/assets/{diagram-VSXAHHWV-g6D1tWRb.js → diagram-VSXAHHWV-WzSb3aby.js} +1 -1
- package/dashboard/assets/{diagram-VX7I27RA-DhO4eVIC.js → diagram-VX7I27RA-DKhrMInE.js} +1 -1
- package/dashboard/assets/{diagram-Z3DM3KII-DeOQFexd.js → diagram-Z3DM3KII-CDhI2WGP.js} +1 -1
- package/dashboard/assets/{dist-BQYeOQg3.js → dist-B0bfBMeP.js} +1 -1
- package/dashboard/assets/{ebnfDiagram-PWID7BFC-MtkX2feM.js → ebnfDiagram-PWID7BFC-iL5NQ1PE.js} +1 -1
- package/dashboard/assets/{erDiagram-RLTQ6QDP-DIWSsoYZ.js → erDiagram-RLTQ6QDP-RK2Voa5O.js} +1 -1
- package/dashboard/assets/eventmodeling-NTZA5JFV-WgE7OJBb.js +1 -0
- package/dashboard/assets/flowDiagram-HODETNUW-B9YcQ0Aq.js +1 -0
- package/dashboard/assets/{ganttDiagram-EL5Y4UJY-DKggkJe0.js → ganttDiagram-EL5Y4UJY-D8CJXHRF.js} +1 -1
- package/dashboard/assets/gitGraph-4MIJSDKK-BuZ9Lg04.js +1 -0
- package/dashboard/assets/{gitGraphDiagram-WWUBYQGX-r_iR8Qzo.js → gitGraphDiagram-WWUBYQGX-LEJMh54j.js} +1 -1
- package/dashboard/assets/info-A6RAGUB7-BL5k3pev.js +1 -0
- package/dashboard/assets/{infoDiagram-27XIBGKW-ClQk7UyQ.js → infoDiagram-27XIBGKW-LJvntUnZ.js} +1 -1
- package/dashboard/assets/{ishikawaDiagram-5VMMS53U-tR7Vziog.js → ishikawaDiagram-5VMMS53U-BYTYgKCG.js} +2 -2
- package/dashboard/assets/{journeyDiagram-3NMN7TZE-Cpb9IqKL.js → journeyDiagram-3NMN7TZE-G25qgQgO.js} +1 -1
- package/dashboard/assets/{kanban-definition-UXKFOSKX-BzUuKbA9.js → kanban-definition-UXKFOSKX-Bk3uLl1i.js} +1 -1
- package/dashboard/assets/{katex-BdBmVSus.js → katex-nLxf_RlZ.js} +2 -2
- package/dashboard/assets/{line-BHY_tSHu.js → line-i4qHBaWO.js} +1 -1
- package/dashboard/assets/linear-DmrqRsKG.js +1 -0
- package/dashboard/assets/mermaid-parser.core-BxbKr4QF.js +7 -0
- package/dashboard/assets/{mermaid.core-D_QsUPU8.js → mermaid.core-Cltee6FS.js} +9 -9
- package/dashboard/assets/{mindmap-definition-YA3MSWOX-CtfLTPPJ.js → mindmap-definition-YA3MSWOX-DkzO2JgS.js} +1 -1
- package/dashboard/assets/operations-B4_timQX.css +1 -0
- package/dashboard/assets/operations-DwppJviL.js +199 -0
- package/dashboard/assets/packet-AYTQ26CC-uZQUKnrE.js +1 -0
- package/dashboard/assets/{pegDiagram-XKGWAZYB-C1Dclbzj.js → pegDiagram-XKGWAZYB-CrOEi00T.js} +1 -1
- package/dashboard/assets/pie-WAS4IAKB-Dn9_tpQT.js +1 -0
- package/dashboard/assets/{pieDiagram-E7YTZNPT-Cd7XwYo5.js → pieDiagram-E7YTZNPT-D-niUkzc.js} +1 -1
- package/dashboard/assets/{quadrantDiagram-AXDQQJYC-CaS-GQ4X.js → quadrantDiagram-AXDQQJYC-CJOTiG5V.js} +1 -1
- package/dashboard/assets/radar-RG4KPBEZ-DIIVz4e8.js +1 -0
- package/dashboard/assets/railroad-74A4TZTK-1kiqDEID.js +1 -0
- package/dashboard/assets/railroad-abnf-HS5TGJTU-DK6rQPZR.js +1 -0
- package/dashboard/assets/railroad-ebnf-LZEXJU2U-C6cOgYW4.js +1 -0
- package/dashboard/assets/railroad-peg-WCYAUIDC-CQ3ptKef.js +1 -0
- package/dashboard/assets/{railroadDiagram-O6MQD6OU-BeesTrqn.js → railroadDiagram-O6MQD6OU-nEfkpa-m.js} +1 -1
- package/dashboard/assets/{requirementDiagram-BXWQKSXE-IjyK0DhW.js → requirementDiagram-BXWQKSXE-CdFMY8tG.js} +1 -1
- package/dashboard/assets/{sankeyDiagram-P5KCCOFB-DmIluQqo.js → sankeyDiagram-P5KCCOFB-C0KxrFYv.js} +1 -1
- package/dashboard/assets/{sequenceDiagram-WJ2MYXX4-CUp8ZjTc.js → sequenceDiagram-WJ2MYXX4-DeZ5ATiu.js} +2 -2
- package/dashboard/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
- package/dashboard/assets/src-Cg-chcoE.js +1 -0
- package/dashboard/assets/{stateDiagram-D77RDMKH-Dy9TQb8P.js → stateDiagram-D77RDMKH-B9MwWL5B.js} +1 -1
- package/dashboard/assets/stateDiagram-v2-MP3YSRHH-SucFndhx.js +1 -0
- package/dashboard/assets/swimlanes-42K2YHIH-DB--fwQE.js +1 -0
- package/dashboard/assets/swimlanesDiagram-VR7AAH4N-BzH-rIaK.js +8 -0
- package/dashboard/assets/{timeline-definition-24CTP7MA-BGdXW-iY.js → timeline-definition-24CTP7MA-DLkkTbWb.js} +1 -1
- package/dashboard/assets/treeView-Q6P3EWNA-XkZ9rl9H.js +1 -0
- package/dashboard/assets/treemap-WGGIJYW6-JCtVKxCE.js +1 -0
- package/dashboard/assets/{vennDiagram-4TSXK5OY-DzKWHJsl.js → vennDiagram-4TSXK5OY-DEb-x29Z.js} +1 -1
- package/dashboard/assets/wardley-WFR3VGLG-DhI7ROY3.js +1 -0
- package/dashboard/assets/{wardleyDiagram-VM6X3IG4-DGsjYmNJ.js → wardleyDiagram-VM6X3IG4-KNckudc5.js} +1 -1
- package/dashboard/assets/{xychartDiagram-S5SC5T6Z-C7_T_tWt.js → xychartDiagram-S5SC5T6Z-D4c0ynCk.js} +1 -1
- package/dashboard/index.html +13 -2
- package/package.json +2 -5
- package/worker-assets/demo-target/README.md +7 -3
- package/chunks/chunk-2XGBEH53.js +0 -4304
- package/chunks/chunk-4ROZFLSR.js +0 -279
- package/chunks/chunk-56UTQKXO.js +0 -56
- package/chunks/chunk-BPU6M42R.js +0 -77
- package/chunks/chunk-H5QURBBK.js +0 -1123
- package/chunks/chunk-IIBNQTOK.js +0 -1532
- package/chunks/chunk-NJLKFC66.js +0 -4790
- package/chunks/chunk-OOMBOLAF.js +0 -295
- package/chunks/chunk-VIT5ALXF.js +0 -4054
- package/chunks/chunk-VU7V2SDW.js +0 -284
- package/chunks/chunk-W624J7NF.js +0 -117
- package/chunks/chunk-YSQWZ67M.js +0 -6027
- package/chunks/dashboard-5HDSNBAU.js +0 -76
- package/chunks/eval-runner-A2DIGVP7.js +0 -31
- package/chunks/hunt-scan-W246VWJC.js +0 -40
- package/chunks/managed-operation-6R2QPPW5.js +0 -60
- package/chunks/orchestrate-OBS37FWQ.js +0 -63
- package/chunks/run-MU3MFL2Z.js +0 -28242
- package/chunks/service-plugins-5B23PWXC.js +0 -64
- package/dashboard/assets/architecture-7GRP2DOG-z5EHYkyH.js +0 -1
- package/dashboard/assets/architectureDiagram-5GKGNRK7-ewtXpjR_.js +0 -36
- package/dashboard/assets/channel-CuYjfiC5.js +0 -1
- package/dashboard/assets/chunk-DU6HZSFF-3M37ulcO.js +0 -127
- package/dashboard/assets/classDiagram-ZZMXUADV-DCuOrWUV.js +0 -1
- package/dashboard/assets/classDiagram-v2-VYDZK3BY-DCuOrWUV.js +0 -1
- package/dashboard/assets/common-C6snVPsk.js +0 -5
- package/dashboard/assets/cose-bilkent-JH36ORCC-BLGcaZHk.js +0 -1
- package/dashboard/assets/cynefin-OW5HDTMX-DbZMK00I.js +0 -1
- package/dashboard/assets/cytoscape.esm-CGd-uY3x.js +0 -321
- package/dashboard/assets/dagre-GXQ25YYZ-CRk9qfSG.js +0 -4
- package/dashboard/assets/dagre-PrKaheQc.js +0 -1
- package/dashboard/assets/eventmodeling-NTZA5JFV-D_3ez4Gv.js +0 -1
- package/dashboard/assets/flowDiagram-HODETNUW-D2boyYEd.js +0 -1
- package/dashboard/assets/gitGraph-4MIJSDKK-DFOQYwXc.js +0 -1
- package/dashboard/assets/info-A6RAGUB7-DeednLoB.js +0 -1
- package/dashboard/assets/linear-naZZ1pHk.js +0 -1
- package/dashboard/assets/mermaid-parser.core-CPvd4cEx.js +0 -7
- package/dashboard/assets/operations-BwCzhVnT.js +0 -130
- package/dashboard/assets/operations-QjKT0Hwi.css +0 -1
- package/dashboard/assets/packet-AYTQ26CC-DDQbkT9I.js +0 -1
- package/dashboard/assets/pie-WAS4IAKB-LpU4ULAs.js +0 -1
- package/dashboard/assets/radar-RG4KPBEZ-CcxW3NJm.js +0 -1
- package/dashboard/assets/railroad-74A4TZTK-9P5Rl8fP.js +0 -1
- package/dashboard/assets/railroad-abnf-HS5TGJTU-CSfpwjna.js +0 -1
- package/dashboard/assets/railroad-ebnf-LZEXJU2U-D6R5qzr-.js +0 -1
- package/dashboard/assets/railroad-peg-WCYAUIDC-DKEX7ITG.js +0 -1
- package/dashboard/assets/sizeCapture-INFHLROL-B0uUizjq.js +0 -1
- package/dashboard/assets/src-r61wDjcA.js +0 -1
- package/dashboard/assets/stateDiagram-v2-MP3YSRHH-CQb0ZtPr.js +0 -1
- package/dashboard/assets/swimlanes-42K2YHIH-CZuDV7V5.js +0 -1
- package/dashboard/assets/swimlanesDiagram-VR7AAH4N-BxgWMq8X.js +0 -8
- package/dashboard/assets/treeView-Q6P3EWNA-DlRrayjM.js +0 -1
- package/dashboard/assets/treemap-WGGIJYW6-C6UqLKfI.js +0 -1
- package/dashboard/assets/wardley-WFR3VGLG-thmyHKb0.js +0 -1
package/chunks/chunk-H5QURBBK.js
DELETED
|
@@ -1,1123 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import { createRequire as __0CreateRequire } from "node:module";
|
|
3
|
-
const require = __0CreateRequire(import.meta.url);
|
|
4
|
-
import {
|
|
5
|
-
SEVERITY_RANK,
|
|
6
|
-
VERSION,
|
|
7
|
-
compareFindingsByBusinessPriority,
|
|
8
|
-
getFindingPriority
|
|
9
|
-
} from "./chunk-GXXX7AGH.js";
|
|
10
|
-
|
|
11
|
-
// packages/core/dist/report-formatters/markdown.js
|
|
12
|
-
var EVIDENCE_BLOCK_LIMIT = 4e3;
|
|
13
|
-
var POC_STEP_LIMIT = 20;
|
|
14
|
-
function formatMarkdown(report) {
|
|
15
|
-
const lines = [];
|
|
16
|
-
lines.push("# 0 Scan Report");
|
|
17
|
-
lines.push("");
|
|
18
|
-
lines.push(`| Field | Value |`);
|
|
19
|
-
lines.push(`|-------|-------|`);
|
|
20
|
-
lines.push(`| Target | ${report.target} |`);
|
|
21
|
-
lines.push(`| Depth | ${report.scanDepth} |`);
|
|
22
|
-
lines.push(`| Started | ${report.startedAt} |`);
|
|
23
|
-
lines.push(`| Duration | ${(report.durationMs / 1e3).toFixed(1)}s |`);
|
|
24
|
-
lines.push("");
|
|
25
|
-
lines.push("## Summary");
|
|
26
|
-
lines.push("");
|
|
27
|
-
lines.push(`- **Attacks:** ${report.summary.totalAttacks}`);
|
|
28
|
-
lines.push(`- **Findings:** ${report.summary.totalFindings}`);
|
|
29
|
-
for (const label of ["Urgent", "High", "Moderate", "Low", "Not assessed"]) {
|
|
30
|
-
const count = report.findings.filter((finding) => getFindingPriority(finding).label === label).length;
|
|
31
|
-
if (count)
|
|
32
|
-
lines.push(`- **Business priority \u2014 ${label}:** ${count}`);
|
|
33
|
-
}
|
|
34
|
-
lines.push("", "### Technical severity", "");
|
|
35
|
-
if (report.summary.critical > 0)
|
|
36
|
-
lines.push(`- **Critical:** ${report.summary.critical}`);
|
|
37
|
-
if (report.summary.high > 0)
|
|
38
|
-
lines.push(`- **High:** ${report.summary.high}`);
|
|
39
|
-
if (report.summary.medium > 0)
|
|
40
|
-
lines.push(`- **Medium:** ${report.summary.medium}`);
|
|
41
|
-
if (report.summary.low > 0)
|
|
42
|
-
lines.push(`- **Low:** ${report.summary.low}`);
|
|
43
|
-
lines.push("");
|
|
44
|
-
if (report.warnings.length > 0) {
|
|
45
|
-
lines.push("## Warnings");
|
|
46
|
-
lines.push("");
|
|
47
|
-
for (const warning of report.warnings) {
|
|
48
|
-
lines.push(`- **${warning.stage}:** ${warning.message}`);
|
|
49
|
-
}
|
|
50
|
-
lines.push("");
|
|
51
|
-
}
|
|
52
|
-
if (report.reviewChecks?.length) {
|
|
53
|
-
lines.push("## Review Checks (Advisory)", "");
|
|
54
|
-
const literal = (text) => text.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/([\\`*_{}\[\]()#+.!|~-])/g, "\\$1");
|
|
55
|
-
for (const check of report.reviewChecks) {
|
|
56
|
-
lines.push(`### ${check.status.toUpperCase()}: ${literal(check.name)}`, "");
|
|
57
|
-
lines.push(`- **ID:** ${literal(check.id)}`);
|
|
58
|
-
lines.push(`- **Reason:** ${literal(check.reason)}`);
|
|
59
|
-
if (check.fix)
|
|
60
|
-
lines.push(`- **Suggested fix:** ${literal(check.fix)}`);
|
|
61
|
-
lines.push("");
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (report.findings.length > 0) {
|
|
65
|
-
lines.push("## Findings");
|
|
66
|
-
lines.push("");
|
|
67
|
-
for (const finding of [...report.findings].sort(compareFindingsByBusinessPriority)) {
|
|
68
|
-
lines.push(formatFinding(finding));
|
|
69
|
-
}
|
|
70
|
-
} else {
|
|
71
|
-
lines.push(report.warnings.length > 0 ? "## No Confirmed Vulnerabilities" : "## No Vulnerabilities Found");
|
|
72
|
-
lines.push("");
|
|
73
|
-
lines.push(report.warnings.length > 0 ? "The scanner did not confirm vulnerabilities, but target validation or probe execution produced warnings." : report.reviewChecks?.length ? "No security vulnerabilities were found in the inspected scope. Advisory review-check results are reported separately above." : "The target passed all tests.");
|
|
74
|
-
}
|
|
75
|
-
return lines.join("\n");
|
|
76
|
-
}
|
|
77
|
-
function evidenceBlock(label, raw) {
|
|
78
|
-
const lines = [];
|
|
79
|
-
lines.push(`**${label}:**`);
|
|
80
|
-
if (!raw) {
|
|
81
|
-
lines.push("");
|
|
82
|
-
lines.push("_(not captured)_");
|
|
83
|
-
return lines;
|
|
84
|
-
}
|
|
85
|
-
const truncated = raw.length > EVIDENCE_BLOCK_LIMIT;
|
|
86
|
-
const body = truncated ? raw.slice(0, EVIDENCE_BLOCK_LIMIT) : raw;
|
|
87
|
-
lines.push("```");
|
|
88
|
-
lines.push(body);
|
|
89
|
-
lines.push("```");
|
|
90
|
-
if (truncated) {
|
|
91
|
-
lines.push(`_Truncated for readability: ${raw.length - EVIDENCE_BLOCK_LIMIT} of ${raw.length} characters not shown. Use \`--format json\` or \`--format sarif\` for the complete evidence._`);
|
|
92
|
-
}
|
|
93
|
-
return lines;
|
|
94
|
-
}
|
|
95
|
-
function remediationSection(remediation) {
|
|
96
|
-
const lines = [];
|
|
97
|
-
lines.push("**Remediation:**");
|
|
98
|
-
lines.push("");
|
|
99
|
-
lines.push(remediation.summary);
|
|
100
|
-
if (remediation.steps.length > 0) {
|
|
101
|
-
lines.push("");
|
|
102
|
-
for (const step of remediation.steps)
|
|
103
|
-
lines.push(`1. ${step}`);
|
|
104
|
-
}
|
|
105
|
-
if (remediation.codeExample) {
|
|
106
|
-
const { before, after, language } = remediation.codeExample;
|
|
107
|
-
lines.push("");
|
|
108
|
-
lines.push("<details>");
|
|
109
|
-
lines.push("<summary>Suggested change</summary>");
|
|
110
|
-
lines.push("");
|
|
111
|
-
lines.push("Before:");
|
|
112
|
-
lines.push("");
|
|
113
|
-
lines.push("```" + language);
|
|
114
|
-
lines.push(before);
|
|
115
|
-
lines.push("```");
|
|
116
|
-
lines.push("");
|
|
117
|
-
lines.push("After:");
|
|
118
|
-
lines.push("");
|
|
119
|
-
lines.push("```" + language);
|
|
120
|
-
lines.push(after);
|
|
121
|
-
lines.push("```");
|
|
122
|
-
lines.push("</details>");
|
|
123
|
-
}
|
|
124
|
-
if (remediation.references.length > 0) {
|
|
125
|
-
lines.push("");
|
|
126
|
-
lines.push("References:");
|
|
127
|
-
for (const ref of remediation.references)
|
|
128
|
-
lines.push(`- ${ref}`);
|
|
129
|
-
}
|
|
130
|
-
lines.push("");
|
|
131
|
-
return lines;
|
|
132
|
-
}
|
|
133
|
-
function reproductionSection(steps) {
|
|
134
|
-
const lines = [];
|
|
135
|
-
lines.push("**Reproduction steps:**");
|
|
136
|
-
lines.push("");
|
|
137
|
-
const shown = steps.slice(0, POC_STEP_LIMIT);
|
|
138
|
-
shown.forEach((step, i) => {
|
|
139
|
-
lines.push(`${i + 1}. **[${step.kind}]** ${step.summary}`);
|
|
140
|
-
});
|
|
141
|
-
if (steps.length > shown.length) {
|
|
142
|
-
lines.push("");
|
|
143
|
-
lines.push(`_${steps.length - shown.length} further step(s) omitted; the full graph is in \`--format json\`._`);
|
|
144
|
-
}
|
|
145
|
-
lines.push("");
|
|
146
|
-
return lines;
|
|
147
|
-
}
|
|
148
|
-
function formatFinding(finding) {
|
|
149
|
-
const lines = [];
|
|
150
|
-
const priority = getFindingPriority(finding);
|
|
151
|
-
lines.push(`### [${priority.label}] ${finding.title}`);
|
|
152
|
-
lines.push("");
|
|
153
|
-
lines.push(`- **Business priority:** ${priority.label}`);
|
|
154
|
-
lines.push(`- **Business impact rationale:** ${priority.rationale}`);
|
|
155
|
-
lines.push(`- **Technical severity:** ${finding.severity}`);
|
|
156
|
-
lines.push(`- **Category:** ${finding.category}`);
|
|
157
|
-
lines.push(`- **Status:** ${finding.status}`);
|
|
158
|
-
if (finding.cvssScore !== void 0 || finding.cvssVector) {
|
|
159
|
-
const score = finding.cvssScore !== void 0 ? `${finding.cvssScore}` : "n/a";
|
|
160
|
-
const vector = finding.cvssVector ? ` (\`${finding.cvssVector}\`)` : "";
|
|
161
|
-
lines.push(`- **CVSS:** ${score}${vector}`);
|
|
162
|
-
}
|
|
163
|
-
if (finding.confidence !== void 0) {
|
|
164
|
-
lines.push(`- **Confidence:** ${(finding.confidence * 100).toFixed(0)}%`);
|
|
165
|
-
}
|
|
166
|
-
if (finding.triageNote) {
|
|
167
|
-
lines.push(`- **Triage:** ${finding.triageNote}`);
|
|
168
|
-
}
|
|
169
|
-
lines.push(`- **Description:** ${finding.description}`);
|
|
170
|
-
lines.push("");
|
|
171
|
-
if (finding.evidence.analysis) {
|
|
172
|
-
lines.push(`**Evidence:** ${finding.evidence.analysis}`);
|
|
173
|
-
lines.push("");
|
|
174
|
-
}
|
|
175
|
-
if (finding.pocSteps && finding.pocSteps.length > 0) {
|
|
176
|
-
lines.push(...reproductionSection(finding.pocSteps));
|
|
177
|
-
}
|
|
178
|
-
if (finding.remediation) {
|
|
179
|
-
lines.push(...remediationSection(finding.remediation));
|
|
180
|
-
}
|
|
181
|
-
lines.push("<details>");
|
|
182
|
-
lines.push("<summary>Request / Response</summary>");
|
|
183
|
-
lines.push("");
|
|
184
|
-
lines.push(...evidenceBlock("Request", finding.evidence.request));
|
|
185
|
-
lines.push("");
|
|
186
|
-
lines.push(...evidenceBlock("Response", finding.evidence.response));
|
|
187
|
-
lines.push("</details>");
|
|
188
|
-
lines.push("");
|
|
189
|
-
return lines.join("\n");
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// packages/core/dist/report-formatters/html.js
|
|
193
|
-
function escapeHtml(str) {
|
|
194
|
-
return str.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
195
|
-
}
|
|
196
|
-
var SEVERITY_COLORS = {
|
|
197
|
-
critical: { bg: "#991b1b", text: "#ffffff", accent: "#f87171" },
|
|
198
|
-
high: { bg: "#c2410c", text: "#ffffff", accent: "#fb923c" },
|
|
199
|
-
medium: { bg: "#a16207", text: "#000000", accent: "#facc15" },
|
|
200
|
-
low: { bg: "#1d4ed8", text: "#ffffff", accent: "#60a5fa" },
|
|
201
|
-
info: { bg: "#4b5563", text: "#ffffff", accent: "#9ca3af" }
|
|
202
|
-
};
|
|
203
|
-
var SEVERITY_ORDER = Object.keys(SEVERITY_RANK).sort((a, b) => SEVERITY_RANK[b] - SEVERITY_RANK[a]);
|
|
204
|
-
function formatCategory(cat) {
|
|
205
|
-
return cat.split("-").map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join(" ");
|
|
206
|
-
}
|
|
207
|
-
function formatDuration(ms) {
|
|
208
|
-
if (ms < 1e3)
|
|
209
|
-
return `${ms}ms`;
|
|
210
|
-
return `${(ms / 1e3).toFixed(1)}s`;
|
|
211
|
-
}
|
|
212
|
-
function riskLevel(summary) {
|
|
213
|
-
if (summary.critical > 0)
|
|
214
|
-
return { label: "CRITICAL", color: "#ef4444" };
|
|
215
|
-
if (summary.high > 0)
|
|
216
|
-
return { label: "HIGH", color: "#f97316" };
|
|
217
|
-
if (summary.medium > 0)
|
|
218
|
-
return { label: "MEDIUM", color: "#eab308" };
|
|
219
|
-
if (summary.low > 0)
|
|
220
|
-
return { label: "LOW", color: "#3b82f6" };
|
|
221
|
-
return { label: "CLEAN", color: "#22c55e" };
|
|
222
|
-
}
|
|
223
|
-
function renderFinding(finding, index) {
|
|
224
|
-
const sev = SEVERITY_COLORS[finding.severity];
|
|
225
|
-
const priority = getFindingPriority(finding);
|
|
226
|
-
const confidence = finding.confidence != null ? `${Math.round(finding.confidence * 100)}%` : null;
|
|
227
|
-
const cvss = finding.cvssScore != null ? finding.cvssScore.toFixed(1) : null;
|
|
228
|
-
const rank = finding.findingRank != null ? `Rank: ${finding.findingRank}` : null;
|
|
229
|
-
const dedupe = finding.semanticDedupe ? `Canonical: ${escapeHtml(finding.semanticDedupe.canonicalId.slice(0, 12))}\u2026` : null;
|
|
230
|
-
return `
|
|
231
|
-
<div class="finding-card">
|
|
232
|
-
<div class="finding-header">
|
|
233
|
-
<span class="severity-badge" style="background:#1a1a2e;color:#fff">Business priority: ${priority.label}</span>
|
|
234
|
-
<span class="finding-title">${escapeHtml(finding.title)}</span>
|
|
235
|
-
</div>
|
|
236
|
-
<p class="finding-desc"><strong>Business impact rationale:</strong> ${escapeHtml(priority.rationale)}</p>
|
|
237
|
-
<div class="finding-meta">
|
|
238
|
-
<span class="meta-tag" style="background:${sev.bg};color:${sev.text}">Technical severity: ${finding.severity}</span>
|
|
239
|
-
<span class="meta-tag">Category: ${formatCategory(finding.category)}</span>
|
|
240
|
-
${finding.status === "confirmed" ? '<span class="meta-tag confirmed">Confirmed</span>' : `<span class="meta-tag">${escapeHtml(finding.status)}</span>`}
|
|
241
|
-
${confidence ? `<span class="meta-tag">Confidence: ${confidence}</span>` : ""}
|
|
242
|
-
${cvss ? `<span class="meta-tag">CVSS: ${cvss}</span>` : ""}
|
|
243
|
-
${finding.cvssVector ? `<span class="meta-tag">CVSS vector: ${escapeHtml(finding.cvssVector)}</span>` : ""}
|
|
244
|
-
${rank ? `<span class="meta-tag">${rank}</span>` : ""}
|
|
245
|
-
${dedupe ? `<span class="meta-tag">${dedupe}</span>` : ""}
|
|
246
|
-
</div>
|
|
247
|
-
<p class="finding-desc">${escapeHtml(finding.description)}</p>
|
|
248
|
-
${finding.evidence.analysis ? `<div class="evidence-analysis"><strong>Analysis:</strong> ${escapeHtml(finding.evidence.analysis)}</div>` : ""}
|
|
249
|
-
<details class="evidence-details">
|
|
250
|
-
<summary>Request / Response</summary>
|
|
251
|
-
<div class="evidence-block">
|
|
252
|
-
<div class="evidence-label">Request</div>
|
|
253
|
-
<pre><code>${escapeHtml(finding.evidence.request.slice(0, 2e3))}</code></pre>
|
|
254
|
-
</div>
|
|
255
|
-
<div class="evidence-block">
|
|
256
|
-
<div class="evidence-label">Response</div>
|
|
257
|
-
<pre><code>${escapeHtml(finding.evidence.response.slice(0, 2e3))}</code></pre>
|
|
258
|
-
</div>
|
|
259
|
-
</details>
|
|
260
|
-
</div>`;
|
|
261
|
-
}
|
|
262
|
-
function renderSeverityBar(summary) {
|
|
263
|
-
const total = summary.critical + summary.high + summary.medium + summary.low + summary.info;
|
|
264
|
-
if (total === 0)
|
|
265
|
-
return "";
|
|
266
|
-
const segments = SEVERITY_ORDER.filter((s) => summary[s] > 0).map((s) => {
|
|
267
|
-
const pct = summary[s] / total * 100;
|
|
268
|
-
return `<div class="bar-segment" style="width:${pct}%;background:${SEVERITY_COLORS[s].accent}" title="${summary[s]} ${s}"></div>`;
|
|
269
|
-
}).join("");
|
|
270
|
-
return `<div class="severity-bar">${segments}</div>`;
|
|
271
|
-
}
|
|
272
|
-
function formatHtml(report) {
|
|
273
|
-
const risk = riskLevel(report.summary);
|
|
274
|
-
const sorted = [...report.findings].sort(compareFindingsByBusinessPriority);
|
|
275
|
-
const businessPriority = sorted[0] ? getFindingPriority(sorted[0]).label : "No findings";
|
|
276
|
-
const findingsHtml = sorted.length > 0 ? sorted.map((f, i) => renderFinding(f, i)).join("\n") : `<div class="no-findings">${report.warnings.length > 0 || report.executionSuccessful === false ? "No vulnerabilities confirmed. Scan finished with warnings." : report.reviewChecks?.length ? "No security vulnerabilities found. See advisory review-check results below." : "No vulnerabilities found. Target passed all tests."}</div>`;
|
|
277
|
-
const warningsHtml = report.warnings.length > 0 ? `<div class="section">
|
|
278
|
-
<h2 class="section-title warning-title">Warnings</h2>
|
|
279
|
-
${report.warnings.map((w) => `<div class="warning-item"><span class="warning-stage">${escapeHtml(w.stage)}</span> ${escapeHtml(w.message)}</div>`).join("\n")}
|
|
280
|
-
</div>` : "";
|
|
281
|
-
const checksHtml = report.reviewChecks?.length ? `<div class="section"><h2 class="section-title">Review Checks (Advisory)</h2>
|
|
282
|
-
${report.reviewChecks.map((check) => `<div class="warning-item">
|
|
283
|
-
<h3>${escapeHtml(check.status.toUpperCase())}: ${escapeHtml(check.name)}</h3>
|
|
284
|
-
<p><strong>ID:</strong> ${escapeHtml(check.id)}</p>
|
|
285
|
-
<p style="white-space:pre-wrap"><strong>Reason:</strong> ${escapeHtml(check.reason)}</p>
|
|
286
|
-
${check.fix ? `<p style="white-space:pre-wrap"><strong>Suggested fix:</strong> ${escapeHtml(check.fix)}</p>` : ""}
|
|
287
|
-
</div>`).join("\n")}</div>` : "";
|
|
288
|
-
const sevCountsHtml = SEVERITY_ORDER.map((s) => {
|
|
289
|
-
const count = report.summary[s];
|
|
290
|
-
return `<div class="sev-count"><span class="sev-dot" style="background:${SEVERITY_COLORS[s].accent}"></span><span class="sev-label">${s}</span><span class="sev-num">${count}</span></div>`;
|
|
291
|
-
}).join("");
|
|
292
|
-
return `<!DOCTYPE html>
|
|
293
|
-
<html lang="en">
|
|
294
|
-
<head>
|
|
295
|
-
<meta charset="UTF-8">
|
|
296
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
297
|
-
<title>0 Report \u2014 ${escapeHtml(report.target)}</title>
|
|
298
|
-
<style>
|
|
299
|
-
* { margin: 0; padding: 0; box-sizing: border-box; }
|
|
300
|
-
body {
|
|
301
|
-
background: #09090b;
|
|
302
|
-
color: #d4d4d8;
|
|
303
|
-
font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', 'JetBrains Mono', 'Consolas', monospace;
|
|
304
|
-
font-size: 14px;
|
|
305
|
-
line-height: 1.6;
|
|
306
|
-
padding: 2rem;
|
|
307
|
-
max-width: 960px;
|
|
308
|
-
margin: 0 auto;
|
|
309
|
-
}
|
|
310
|
-
a { color: #f87171; text-decoration: none; }
|
|
311
|
-
a:hover { text-decoration: underline; }
|
|
312
|
-
|
|
313
|
-
/* Header */
|
|
314
|
-
.header {
|
|
315
|
-
border-bottom: 1px solid #27272a;
|
|
316
|
-
padding-bottom: 1.5rem;
|
|
317
|
-
margin-bottom: 2rem;
|
|
318
|
-
}
|
|
319
|
-
.header-top {
|
|
320
|
-
display: flex;
|
|
321
|
-
align-items: center;
|
|
322
|
-
justify-content: space-between;
|
|
323
|
-
flex-wrap: wrap;
|
|
324
|
-
gap: 1rem;
|
|
325
|
-
}
|
|
326
|
-
.brand {
|
|
327
|
-
color: #f87171;
|
|
328
|
-
font-size: 1.6rem;
|
|
329
|
-
font-weight: bold;
|
|
330
|
-
letter-spacing: 0.15em;
|
|
331
|
-
}
|
|
332
|
-
.brand-sub { color: #52525b; font-size: 0.8rem; }
|
|
333
|
-
.risk-badge {
|
|
334
|
-
font-size: 0.85rem;
|
|
335
|
-
font-weight: bold;
|
|
336
|
-
padding: 0.3rem 1rem;
|
|
337
|
-
border-radius: 4px;
|
|
338
|
-
letter-spacing: 0.1em;
|
|
339
|
-
}
|
|
340
|
-
.meta-grid {
|
|
341
|
-
display: grid;
|
|
342
|
-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
343
|
-
gap: 0.5rem;
|
|
344
|
-
margin-top: 1rem;
|
|
345
|
-
font-size: 0.85rem;
|
|
346
|
-
color: #71717a;
|
|
347
|
-
}
|
|
348
|
-
.meta-grid span { display: block; }
|
|
349
|
-
.meta-grid strong { color: #a1a1aa; }
|
|
350
|
-
|
|
351
|
-
/* Summary */
|
|
352
|
-
.summary-section {
|
|
353
|
-
display: grid;
|
|
354
|
-
grid-template-columns: 1fr 1fr;
|
|
355
|
-
gap: 1.5rem;
|
|
356
|
-
margin-bottom: 2rem;
|
|
357
|
-
padding-bottom: 1.5rem;
|
|
358
|
-
border-bottom: 1px solid #27272a;
|
|
359
|
-
}
|
|
360
|
-
@media (max-width: 600px) {
|
|
361
|
-
.summary-section { grid-template-columns: 1fr; }
|
|
362
|
-
}
|
|
363
|
-
.stat-box {
|
|
364
|
-
background: #18181b;
|
|
365
|
-
border: 1px solid #27272a;
|
|
366
|
-
border-radius: 6px;
|
|
367
|
-
padding: 1rem;
|
|
368
|
-
}
|
|
369
|
-
.stat-box h3 {
|
|
370
|
-
color: #71717a;
|
|
371
|
-
font-size: 0.75rem;
|
|
372
|
-
letter-spacing: 0.1em;
|
|
373
|
-
text-transform: uppercase;
|
|
374
|
-
margin-bottom: 0.5rem;
|
|
375
|
-
}
|
|
376
|
-
.stat-box .big-num {
|
|
377
|
-
font-size: 2rem;
|
|
378
|
-
font-weight: bold;
|
|
379
|
-
color: #fafafa;
|
|
380
|
-
}
|
|
381
|
-
.sev-counts {
|
|
382
|
-
display: flex;
|
|
383
|
-
flex-wrap: wrap;
|
|
384
|
-
gap: 0.75rem;
|
|
385
|
-
margin-top: 0.5rem;
|
|
386
|
-
}
|
|
387
|
-
.sev-count {
|
|
388
|
-
display: flex;
|
|
389
|
-
align-items: center;
|
|
390
|
-
gap: 0.35rem;
|
|
391
|
-
font-size: 0.8rem;
|
|
392
|
-
}
|
|
393
|
-
.sev-dot {
|
|
394
|
-
width: 8px;
|
|
395
|
-
height: 8px;
|
|
396
|
-
border-radius: 50%;
|
|
397
|
-
display: inline-block;
|
|
398
|
-
}
|
|
399
|
-
.sev-label { color: #71717a; }
|
|
400
|
-
.sev-num { color: #d4d4d8; font-weight: bold; }
|
|
401
|
-
|
|
402
|
-
.severity-bar {
|
|
403
|
-
display: flex;
|
|
404
|
-
height: 6px;
|
|
405
|
-
border-radius: 3px;
|
|
406
|
-
overflow: hidden;
|
|
407
|
-
margin-top: 0.75rem;
|
|
408
|
-
}
|
|
409
|
-
.bar-segment { min-width: 4px; }
|
|
410
|
-
|
|
411
|
-
/* Findings */
|
|
412
|
-
.section { margin-bottom: 2rem; }
|
|
413
|
-
.section-title {
|
|
414
|
-
color: #f87171;
|
|
415
|
-
font-size: 0.9rem;
|
|
416
|
-
letter-spacing: 0.1em;
|
|
417
|
-
text-transform: uppercase;
|
|
418
|
-
margin-bottom: 1rem;
|
|
419
|
-
}
|
|
420
|
-
.warning-title { color: #facc15; }
|
|
421
|
-
|
|
422
|
-
.finding-card {
|
|
423
|
-
background: #18181b;
|
|
424
|
-
border: 1px solid #27272a;
|
|
425
|
-
border-radius: 6px;
|
|
426
|
-
padding: 1rem;
|
|
427
|
-
margin-bottom: 0.75rem;
|
|
428
|
-
}
|
|
429
|
-
.finding-header {
|
|
430
|
-
display: flex;
|
|
431
|
-
align-items: center;
|
|
432
|
-
gap: 0.75rem;
|
|
433
|
-
margin-bottom: 0.5rem;
|
|
434
|
-
}
|
|
435
|
-
.severity-badge {
|
|
436
|
-
font-size: 0.7rem;
|
|
437
|
-
font-weight: bold;
|
|
438
|
-
padding: 0.15rem 0.5rem;
|
|
439
|
-
border-radius: 3px;
|
|
440
|
-
letter-spacing: 0.05em;
|
|
441
|
-
flex-shrink: 0;
|
|
442
|
-
}
|
|
443
|
-
.finding-title {
|
|
444
|
-
color: #fafafa;
|
|
445
|
-
font-weight: bold;
|
|
446
|
-
font-size: 0.95rem;
|
|
447
|
-
}
|
|
448
|
-
.finding-meta {
|
|
449
|
-
display: flex;
|
|
450
|
-
flex-wrap: wrap;
|
|
451
|
-
gap: 0.5rem;
|
|
452
|
-
margin-bottom: 0.5rem;
|
|
453
|
-
}
|
|
454
|
-
.meta-tag {
|
|
455
|
-
font-size: 0.75rem;
|
|
456
|
-
color: #71717a;
|
|
457
|
-
background: #27272a;
|
|
458
|
-
padding: 0.1rem 0.5rem;
|
|
459
|
-
border-radius: 3px;
|
|
460
|
-
}
|
|
461
|
-
.meta-tag.confirmed { color: #4ade80; background: #052e16; }
|
|
462
|
-
.finding-desc {
|
|
463
|
-
color: #a1a1aa;
|
|
464
|
-
font-size: 0.85rem;
|
|
465
|
-
margin-bottom: 0.5rem;
|
|
466
|
-
}
|
|
467
|
-
.evidence-analysis {
|
|
468
|
-
color: #a1a1aa;
|
|
469
|
-
font-size: 0.85rem;
|
|
470
|
-
font-style: italic;
|
|
471
|
-
padding: 0.5rem;
|
|
472
|
-
background: #1c1c1e;
|
|
473
|
-
border-left: 3px solid #3f3f46;
|
|
474
|
-
border-radius: 2px;
|
|
475
|
-
margin-bottom: 0.5rem;
|
|
476
|
-
}
|
|
477
|
-
.evidence-details {
|
|
478
|
-
margin-top: 0.5rem;
|
|
479
|
-
}
|
|
480
|
-
.evidence-details summary {
|
|
481
|
-
cursor: pointer;
|
|
482
|
-
color: #71717a;
|
|
483
|
-
font-size: 0.8rem;
|
|
484
|
-
padding: 0.3rem 0;
|
|
485
|
-
}
|
|
486
|
-
.evidence-details summary:hover { color: #a1a1aa; }
|
|
487
|
-
.evidence-block {
|
|
488
|
-
margin-top: 0.5rem;
|
|
489
|
-
}
|
|
490
|
-
.evidence-label {
|
|
491
|
-
font-size: 0.75rem;
|
|
492
|
-
color: #71717a;
|
|
493
|
-
text-transform: uppercase;
|
|
494
|
-
letter-spacing: 0.05em;
|
|
495
|
-
margin-bottom: 0.25rem;
|
|
496
|
-
}
|
|
497
|
-
.evidence-details pre {
|
|
498
|
-
background: #0a0a0a;
|
|
499
|
-
border: 1px solid #27272a;
|
|
500
|
-
border-radius: 4px;
|
|
501
|
-
padding: 0.75rem;
|
|
502
|
-
overflow-x: auto;
|
|
503
|
-
font-size: 0.8rem;
|
|
504
|
-
line-height: 1.5;
|
|
505
|
-
color: #a1a1aa;
|
|
506
|
-
white-space: pre-wrap;
|
|
507
|
-
word-break: break-word;
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.no-findings {
|
|
511
|
-
background: #052e16;
|
|
512
|
-
color: #4ade80;
|
|
513
|
-
padding: 1rem;
|
|
514
|
-
border-radius: 6px;
|
|
515
|
-
border: 1px solid #166534;
|
|
516
|
-
font-size: 0.9rem;
|
|
517
|
-
}
|
|
518
|
-
|
|
519
|
-
.warning-item {
|
|
520
|
-
padding: 0.4rem 0.5rem;
|
|
521
|
-
margin-bottom: 0.25rem;
|
|
522
|
-
background: #1c1307;
|
|
523
|
-
border-left: 3px solid #facc15;
|
|
524
|
-
border-radius: 2px;
|
|
525
|
-
font-size: 0.85rem;
|
|
526
|
-
}
|
|
527
|
-
.warning-stage {
|
|
528
|
-
color: #facc15;
|
|
529
|
-
font-weight: bold;
|
|
530
|
-
margin-right: 0.5rem;
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
/* Timeline */
|
|
534
|
-
.timeline {
|
|
535
|
-
font-size: 0.8rem;
|
|
536
|
-
color: #71717a;
|
|
537
|
-
}
|
|
538
|
-
.timeline-row {
|
|
539
|
-
display: flex;
|
|
540
|
-
gap: 0.5rem;
|
|
541
|
-
padding: 0.2rem 0;
|
|
542
|
-
}
|
|
543
|
-
.timeline-label { color: #52525b; min-width: 80px; }
|
|
544
|
-
.timeline-value { color: #a1a1aa; }
|
|
545
|
-
|
|
546
|
-
/* Footer */
|
|
547
|
-
.footer {
|
|
548
|
-
margin-top: 2rem;
|
|
549
|
-
padding-top: 1rem;
|
|
550
|
-
border-top: 1px solid #27272a;
|
|
551
|
-
color: #3f3f46;
|
|
552
|
-
font-size: 0.75rem;
|
|
553
|
-
text-align: center;
|
|
554
|
-
}
|
|
555
|
-
</style>
|
|
556
|
-
</head>
|
|
557
|
-
<body>
|
|
558
|
-
<div class="header">
|
|
559
|
-
<div class="header-top">
|
|
560
|
-
<div>
|
|
561
|
-
<div class="brand">ZERO</div>
|
|
562
|
-
<div class="brand-sub">Security Scan Report</div>
|
|
563
|
-
</div>
|
|
564
|
-
<div class="risk-badge" style="background:#1a1a2e;color:#fff">Business priority: ${businessPriority}</div>
|
|
565
|
-
</div>
|
|
566
|
-
<div class="meta-grid">
|
|
567
|
-
<span><strong>Target:</strong> ${escapeHtml(report.target)}</span>
|
|
568
|
-
<span><strong>Technical risk:</strong> ${risk.label}</span>
|
|
569
|
-
<span><strong>Depth:</strong> ${report.scanDepth}</span>
|
|
570
|
-
<span><strong>Duration:</strong> ${formatDuration(report.durationMs)}</span>
|
|
571
|
-
<span><strong>Started:</strong> ${escapeHtml(report.startedAt)}</span>
|
|
572
|
-
</div>
|
|
573
|
-
</div>
|
|
574
|
-
|
|
575
|
-
<div class="summary-section">
|
|
576
|
-
<div class="stat-box">
|
|
577
|
-
<h3>Findings</h3>
|
|
578
|
-
<div class="big-num">${report.summary.totalFindings}</div>
|
|
579
|
-
<div class="sev-counts">${["Urgent", "High", "Moderate", "Low", "Not assessed"].map((label) => {
|
|
580
|
-
const count = report.findings.filter((finding) => getFindingPriority(finding).label === label).length;
|
|
581
|
-
return count ? `<span>Business priority ${label}: ${count}</span>` : "";
|
|
582
|
-
}).join(" ")}</div>
|
|
583
|
-
<h3>Technical severity</h3>
|
|
584
|
-
<div class="sev-counts">
|
|
585
|
-
${sevCountsHtml}
|
|
586
|
-
</div>
|
|
587
|
-
${renderSeverityBar(report.summary)}
|
|
588
|
-
</div>
|
|
589
|
-
<div class="stat-box">
|
|
590
|
-
<h3>Attacks Tested</h3>
|
|
591
|
-
<div class="big-num">${report.summary.totalAttacks}</div>
|
|
592
|
-
<div class="timeline">
|
|
593
|
-
<div class="timeline-row"><span class="timeline-label">Started</span><span class="timeline-value">${escapeHtml(report.startedAt)}</span></div>
|
|
594
|
-
<div class="timeline-row"><span class="timeline-label">Completed</span><span class="timeline-value">${escapeHtml(report.completedAt)}</span></div>
|
|
595
|
-
<div class="timeline-row"><span class="timeline-label">Duration</span><span class="timeline-value">${formatDuration(report.durationMs)}</span></div>
|
|
596
|
-
</div>
|
|
597
|
-
</div>
|
|
598
|
-
</div>
|
|
599
|
-
|
|
600
|
-
${warningsHtml}
|
|
601
|
-
|
|
602
|
-
<div class="section">
|
|
603
|
-
<h2 class="section-title">Findings</h2>
|
|
604
|
-
${findingsHtml}
|
|
605
|
-
</div>
|
|
606
|
-
|
|
607
|
-
${checksHtml}
|
|
608
|
-
|
|
609
|
-
<div class="footer">
|
|
610
|
-
Generated by 0 · ${escapeHtml((/* @__PURE__ */ new Date()).toISOString())}
|
|
611
|
-
</div>
|
|
612
|
-
</body>
|
|
613
|
-
</html>`;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
// packages/core/dist/report-formatters/sarif.js
|
|
617
|
-
function severityToLevel(severity) {
|
|
618
|
-
switch (severity) {
|
|
619
|
-
case "critical":
|
|
620
|
-
case "high":
|
|
621
|
-
return "error";
|
|
622
|
-
case "medium":
|
|
623
|
-
return "warning";
|
|
624
|
-
case "low":
|
|
625
|
-
case "info":
|
|
626
|
-
return "note";
|
|
627
|
-
}
|
|
628
|
-
}
|
|
629
|
-
function stableFingerprint(finding, target) {
|
|
630
|
-
return [
|
|
631
|
-
finding.fingerprint,
|
|
632
|
-
finding.templateId,
|
|
633
|
-
finding.category,
|
|
634
|
-
finding.title,
|
|
635
|
-
target
|
|
636
|
-
].filter(Boolean).join("|");
|
|
637
|
-
}
|
|
638
|
-
function actionSummary(step) {
|
|
639
|
-
switch (step.action.type) {
|
|
640
|
-
case "shell":
|
|
641
|
-
return { type: "shell", command: step.action.cmd, cwd: step.action.cwd };
|
|
642
|
-
case "http":
|
|
643
|
-
return {
|
|
644
|
-
type: "http",
|
|
645
|
-
method: step.action.method,
|
|
646
|
-
url: step.action.url,
|
|
647
|
-
headers: step.action.headers
|
|
648
|
-
};
|
|
649
|
-
case "docker":
|
|
650
|
-
return { type: "docker", image: step.action.image, args: step.action.args };
|
|
651
|
-
case "note":
|
|
652
|
-
return { type: "note" };
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
function pocStepsToCodeFlows(pocSteps, target) {
|
|
656
|
-
if (!pocSteps || pocSteps.length === 0)
|
|
657
|
-
return void 0;
|
|
658
|
-
return [
|
|
659
|
-
{
|
|
660
|
-
threadFlows: [
|
|
661
|
-
{
|
|
662
|
-
locations: pocSteps.map((step) => ({
|
|
663
|
-
location: {
|
|
664
|
-
physicalLocation: {
|
|
665
|
-
artifactLocation: { uri: target }
|
|
666
|
-
},
|
|
667
|
-
message: { text: `${step.kind}: ${step.summary}` },
|
|
668
|
-
properties: {
|
|
669
|
-
stepId: step.id,
|
|
670
|
-
kind: step.kind,
|
|
671
|
-
action: actionSummary(step),
|
|
672
|
-
expect: step.expect
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
}))
|
|
676
|
-
}
|
|
677
|
-
]
|
|
678
|
-
}
|
|
679
|
-
];
|
|
680
|
-
}
|
|
681
|
-
function findingToResult(finding, target) {
|
|
682
|
-
const result = {
|
|
683
|
-
ruleId: finding.templateId,
|
|
684
|
-
level: severityToLevel(finding.severity),
|
|
685
|
-
message: { text: finding.description },
|
|
686
|
-
locations: [
|
|
687
|
-
{
|
|
688
|
-
physicalLocation: {
|
|
689
|
-
artifactLocation: { uri: target }
|
|
690
|
-
}
|
|
691
|
-
}
|
|
692
|
-
],
|
|
693
|
-
partialFingerprints: {
|
|
694
|
-
primary: stableFingerprint(finding, target)
|
|
695
|
-
}
|
|
696
|
-
};
|
|
697
|
-
const codeFlows = pocStepsToCodeFlows(finding.pocSteps, target);
|
|
698
|
-
if (codeFlows)
|
|
699
|
-
result.codeFlows = codeFlows;
|
|
700
|
-
const priority = getFindingPriority(finding);
|
|
701
|
-
result.properties = {
|
|
702
|
-
businessPriority: priority.label,
|
|
703
|
-
businessPriorityRank: priority.rank,
|
|
704
|
-
businessPriorityAssessed: priority.assessed,
|
|
705
|
-
businessPriorityRationale: priority.rationale,
|
|
706
|
-
findingId: finding.id,
|
|
707
|
-
category: finding.category,
|
|
708
|
-
severity: finding.severity,
|
|
709
|
-
status: finding.status,
|
|
710
|
-
evidence: finding.evidence
|
|
711
|
-
};
|
|
712
|
-
if (finding.impactAssessment)
|
|
713
|
-
result.properties["impactAssessment"] = finding.impactAssessment;
|
|
714
|
-
if (finding.cvssScore !== void 0)
|
|
715
|
-
result.properties["cvssScore"] = finding.cvssScore;
|
|
716
|
-
if (finding.cvssVector)
|
|
717
|
-
result.properties["cvssVector"] = finding.cvssVector;
|
|
718
|
-
if (finding.confidence !== void 0)
|
|
719
|
-
result.properties["confidence"] = finding.confidence;
|
|
720
|
-
if (finding.publishability)
|
|
721
|
-
result.properties["publishability"] = finding.publishability;
|
|
722
|
-
if (finding.noveltyVerdict)
|
|
723
|
-
result.properties["noveltyVerdict"] = finding.noveltyVerdict;
|
|
724
|
-
if (finding.dedupRefs)
|
|
725
|
-
result.properties["dedupRefs"] = finding.dedupRefs;
|
|
726
|
-
if (finding.advisoryMatches)
|
|
727
|
-
result.properties["advisoryMatches"] = finding.advisoryMatches;
|
|
728
|
-
if (finding.verification_result)
|
|
729
|
-
result.properties["verificationResult"] = finding.verification_result;
|
|
730
|
-
if (finding.inlineValidation)
|
|
731
|
-
result.properties["inlineValidation"] = finding.inlineValidation;
|
|
732
|
-
if (finding.supplyChain)
|
|
733
|
-
result.properties["supplyChain"] = finding.supplyChain;
|
|
734
|
-
if (finding.kernelExploit)
|
|
735
|
-
result.properties["kernelExploit"] = finding.kernelExploit;
|
|
736
|
-
if (finding.semanticDedupe)
|
|
737
|
-
result.properties["semanticDedupe"] = finding.semanticDedupe;
|
|
738
|
-
if (finding.findingRank !== void 0)
|
|
739
|
-
result.properties["findingRank"] = finding.findingRank;
|
|
740
|
-
return result;
|
|
741
|
-
}
|
|
742
|
-
function findingToRule(finding) {
|
|
743
|
-
return {
|
|
744
|
-
id: finding.templateId,
|
|
745
|
-
name: finding.title,
|
|
746
|
-
shortDescription: { text: finding.title },
|
|
747
|
-
defaultConfiguration: { level: severityToLevel(finding.severity) },
|
|
748
|
-
properties: {
|
|
749
|
-
category: finding.category,
|
|
750
|
-
severity: finding.severity
|
|
751
|
-
}
|
|
752
|
-
};
|
|
753
|
-
}
|
|
754
|
-
function formatSarif(report) {
|
|
755
|
-
const rulesMap = /* @__PURE__ */ new Map();
|
|
756
|
-
for (const finding of report.findings) {
|
|
757
|
-
if (!rulesMap.has(finding.templateId)) {
|
|
758
|
-
rulesMap.set(finding.templateId, findingToRule(finding));
|
|
759
|
-
}
|
|
760
|
-
}
|
|
761
|
-
for (const check of report.reviewChecks ?? []) {
|
|
762
|
-
rulesMap.set(`review-check/${check.id}`, {
|
|
763
|
-
id: `review-check/${check.id}`,
|
|
764
|
-
name: check.name,
|
|
765
|
-
shortDescription: { text: check.name },
|
|
766
|
-
defaultConfiguration: { level: "note" },
|
|
767
|
-
properties: { advisory: true }
|
|
768
|
-
});
|
|
769
|
-
}
|
|
770
|
-
const sarif = {
|
|
771
|
-
$schema: "https://raw.githubusercontent.com/oasis-tcs/sarif-spec/main/sarif-2.1/schema/sarif-schema-2.1.0.json",
|
|
772
|
-
version: "2.1.0",
|
|
773
|
-
runs: [
|
|
774
|
-
{
|
|
775
|
-
tool: {
|
|
776
|
-
driver: {
|
|
777
|
-
name: "0",
|
|
778
|
-
version: VERSION,
|
|
779
|
-
informationUri: "https://github.com/0sec-labs/0",
|
|
780
|
-
rules: Array.from(rulesMap.values())
|
|
781
|
-
}
|
|
782
|
-
},
|
|
783
|
-
results: [
|
|
784
|
-
...[...report.findings].sort(compareFindingsByBusinessPriority).map((f) => findingToResult(f, report.target)),
|
|
785
|
-
...(report.reviewChecks ?? []).map((check) => ({
|
|
786
|
-
ruleId: `review-check/${check.id}`,
|
|
787
|
-
kind: check.status === "pass" ? "pass" : check.status === "issue" ? "fail" : "open",
|
|
788
|
-
level: "note",
|
|
789
|
-
message: { text: `${check.name}: ${check.reason}${check.fix ? `
|
|
790
|
-
Suggested fix: ${check.fix}` : ""}` },
|
|
791
|
-
properties: { advisory: true, reviewCheck: check }
|
|
792
|
-
}))
|
|
793
|
-
],
|
|
794
|
-
invocations: [
|
|
795
|
-
{
|
|
796
|
-
executionSuccessful: report.executionSuccessful !== false,
|
|
797
|
-
startTimeUtc: report.startedAt,
|
|
798
|
-
endTimeUtc: report.completedAt
|
|
799
|
-
}
|
|
800
|
-
]
|
|
801
|
-
}
|
|
802
|
-
]
|
|
803
|
-
};
|
|
804
|
-
return JSON.stringify(sarif, null, 2);
|
|
805
|
-
}
|
|
806
|
-
|
|
807
|
-
// packages/core/dist/report-formatters/pdf.js
|
|
808
|
-
import { createRequire } from "node:module";
|
|
809
|
-
import { createWriteStream } from "node:fs";
|
|
810
|
-
var COLORS = {
|
|
811
|
-
primary: "#1a1a2e",
|
|
812
|
-
accent: "#e94560",
|
|
813
|
-
background: "#f8f9fa",
|
|
814
|
-
text: "#2d2d2d",
|
|
815
|
-
textLight: "#6c757d",
|
|
816
|
-
white: "#ffffff",
|
|
817
|
-
severity: {
|
|
818
|
-
critical: "#dc2626",
|
|
819
|
-
high: "#ea580c",
|
|
820
|
-
medium: "#ca8a04",
|
|
821
|
-
low: "#2563eb",
|
|
822
|
-
info: "#6b7280"
|
|
823
|
-
}
|
|
824
|
-
};
|
|
825
|
-
var PAGE_MARGIN = 50;
|
|
826
|
-
var CONTENT_WIDTH = 612 - PAGE_MARGIN * 2;
|
|
827
|
-
function severityLabel(s) {
|
|
828
|
-
return s.charAt(0).toUpperCase() + s.slice(1);
|
|
829
|
-
}
|
|
830
|
-
function formatDate(iso) {
|
|
831
|
-
return new Date(iso).toLocaleDateString("en-US", {
|
|
832
|
-
year: "numeric",
|
|
833
|
-
month: "long",
|
|
834
|
-
day: "numeric",
|
|
835
|
-
hour: "2-digit",
|
|
836
|
-
minute: "2-digit"
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
function formatDuration2(ms) {
|
|
840
|
-
if (ms < 1e3)
|
|
841
|
-
return `${ms}ms`;
|
|
842
|
-
const seconds = Math.floor(ms / 1e3);
|
|
843
|
-
if (seconds < 60)
|
|
844
|
-
return `${seconds}s`;
|
|
845
|
-
const minutes = Math.floor(seconds / 60);
|
|
846
|
-
const remainingSec = seconds % 60;
|
|
847
|
-
return `${minutes}m ${remainingSec}s`;
|
|
848
|
-
}
|
|
849
|
-
function riskScore(summary) {
|
|
850
|
-
const score = summary.critical * 40 + summary.high * 20 + summary.medium * 10 + summary.low * 3 + summary.info * 0;
|
|
851
|
-
return Math.min(100, score);
|
|
852
|
-
}
|
|
853
|
-
function riskRating(score) {
|
|
854
|
-
if (score >= 80)
|
|
855
|
-
return "Critical";
|
|
856
|
-
if (score >= 60)
|
|
857
|
-
return "High";
|
|
858
|
-
if (score >= 30)
|
|
859
|
-
return "Medium";
|
|
860
|
-
if (score >= 10)
|
|
861
|
-
return "Low";
|
|
862
|
-
return "Informational";
|
|
863
|
-
}
|
|
864
|
-
function truncate(text, maxLen) {
|
|
865
|
-
if (text.length <= maxLen)
|
|
866
|
-
return text;
|
|
867
|
-
return text.slice(0, maxLen - 3) + "...";
|
|
868
|
-
}
|
|
869
|
-
async function generatePdfReport(report, outputPath) {
|
|
870
|
-
const require_ = createRequire(import.meta.url);
|
|
871
|
-
const PDFDocument = require_("pdfkit");
|
|
872
|
-
return new Promise((resolve, reject) => {
|
|
873
|
-
const doc = new PDFDocument({
|
|
874
|
-
size: "LETTER",
|
|
875
|
-
margins: { top: PAGE_MARGIN, bottom: PAGE_MARGIN, left: PAGE_MARGIN, right: PAGE_MARGIN },
|
|
876
|
-
info: {
|
|
877
|
-
Title: `0 Pentest Report - ${report.target}`,
|
|
878
|
-
Author: "0",
|
|
879
|
-
Subject: "Automated Penetration Test Report",
|
|
880
|
-
CreationDate: /* @__PURE__ */ new Date()
|
|
881
|
-
},
|
|
882
|
-
bufferPages: true
|
|
883
|
-
});
|
|
884
|
-
const stream = createWriteStream(outputPath);
|
|
885
|
-
stream.on("error", reject);
|
|
886
|
-
stream.on("finish", resolve);
|
|
887
|
-
doc.pipe(stream);
|
|
888
|
-
renderCoverPage(doc, report);
|
|
889
|
-
renderExecutiveSummary(doc, report);
|
|
890
|
-
renderFindingsTable(doc, report);
|
|
891
|
-
renderFindingDetails(doc, report);
|
|
892
|
-
renderReviewChecks(doc, report);
|
|
893
|
-
renderMethodology(doc, report);
|
|
894
|
-
renderFooters(doc);
|
|
895
|
-
doc.end();
|
|
896
|
-
});
|
|
897
|
-
}
|
|
898
|
-
function renderCoverPage(doc, report) {
|
|
899
|
-
doc.rect(0, 0, 612, 792).fill(COLORS.primary);
|
|
900
|
-
doc.fontSize(48).font("Helvetica-Bold").fillColor(COLORS.accent).text("0", PAGE_MARGIN, 200, { align: "center" });
|
|
901
|
-
doc.fontSize(14).font("Helvetica").fillColor(COLORS.white).text("Automated Penetration Test Report", PAGE_MARGIN, 260, { align: "center" });
|
|
902
|
-
doc.moveTo(200, 300).lineTo(412, 300).strokeColor(COLORS.accent).lineWidth(2).stroke();
|
|
903
|
-
doc.fontSize(18).font("Helvetica-Bold").fillColor(COLORS.white).text(report.target, PAGE_MARGIN, 330, { align: "center" });
|
|
904
|
-
doc.fontSize(12).font("Helvetica").fillColor(COLORS.textLight).text(`Scan Depth: ${report.scanDepth}`, PAGE_MARGIN, 370, { align: "center" }).text(`Date: ${formatDate(report.startedAt)}`, PAGE_MARGIN, 390, { align: "center" }).text(`Duration: ${formatDuration2(report.durationMs)}`, PAGE_MARGIN, 410, { align: "center" });
|
|
905
|
-
const firstFinding = [...report.findings].sort(compareFindingsByBusinessPriority)[0];
|
|
906
|
-
if (firstFinding)
|
|
907
|
-
doc.fontSize(14).font("Helvetica-Bold").fillColor(COLORS.white).text(`Business priority: ${getFindingPriority(firstFinding).label}`, PAGE_MARGIN, 440, { align: "center" });
|
|
908
|
-
const score = riskScore(report.summary);
|
|
909
|
-
const rating = riskRating(score);
|
|
910
|
-
doc.fontSize(14).font("Helvetica-Bold").fillColor(COLORS.accent).text(`Technical Risk Score: ${score}/100 (${rating})`, PAGE_MARGIN, 460, { align: "center" });
|
|
911
|
-
doc.fontSize(9).font("Helvetica").fillColor(COLORS.textLight).text("CONFIDENTIAL - For authorized recipients only", PAGE_MARGIN, 700, { align: "center" });
|
|
912
|
-
}
|
|
913
|
-
function renderExecutiveSummary(doc, report) {
|
|
914
|
-
doc.addPage();
|
|
915
|
-
sectionTitle(doc, "Executive Summary");
|
|
916
|
-
const score = riskScore(report.summary);
|
|
917
|
-
const rating = riskRating(score);
|
|
918
|
-
const { summary } = report;
|
|
919
|
-
doc.fontSize(11).font("Helvetica").fillColor(COLORS.text).text(`An automated penetration test was conducted against ${report.target} on ${formatDate(report.startedAt)}. The scan ran for ${formatDuration2(report.durationMs)} at "${report.scanDepth}" depth.`, PAGE_MARGIN, doc.y + 10, { width: CONTENT_WIDTH });
|
|
920
|
-
doc.moveDown(0.5);
|
|
921
|
-
doc.text(`The technical risk score is ${score}/100 (${rating}). A total of ${summary.totalFindings} finding(s) were identified across ${summary.totalAttacks} attack(s).`, { width: CONTENT_WIDTH });
|
|
922
|
-
doc.moveDown(1);
|
|
923
|
-
subSectionTitle(doc, "Business priority");
|
|
924
|
-
for (const label of ["Urgent", "High", "Moderate", "Low", "Not assessed"]) {
|
|
925
|
-
const count = report.findings.filter((finding) => getFindingPriority(finding).label === label).length;
|
|
926
|
-
if (count)
|
|
927
|
-
doc.fontSize(10).font("Helvetica").fillColor(COLORS.text).text(`${label}: ${count}`);
|
|
928
|
-
}
|
|
929
|
-
doc.moveDown(0.5);
|
|
930
|
-
subSectionTitle(doc, "Findings by Technical Severity");
|
|
931
|
-
const severities = ["critical", "high", "medium", "low", "info"];
|
|
932
|
-
const sevCounts = {
|
|
933
|
-
critical: summary.critical,
|
|
934
|
-
high: summary.high,
|
|
935
|
-
medium: summary.medium,
|
|
936
|
-
low: summary.low,
|
|
937
|
-
info: summary.info
|
|
938
|
-
};
|
|
939
|
-
for (const sev of severities) {
|
|
940
|
-
const count = sevCounts[sev];
|
|
941
|
-
if (count === 0)
|
|
942
|
-
continue;
|
|
943
|
-
const barWidth = Math.max(4, count / Math.max(summary.totalFindings, 1) * (CONTENT_WIDTH - 140));
|
|
944
|
-
const y = doc.y;
|
|
945
|
-
doc.fontSize(10).font("Helvetica-Bold").fillColor(COLORS.severity[sev]).text(severityLabel(sev), PAGE_MARGIN, y, { width: 70 });
|
|
946
|
-
doc.rect(PAGE_MARGIN + 80, y + 2, barWidth, 12).fill(COLORS.severity[sev]);
|
|
947
|
-
doc.fontSize(10).font("Helvetica").fillColor(COLORS.text).text(String(count), PAGE_MARGIN + 90 + barWidth, y, { width: 40 });
|
|
948
|
-
doc.y = y + 22;
|
|
949
|
-
}
|
|
950
|
-
if (report.warnings.length > 0) {
|
|
951
|
-
doc.moveDown(1);
|
|
952
|
-
subSectionTitle(doc, "Warnings");
|
|
953
|
-
for (const w of report.warnings) {
|
|
954
|
-
doc.fontSize(9).font("Helvetica").fillColor(COLORS.textLight).text(`[${w.stage}] ${w.message}`, PAGE_MARGIN, doc.y, { width: CONTENT_WIDTH });
|
|
955
|
-
doc.moveDown(0.3);
|
|
956
|
-
}
|
|
957
|
-
}
|
|
958
|
-
}
|
|
959
|
-
function renderFindingsTable(doc, report) {
|
|
960
|
-
if (report.findings.length === 0)
|
|
961
|
-
return;
|
|
962
|
-
doc.addPage();
|
|
963
|
-
sectionTitle(doc, "Findings Overview");
|
|
964
|
-
const colWidths = { severity: 90, title: 210, category: 105, status: 80 };
|
|
965
|
-
const tableX = PAGE_MARGIN;
|
|
966
|
-
const headerY = doc.y + 5;
|
|
967
|
-
doc.rect(tableX, headerY, CONTENT_WIDTH, 20).fill(COLORS.primary);
|
|
968
|
-
doc.fontSize(9).font("Helvetica-Bold").fillColor(COLORS.white);
|
|
969
|
-
doc.text("Business priority", tableX + 5, headerY + 5, { width: colWidths.severity });
|
|
970
|
-
doc.text("Title", tableX + colWidths.severity + 5, headerY + 5, { width: colWidths.title });
|
|
971
|
-
doc.text("Category", tableX + colWidths.severity + colWidths.title + 5, headerY + 5, { width: colWidths.category });
|
|
972
|
-
doc.text("Status", tableX + colWidths.severity + colWidths.title + colWidths.category + 5, headerY + 5, { width: colWidths.status });
|
|
973
|
-
doc.y = headerY + 22;
|
|
974
|
-
const sorted = [...report.findings].sort(compareFindingsByBusinessPriority);
|
|
975
|
-
for (let i = 0; i < sorted.length; i++) {
|
|
976
|
-
const finding = sorted[i];
|
|
977
|
-
const rowY = doc.y;
|
|
978
|
-
if (rowY > 720) {
|
|
979
|
-
doc.addPage();
|
|
980
|
-
doc.y = PAGE_MARGIN;
|
|
981
|
-
}
|
|
982
|
-
if (i % 2 === 0) {
|
|
983
|
-
doc.rect(tableX, rowY, CONTENT_WIDTH, 18).fill(COLORS.background);
|
|
984
|
-
}
|
|
985
|
-
doc.fontSize(8).font("Helvetica");
|
|
986
|
-
doc.fillColor(COLORS.text).font("Helvetica-Bold").text(getFindingPriority(finding).label, tableX + 5, rowY + 5, { width: colWidths.severity });
|
|
987
|
-
doc.fillColor(COLORS.text).font("Helvetica").text(truncate(finding.title, 45), tableX + colWidths.severity + 5, rowY + 5, { width: colWidths.title });
|
|
988
|
-
doc.text(finding.category, tableX + colWidths.severity + colWidths.title + 5, rowY + 5, { width: colWidths.category });
|
|
989
|
-
doc.text(finding.status, tableX + colWidths.severity + colWidths.title + colWidths.category + 5, rowY + 5, { width: colWidths.status });
|
|
990
|
-
doc.y = rowY + 20;
|
|
991
|
-
}
|
|
992
|
-
}
|
|
993
|
-
function renderFindingDetails(doc, report) {
|
|
994
|
-
if (report.findings.length === 0)
|
|
995
|
-
return;
|
|
996
|
-
const sorted = [...report.findings].sort(compareFindingsByBusinessPriority);
|
|
997
|
-
for (const finding of sorted) {
|
|
998
|
-
doc.addPage();
|
|
999
|
-
sectionTitle(doc, finding.title);
|
|
1000
|
-
const priority = getFindingPriority(finding);
|
|
1001
|
-
doc.fontSize(11).font("Helvetica-Bold").fillColor(COLORS.text).text(`Business priority: ${priority.label}`);
|
|
1002
|
-
doc.fontSize(10).font("Helvetica").text(`Business impact rationale: ${priority.rationale}`, { width: CONTENT_WIDTH });
|
|
1003
|
-
doc.moveDown(0.5);
|
|
1004
|
-
doc.fontSize(10).font("Helvetica-Bold").fillColor(COLORS.severity[finding.severity]).text(`Technical severity: ${severityLabel(finding.severity)}`, PAGE_MARGIN, doc.y, { continued: true }).fillColor(COLORS.textLight).font("Helvetica").text(` | ${finding.category} | ${finding.status} | ID: ${finding.id}`);
|
|
1005
|
-
if (finding.cvssScore != null || finding.cvssVector) {
|
|
1006
|
-
doc.fontSize(9).fillColor(COLORS.text).text(`CVSS Score: ${finding.cvssScore ?? "Not provided"}${finding.cvssVector ? ` (${finding.cvssVector})` : ""}`, PAGE_MARGIN, doc.y + 2);
|
|
1007
|
-
}
|
|
1008
|
-
doc.moveDown(1);
|
|
1009
|
-
subSectionTitle(doc, "Description");
|
|
1010
|
-
doc.fontSize(10).font("Helvetica").fillColor(COLORS.text).text(finding.description, PAGE_MARGIN, doc.y, { width: CONTENT_WIDTH });
|
|
1011
|
-
if (finding.evidence.request) {
|
|
1012
|
-
doc.moveDown(1);
|
|
1013
|
-
subSectionTitle(doc, "Request");
|
|
1014
|
-
codeBlock(doc, finding.evidence.request);
|
|
1015
|
-
}
|
|
1016
|
-
if (finding.evidence.response) {
|
|
1017
|
-
doc.moveDown(0.5);
|
|
1018
|
-
subSectionTitle(doc, "Response");
|
|
1019
|
-
codeBlock(doc, finding.evidence.response);
|
|
1020
|
-
}
|
|
1021
|
-
if (finding.evidence.analysis) {
|
|
1022
|
-
doc.moveDown(0.5);
|
|
1023
|
-
subSectionTitle(doc, "Analysis & Remediation");
|
|
1024
|
-
doc.fontSize(10).font("Helvetica").fillColor(COLORS.text).text(finding.evidence.analysis, PAGE_MARGIN, doc.y, { width: CONTENT_WIDTH });
|
|
1025
|
-
}
|
|
1026
|
-
}
|
|
1027
|
-
}
|
|
1028
|
-
function renderReviewChecks(doc, report) {
|
|
1029
|
-
if (!report.reviewChecks?.length)
|
|
1030
|
-
return;
|
|
1031
|
-
doc.addPage();
|
|
1032
|
-
sectionTitle(doc, "Review Checks (Advisory)");
|
|
1033
|
-
for (const check of report.reviewChecks) {
|
|
1034
|
-
if (doc.y > doc.page.height - PAGE_MARGIN - 80)
|
|
1035
|
-
doc.addPage();
|
|
1036
|
-
subSectionTitle(doc, `${check.status.toUpperCase()}: ${check.name}`);
|
|
1037
|
-
doc.fontSize(10).font("Helvetica").fillColor(COLORS.text).text(`ID: ${check.id}`, PAGE_MARGIN, doc.y, { width: CONTENT_WIDTH }).text(`Reason: ${check.reason}`, { width: CONTENT_WIDTH });
|
|
1038
|
-
if (check.fix)
|
|
1039
|
-
doc.text(`Suggested fix: ${check.fix}`, { width: CONTENT_WIDTH });
|
|
1040
|
-
doc.moveDown(1);
|
|
1041
|
-
}
|
|
1042
|
-
}
|
|
1043
|
-
function renderMethodology(doc, report) {
|
|
1044
|
-
doc.addPage();
|
|
1045
|
-
sectionTitle(doc, "Methodology");
|
|
1046
|
-
doc.fontSize(10).font("Helvetica").fillColor(COLORS.text).text("This report was generated by 0, a fully autonomous agentic pentesting framework. The tool uses AI-driven attack generation and multi-agent consensus verification to identify security vulnerabilities.", PAGE_MARGIN, doc.y + 10, { width: CONTENT_WIDTH });
|
|
1047
|
-
doc.moveDown(1);
|
|
1048
|
-
subSectionTitle(doc, "Scan Parameters");
|
|
1049
|
-
const params = [
|
|
1050
|
-
["Target", report.target],
|
|
1051
|
-
["Scan Depth", report.scanDepth],
|
|
1052
|
-
["Started", formatDate(report.startedAt)],
|
|
1053
|
-
["Completed", formatDate(report.completedAt)],
|
|
1054
|
-
["Duration", formatDuration2(report.durationMs)],
|
|
1055
|
-
["Total Attacks", String(report.summary.totalAttacks)],
|
|
1056
|
-
["Total Findings", String(report.summary.totalFindings)]
|
|
1057
|
-
];
|
|
1058
|
-
for (const [label, value] of params) {
|
|
1059
|
-
doc.fontSize(10).font("Helvetica-Bold").fillColor(COLORS.text).text(`${label}: `, PAGE_MARGIN, doc.y, { continued: true }).font("Helvetica").text(value);
|
|
1060
|
-
doc.moveDown(0.2);
|
|
1061
|
-
}
|
|
1062
|
-
doc.moveDown(1);
|
|
1063
|
-
subSectionTitle(doc, "Severity Definitions");
|
|
1064
|
-
const sevDefs = [
|
|
1065
|
-
["Critical", "Immediate exploitation possible with severe business impact. Requires urgent remediation."],
|
|
1066
|
-
["High", "Easily exploitable vulnerability with significant impact. Should be fixed in the next release cycle."],
|
|
1067
|
-
["Medium", "Exploitable with some prerequisites. Should be addressed in planned maintenance."],
|
|
1068
|
-
["Low", "Minor issue with limited impact. Fix as part of regular development."],
|
|
1069
|
-
["Info", "Informational finding or best-practice recommendation. No immediate risk."]
|
|
1070
|
-
];
|
|
1071
|
-
for (const [sev, desc] of sevDefs) {
|
|
1072
|
-
doc.fontSize(10).font("Helvetica-Bold").fillColor(COLORS.text).text(`${sev}: `, PAGE_MARGIN, doc.y, { continued: true }).font("Helvetica").fillColor(COLORS.textLight).text(desc, { width: CONTENT_WIDTH - 60 });
|
|
1073
|
-
doc.moveDown(0.3);
|
|
1074
|
-
}
|
|
1075
|
-
doc.moveDown(1);
|
|
1076
|
-
subSectionTitle(doc, "Disclaimer");
|
|
1077
|
-
doc.fontSize(9).font("Helvetica").fillColor(COLORS.textLight).text("This automated scan provides a point-in-time assessment. It may not identify all vulnerabilities. Results should be validated by security professionals. The findings do not guarantee the absence of other security issues. This report is confidential and intended for authorized recipients only.", PAGE_MARGIN, doc.y, { width: CONTENT_WIDTH });
|
|
1078
|
-
}
|
|
1079
|
-
function sectionTitle(doc, title) {
|
|
1080
|
-
doc.fontSize(20).font("Helvetica-Bold").fillColor(COLORS.primary).text(title, PAGE_MARGIN, PAGE_MARGIN);
|
|
1081
|
-
doc.moveTo(PAGE_MARGIN, doc.y + 4).lineTo(PAGE_MARGIN + CONTENT_WIDTH, doc.y + 4).strokeColor(COLORS.accent).lineWidth(1.5).stroke();
|
|
1082
|
-
doc.y += 12;
|
|
1083
|
-
}
|
|
1084
|
-
function subSectionTitle(doc, title) {
|
|
1085
|
-
doc.fontSize(12).font("Helvetica-Bold").fillColor(COLORS.primary).text(title, PAGE_MARGIN, doc.y);
|
|
1086
|
-
doc.moveDown(0.3);
|
|
1087
|
-
}
|
|
1088
|
-
function codeBlock(doc, text) {
|
|
1089
|
-
const maxChars = 2e3;
|
|
1090
|
-
const displayText = truncate(text, maxChars);
|
|
1091
|
-
doc.font("Courier").fontSize(8);
|
|
1092
|
-
const textHeight = doc.heightOfString(displayText, {
|
|
1093
|
-
width: CONTENT_WIDTH - 20
|
|
1094
|
-
});
|
|
1095
|
-
const blockHeight = Math.min(textHeight + 16, 300);
|
|
1096
|
-
if (doc.y + blockHeight > 740) {
|
|
1097
|
-
doc.addPage();
|
|
1098
|
-
}
|
|
1099
|
-
const blockY = doc.y;
|
|
1100
|
-
doc.rect(PAGE_MARGIN, blockY, CONTENT_WIDTH, blockHeight).fill("#f1f3f5");
|
|
1101
|
-
doc.fontSize(8).font("Courier").fillColor(COLORS.text).text(displayText, PAGE_MARGIN + 10, blockY + 8, {
|
|
1102
|
-
width: CONTENT_WIDTH - 20,
|
|
1103
|
-
height: blockHeight - 16,
|
|
1104
|
-
ellipsis: true
|
|
1105
|
-
});
|
|
1106
|
-
doc.y = blockY + blockHeight + 4;
|
|
1107
|
-
}
|
|
1108
|
-
function renderFooters(doc) {
|
|
1109
|
-
const pageCount = doc.bufferedPageRange().count;
|
|
1110
|
-
for (let i = 0; i < pageCount; i++) {
|
|
1111
|
-
doc.switchToPage(i);
|
|
1112
|
-
if (i === 0)
|
|
1113
|
-
continue;
|
|
1114
|
-
doc.fontSize(8).font("Helvetica").fillColor(COLORS.textLight).text(`0 Pentest Report | Page ${i + 1} of ${pageCount} | CONFIDENTIAL`, PAGE_MARGIN, 760, { width: CONTENT_WIDTH, align: "center" });
|
|
1115
|
-
}
|
|
1116
|
-
}
|
|
1117
|
-
|
|
1118
|
-
export {
|
|
1119
|
-
formatMarkdown,
|
|
1120
|
-
formatHtml,
|
|
1121
|
-
formatSarif,
|
|
1122
|
-
generatePdfReport
|
|
1123
|
-
};
|