@keystrokehq/platform 0.0.0-staging-20260714181321
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/LICENSE +13 -0
- package/README.md +63 -0
- package/dist/alias-RTYYYW3D-CGfkaHCa.mjs +97 -0
- package/dist/alias-RTYYYW3D-CGfkaHCa.mjs.map +1 -0
- package/dist/alias-RTYYYW3D-eAP6l98p.cjs +98 -0
- package/dist/alias-RTYYYW3D-eAP6l98p.cjs.map +1 -0
- package/dist/awk2-LA3USKJP-pKmGobcZ.cjs +2732 -0
- package/dist/awk2-LA3USKJP-pKmGobcZ.cjs.map +1 -0
- package/dist/awk2-LA3USKJP-pnoNftT8.mjs +2732 -0
- package/dist/awk2-LA3USKJP-pnoNftT8.mjs.map +1 -0
- package/dist/base64-C2AIWVNC-CrtpD1na.cjs +122 -0
- package/dist/base64-C2AIWVNC-CrtpD1na.cjs.map +1 -0
- package/dist/base64-C2AIWVNC-CyAyrmOE.mjs +122 -0
- package/dist/base64-C2AIWVNC-CyAyrmOE.mjs.map +1 -0
- package/dist/basename-UB3CIYNI--0bze3Ml.cjs +52 -0
- package/dist/basename-UB3CIYNI--0bze3Ml.cjs.map +1 -0
- package/dist/basename-UB3CIYNI-DUyGGC_4.mjs +52 -0
- package/dist/basename-UB3CIYNI-DUyGGC_4.mjs.map +1 -0
- package/dist/bash-YZ33HQZQ-Bft3qmnm.mjs +116 -0
- package/dist/bash-YZ33HQZQ-Bft3qmnm.mjs.map +1 -0
- package/dist/bash-YZ33HQZQ-DLA5dK37.cjs +117 -0
- package/dist/bash-YZ33HQZQ-DLA5dK37.cjs.map +1 -0
- package/dist/cat-TSFMZVYS-BaKHr4U0.cjs +61 -0
- package/dist/cat-TSFMZVYS-BaKHr4U0.cjs.map +1 -0
- package/dist/cat-TSFMZVYS-CblTQ5QR.mjs +61 -0
- package/dist/cat-TSFMZVYS-CblTQ5QR.mjs.map +1 -0
- package/dist/chmod-TFEPA42X-Cmt6YbbQ.cjs +124 -0
- package/dist/chmod-TFEPA42X-Cmt6YbbQ.cjs.map +1 -0
- package/dist/chmod-TFEPA42X-DKe_HF9R.mjs +124 -0
- package/dist/chmod-TFEPA42X-DKe_HF9R.mjs.map +1 -0
- package/dist/chunk-27JIFWUR-C_jDOm1q.mjs +99 -0
- package/dist/chunk-27JIFWUR-C_jDOm1q.mjs.map +1 -0
- package/dist/chunk-27JIFWUR-CyXQ6J5p.cjs +115 -0
- package/dist/chunk-27JIFWUR-CyXQ6J5p.cjs.map +1 -0
- package/dist/chunk-4I3HOE5Z-BYotzP2w.mjs +718 -0
- package/dist/chunk-4I3HOE5Z-BYotzP2w.mjs.map +1 -0
- package/dist/chunk-4I3HOE5Z-CGJlGU0s.cjs +722 -0
- package/dist/chunk-4I3HOE5Z-CGJlGU0s.cjs.map +1 -0
- package/dist/chunk-4WKZNNJK-CuElmTiB.cjs +114 -0
- package/dist/chunk-4WKZNNJK-CuElmTiB.cjs.map +1 -0
- package/dist/chunk-4WKZNNJK-x25SBHbd.mjs +68 -0
- package/dist/chunk-4WKZNNJK-x25SBHbd.mjs.map +1 -0
- package/dist/chunk-5H5SCKJM-J5-RMqlK.cjs +611 -0
- package/dist/chunk-5H5SCKJM-J5-RMqlK.cjs.map +1 -0
- package/dist/chunk-5H5SCKJM-gg7VwICJ.mjs +601 -0
- package/dist/chunk-5H5SCKJM-gg7VwICJ.mjs.map +1 -0
- package/dist/chunk-AQ6FYS2X-BTQ2ZWeh.cjs +40 -0
- package/dist/chunk-AQ6FYS2X-BTQ2ZWeh.cjs.map +1 -0
- package/dist/chunk-AQ6FYS2X-CrZWHyzD.mjs +36 -0
- package/dist/chunk-AQ6FYS2X-CrZWHyzD.mjs.map +1 -0
- package/dist/chunk-BZUGFHVS-7RRM7Jpb.cjs +67 -0
- package/dist/chunk-BZUGFHVS-7RRM7Jpb.cjs.map +1 -0
- package/dist/chunk-BZUGFHVS-B2NchobP.mjs +33 -0
- package/dist/chunk-BZUGFHVS-B2NchobP.mjs.map +1 -0
- package/dist/chunk-CHFEPBH4-CINsrE8W.mjs +593 -0
- package/dist/chunk-CHFEPBH4-CINsrE8W.mjs.map +1 -0
- package/dist/chunk-CHFEPBH4-CPiu5G3a.cjs +609 -0
- package/dist/chunk-CHFEPBH4-CPiu5G3a.cjs.map +1 -0
- package/dist/chunk-EBAPSGAO-C93v3qzT.mjs +246 -0
- package/dist/chunk-EBAPSGAO-C93v3qzT.mjs.map +1 -0
- package/dist/chunk-EBAPSGAO-DZoiCbGH.cjs +250 -0
- package/dist/chunk-EBAPSGAO-DZoiCbGH.cjs.map +1 -0
- package/dist/chunk-LEKBROJD-BuX8Z517.mjs +3109 -0
- package/dist/chunk-LEKBROJD-BuX8Z517.mjs.map +1 -0
- package/dist/chunk-LEKBROJD-hm07oWvp.cjs +3119 -0
- package/dist/chunk-LEKBROJD-hm07oWvp.cjs.map +1 -0
- package/dist/chunk-QAYAQNCG-B1r1SmqS.mjs +62 -0
- package/dist/chunk-QAYAQNCG-B1r1SmqS.mjs.map +1 -0
- package/dist/chunk-QAYAQNCG-ROQh1hrZ.cjs +78 -0
- package/dist/chunk-QAYAQNCG-ROQh1hrZ.cjs.map +1 -0
- package/dist/chunk-QIQMJJZ4-Cm4e9-4O.cjs +96 -0
- package/dist/chunk-QIQMJJZ4-Cm4e9-4O.cjs.map +1 -0
- package/dist/chunk-QIQMJJZ4-Dn8UfvJ9.mjs +92 -0
- package/dist/chunk-QIQMJJZ4-Dn8UfvJ9.mjs.map +1 -0
- package/dist/chunk-SO6R3ZKN-DIoHJ9o1.mjs +139 -0
- package/dist/chunk-SO6R3ZKN-DIoHJ9o1.mjs.map +1 -0
- package/dist/chunk-SO6R3ZKN-DYeOBPNJ.cjs +161 -0
- package/dist/chunk-SO6R3ZKN-DYeOBPNJ.cjs.map +1 -0
- package/dist/chunk-SX2HC7SO-BrE3qB0x.mjs +19 -0
- package/dist/chunk-SX2HC7SO-BrE3qB0x.mjs.map +1 -0
- package/dist/chunk-SX2HC7SO-CN1P7tXw.cjs +23 -0
- package/dist/chunk-SX2HC7SO-CN1P7tXw.cjs.map +1 -0
- package/dist/chunk-TDD4NFYE-CyVGcZCt.cjs +24 -0
- package/dist/chunk-TDD4NFYE-CyVGcZCt.cjs.map +1 -0
- package/dist/chunk-TDD4NFYE-Djy1ztDY.mjs +20 -0
- package/dist/chunk-TDD4NFYE-Djy1ztDY.mjs.map +1 -0
- package/dist/chunk-TN7HHBQW-B8PYcKz5.mjs +1136 -0
- package/dist/chunk-TN7HHBQW-B8PYcKz5.mjs.map +1 -0
- package/dist/chunk-TN7HHBQW-D_SK6w5n.cjs +1146 -0
- package/dist/chunk-TN7HHBQW-D_SK6w5n.cjs.map +1 -0
- package/dist/chunk-VPADYNBD-BwKY-5Xk.mjs +121 -0
- package/dist/chunk-VPADYNBD-BwKY-5Xk.mjs.map +1 -0
- package/dist/chunk-VPADYNBD-ZJpUxqq9.cjs +167 -0
- package/dist/chunk-VPADYNBD-ZJpUxqq9.cjs.map +1 -0
- package/dist/chunk-YCLFEX4T-BmQTDw1Y.cjs +86 -0
- package/dist/chunk-YCLFEX4T-BmQTDw1Y.cjs.map +1 -0
- package/dist/chunk-YCLFEX4T-DvGVdefs.mjs +76 -0
- package/dist/chunk-YCLFEX4T-DvGVdefs.mjs.map +1 -0
- package/dist/clear-HKGFEOF6-B9FqQA-D.cjs +27 -0
- package/dist/clear-HKGFEOF6-B9FqQA-D.cjs.map +1 -0
- package/dist/clear-HKGFEOF6-CVmdHYje.mjs +27 -0
- package/dist/clear-HKGFEOF6-CVmdHYje.mjs.map +1 -0
- package/dist/column-XT6UFXNQ-CEthufNl.mjs +142 -0
- package/dist/column-XT6UFXNQ-CEthufNl.mjs.map +1 -0
- package/dist/column-XT6UFXNQ-tddqJ9Kg.cjs +142 -0
- package/dist/column-XT6UFXNQ-tddqJ9Kg.cjs.map +1 -0
- package/dist/comm-VV2LDX2J-BpdAYzr_.mjs +86 -0
- package/dist/comm-VV2LDX2J-BpdAYzr_.mjs.map +1 -0
- package/dist/comm-VV2LDX2J-D8M6JDGH.cjs +86 -0
- package/dist/comm-VV2LDX2J-D8M6JDGH.cjs.map +1 -0
- package/dist/config-BO2sTtYA.d.mts +324 -0
- package/dist/config-DahIeWeM.d.cts +322 -0
- package/dist/config.cjs +16 -0
- package/dist/config.cjs.map +1 -0
- package/dist/config.d.cts +2 -0
- package/dist/config.d.mts +2 -0
- package/dist/config.mjs +15 -0
- package/dist/config.mjs.map +1 -0
- package/dist/cp-BISAAS7A-BO2reDJf.cjs +105 -0
- package/dist/cp-BISAAS7A-BO2reDJf.cjs.map +1 -0
- package/dist/cp-BISAAS7A-Bgk2QUcq.mjs +105 -0
- package/dist/cp-BISAAS7A-Bgk2QUcq.mjs.map +1 -0
- package/dist/cut-OKARJCCV-DPm1czVO.mjs +117 -0
- package/dist/cut-OKARJCCV-DPm1czVO.mjs.map +1 -0
- package/dist/cut-OKARJCCV-DaBpPPf8.cjs +117 -0
- package/dist/cut-OKARJCCV-DaBpPPf8.cjs.map +1 -0
- package/dist/date-UUUPW43J-DPhwuguC.cjs +187 -0
- package/dist/date-UUUPW43J-DPhwuguC.cjs.map +1 -0
- package/dist/date-UUUPW43J-_wNZ6va_.mjs +187 -0
- package/dist/date-UUUPW43J-_wNZ6va_.mjs.map +1 -0
- package/dist/diff-MWJFIG7X-DZWE4by5.mjs +754 -0
- package/dist/diff-MWJFIG7X-DZWE4by5.mjs.map +1 -0
- package/dist/diff-MWJFIG7X-sW58v-In.cjs +754 -0
- package/dist/diff-MWJFIG7X-sW58v-In.cjs.map +1 -0
- package/dist/dirname-MPHRFUTI-B9pAFfgt.cjs +42 -0
- package/dist/dirname-MPHRFUTI-B9pAFfgt.cjs.map +1 -0
- package/dist/dirname-MPHRFUTI-BH9xdo7B.mjs +42 -0
- package/dist/dirname-MPHRFUTI-BH9xdo7B.mjs.map +1 -0
- package/dist/dist-B_VrBT_r.mjs +37377 -0
- package/dist/dist-B_VrBT_r.mjs.map +1 -0
- package/dist/dist-BdxWQmKK.mjs +8067 -0
- package/dist/dist-BdxWQmKK.mjs.map +1 -0
- package/dist/dist-DCAFVLts.cjs +38596 -0
- package/dist/dist-DCAFVLts.cjs.map +1 -0
- package/dist/dist-QIg3f1DP.cjs +8132 -0
- package/dist/dist-QIg3f1DP.cjs.map +1 -0
- package/dist/du-572XNP42-CRWdTyWl.mjs +175 -0
- package/dist/du-572XNP42-CRWdTyWl.mjs.map +1 -0
- package/dist/du-572XNP42-CqHbkS7A.cjs +175 -0
- package/dist/du-572XNP42-CqHbkS7A.cjs.map +1 -0
- package/dist/echo-NDWZZHPO-BUogPcJ_.mjs +136 -0
- package/dist/echo-NDWZZHPO-BUogPcJ_.mjs.map +1 -0
- package/dist/echo-NDWZZHPO-Cv_eCCli.cjs +136 -0
- package/dist/echo-NDWZZHPO-Cv_eCCli.cjs.map +1 -0
- package/dist/env-36M5BO7M-B3hY6c1d.mjs +117 -0
- package/dist/env-36M5BO7M-B3hY6c1d.mjs.map +1 -0
- package/dist/env-36M5BO7M-BJX6pRHi.cjs +118 -0
- package/dist/env-36M5BO7M-BJX6pRHi.cjs.map +1 -0
- package/dist/expand-JSPG6VOP-C4ZcygSl.mjs +144 -0
- package/dist/expand-JSPG6VOP-C4ZcygSl.mjs.map +1 -0
- package/dist/expand-JSPG6VOP-Dd-2L8yn.cjs +144 -0
- package/dist/expand-JSPG6VOP-Dd-2L8yn.cjs.map +1 -0
- package/dist/expr-5JAACS4X-Cxs0wDb3.mjs +151 -0
- package/dist/expr-5JAACS4X-Cxs0wDb3.mjs.map +1 -0
- package/dist/expr-5JAACS4X-DmKCLgI8.cjs +151 -0
- package/dist/expr-5JAACS4X-DmKCLgI8.cjs.map +1 -0
- package/dist/file-IPZJC3FQ-DeyikL2y.mjs +4200 -0
- package/dist/file-IPZJC3FQ-DeyikL2y.mjs.map +1 -0
- package/dist/file-IPZJC3FQ-M9Q0fqTe.cjs +4200 -0
- package/dist/file-IPZJC3FQ-M9Q0fqTe.cjs.map +1 -0
- package/dist/find-INTH3OLC-BR7ZZKkF.mjs +1330 -0
- package/dist/find-INTH3OLC-BR7ZZKkF.mjs.map +1 -0
- package/dist/find-INTH3OLC-C2Uc7scj.cjs +1330 -0
- package/dist/find-INTH3OLC-C2Uc7scj.cjs.map +1 -0
- package/dist/fold-4TQNYMSW-BQ9ukqex.cjs +137 -0
- package/dist/fold-4TQNYMSW-BQ9ukqex.cjs.map +1 -0
- package/dist/fold-4TQNYMSW-DsDovqTl.mjs +137 -0
- package/dist/fold-4TQNYMSW-DsDovqTl.mjs.map +1 -0
- package/dist/grep-V3LQVMRQ-BsgT3xzo.mjs +333 -0
- package/dist/grep-V3LQVMRQ-BsgT3xzo.mjs.map +1 -0
- package/dist/grep-V3LQVMRQ-ChT5D1RX.cjs +335 -0
- package/dist/grep-V3LQVMRQ-ChT5D1RX.cjs.map +1 -0
- package/dist/gzip-O5ASJAFY-ClxvbIo6.mjs +591 -0
- package/dist/gzip-O5ASJAFY-ClxvbIo6.mjs.map +1 -0
- package/dist/gzip-O5ASJAFY-DJOwjcpB.cjs +593 -0
- package/dist/gzip-O5ASJAFY-DJOwjcpB.cjs.map +1 -0
- package/dist/head-442HYESI-B1LlP95a.mjs +35 -0
- package/dist/head-442HYESI-B1LlP95a.mjs.map +1 -0
- package/dist/head-442HYESI-CL9VIqkb.cjs +35 -0
- package/dist/head-442HYESI-CL9VIqkb.cjs.map +1 -0
- package/dist/help-HZ6M2CKN-BjVXFW-f.mjs +122 -0
- package/dist/help-HZ6M2CKN-BjVXFW-f.mjs.map +1 -0
- package/dist/help-HZ6M2CKN-CzUrqQB7.cjs +122 -0
- package/dist/help-HZ6M2CKN-CzUrqQB7.cjs.map +1 -0
- package/dist/history-WYYKSLSZ-6NEj5e3f.mjs +47 -0
- package/dist/history-WYYKSLSZ-6NEj5e3f.mjs.map +1 -0
- package/dist/history-WYYKSLSZ-DfPcvaAY.cjs +47 -0
- package/dist/history-WYYKSLSZ-DfPcvaAY.cjs.map +1 -0
- package/dist/hostname-C4HQXXUP-B86my_ii.mjs +23 -0
- package/dist/hostname-C4HQXXUP-B86my_ii.mjs.map +1 -0
- package/dist/hostname-C4HQXXUP-CC1LpY9-.cjs +23 -0
- package/dist/hostname-C4HQXXUP-CC1LpY9-.cjs.map +1 -0
- package/dist/html-to-markdown-JW4MSQZO-BKOSSsyy.mjs +15889 -0
- package/dist/html-to-markdown-JW4MSQZO-BKOSSsyy.mjs.map +1 -0
- package/dist/html-to-markdown-JW4MSQZO-TyAsgBnO.cjs +15892 -0
- package/dist/html-to-markdown-JW4MSQZO-TyAsgBnO.cjs.map +1 -0
- package/dist/internal.cjs +5 -0
- package/dist/internal.d.cts +22 -0
- package/dist/internal.d.mts +22 -0
- package/dist/internal.mjs +2 -0
- package/dist/join-TBRGI3LQ-CwgUaVoR.mjs +197 -0
- package/dist/join-TBRGI3LQ-CwgUaVoR.mjs.map +1 -0
- package/dist/join-TBRGI3LQ-JKyApOii.cjs +197 -0
- package/dist/join-TBRGI3LQ-JKyApOii.cjs.map +1 -0
- package/dist/jq-4XLYLOS5-D6TJiRje.cjs +250 -0
- package/dist/jq-4XLYLOS5-D6TJiRje.cjs.map +1 -0
- package/dist/jq-4XLYLOS5-ZisFFv1P.mjs +250 -0
- package/dist/jq-4XLYLOS5-ZisFFv1P.mjs.map +1 -0
- package/dist/js-exec-N5KEZBH7-BDEPJLK5.cjs +326 -0
- package/dist/js-exec-N5KEZBH7-BDEPJLK5.cjs.map +1 -0
- package/dist/js-exec-N5KEZBH7-Dp6FRM8y.mjs +325 -0
- package/dist/js-exec-N5KEZBH7-Dp6FRM8y.mjs.map +1 -0
- package/dist/lib-Cecx0Mdv.cjs +47 -0
- package/dist/lib-Cecx0Mdv.cjs.map +1 -0
- package/dist/lib-Dsemc_Ik.mjs +44 -0
- package/dist/lib-Dsemc_Ik.mjs.map +1 -0
- package/dist/llm-proxy.cjs +32 -0
- package/dist/llm-proxy.d.cts +2 -0
- package/dist/llm-proxy.d.mts +2 -0
- package/dist/llm-proxy.mjs +2 -0
- package/dist/ln-4LGSXXGD-DCt-08KM.cjs +100 -0
- package/dist/ln-4LGSXXGD-DCt-08KM.cjs.map +1 -0
- package/dist/ln-4LGSXXGD-DbVtAqnH.mjs +100 -0
- package/dist/ln-4LGSXXGD-DbVtAqnH.mjs.map +1 -0
- package/dist/ls-ZJGQER7M-BQuAedIy.cjs +1890 -0
- package/dist/ls-ZJGQER7M-BQuAedIy.cjs.map +1 -0
- package/dist/ls-ZJGQER7M-PRXSwGZZ.mjs +1890 -0
- package/dist/ls-ZJGQER7M-PRXSwGZZ.mjs.map +1 -0
- package/dist/lzma-BE4gwH-8.cjs +1204 -0
- package/dist/lzma-BE4gwH-8.cjs.map +1 -0
- package/dist/lzma-CmLEdvxC.mjs +1134 -0
- package/dist/lzma-CmLEdvxC.mjs.map +1 -0
- package/dist/md5sum-SPU24VSG-CmmvMGPa.mjs +15 -0
- package/dist/md5sum-SPU24VSG-CmmvMGPa.mjs.map +1 -0
- package/dist/md5sum-SPU24VSG-xbLQd_LU.cjs +15 -0
- package/dist/md5sum-SPU24VSG-xbLQd_LU.cjs.map +1 -0
- package/dist/mkdir-MEPGZOB6-DB938M04.mjs +56 -0
- package/dist/mkdir-MEPGZOB6-DB938M04.mjs.map +1 -0
- package/dist/mkdir-MEPGZOB6-IHvBvQTL.cjs +56 -0
- package/dist/mkdir-MEPGZOB6-IHvBvQTL.cjs.map +1 -0
- package/dist/mv-W5BIQ646-B2XVmdN4.mjs +92 -0
- package/dist/mv-W5BIQ646-B2XVmdN4.mjs.map +1 -0
- package/dist/mv-W5BIQ646-CFwaJ3Xx.cjs +92 -0
- package/dist/mv-W5BIQ646-CFwaJ3Xx.cjs.map +1 -0
- package/dist/nl-WSDW7I4O-CRYsCXB7.mjs +207 -0
- package/dist/nl-WSDW7I4O-CRYsCXB7.mjs.map +1 -0
- package/dist/nl-WSDW7I4O-FzZXRAwD.cjs +207 -0
- package/dist/nl-WSDW7I4O-FzZXRAwD.cjs.map +1 -0
- package/dist/od-WOKFDJTP-DVBJw76D.mjs +72 -0
- package/dist/od-WOKFDJTP-DVBJw76D.mjs.map +1 -0
- package/dist/od-WOKFDJTP-M80nAztL.cjs +72 -0
- package/dist/od-WOKFDJTP-M80nAztL.cjs.map +1 -0
- package/dist/paste-7JC6S4DX-DOPeey0W.cjs +112 -0
- package/dist/paste-7JC6S4DX-DOPeey0W.cjs.map +1 -0
- package/dist/paste-7JC6S4DX-q6d7adhi.mjs +112 -0
- package/dist/paste-7JC6S4DX-q6d7adhi.mjs.map +1 -0
- package/dist/platform-database.cjs +98 -0
- package/dist/platform-database.d.cts +2 -0
- package/dist/platform-database.d.mts +2 -0
- package/dist/platform-database.mjs +2 -0
- package/dist/printf-TWGXF445-BOz88v_H.mjs +878 -0
- package/dist/printf-TWGXF445-BOz88v_H.mjs.map +1 -0
- package/dist/printf-TWGXF445-BXve-Eiv.cjs +878 -0
- package/dist/printf-TWGXF445-BXve-Eiv.cjs.map +1 -0
- package/dist/pwd-WE6EN5AV-CbA4e7ec.mjs +33 -0
- package/dist/pwd-WE6EN5AV-CbA4e7ec.mjs.map +1 -0
- package/dist/pwd-WE6EN5AV-DfqwHtSS.cjs +33 -0
- package/dist/pwd-WE6EN5AV-DfqwHtSS.cjs.map +1 -0
- package/dist/python3-POMOR4OA-DRta50Gp.mjs +290 -0
- package/dist/python3-POMOR4OA-DRta50Gp.mjs.map +1 -0
- package/dist/python3-POMOR4OA-__fmhnV2.cjs +291 -0
- package/dist/python3-POMOR4OA-__fmhnV2.cjs.map +1 -0
- package/dist/readlink-OPJF4DL5-C7a7cTci.cjs +75 -0
- package/dist/readlink-OPJF4DL5-C7a7cTci.cjs.map +1 -0
- package/dist/readlink-OPJF4DL5-Zf7h1M1z.mjs +75 -0
- package/dist/readlink-OPJF4DL5-Zf7h1M1z.mjs.map +1 -0
- package/dist/rev-5EHFX4EJ-CFFAX-eL.cjs +65 -0
- package/dist/rev-5EHFX4EJ-CFFAX-eL.cjs.map +1 -0
- package/dist/rev-5EHFX4EJ-DP28Z2tI.mjs +65 -0
- package/dist/rev-5EHFX4EJ-DP28Z2tI.mjs.map +1 -0
- package/dist/rg-S4FXYXWB-Bawo1fot.mjs +1536 -0
- package/dist/rg-S4FXYXWB-Bawo1fot.mjs.map +1 -0
- package/dist/rg-S4FXYXWB-DrdwsBhO.cjs +1536 -0
- package/dist/rg-S4FXYXWB-DrdwsBhO.cjs.map +1 -0
- package/dist/rm-SSGETQVQ-BaWdfV2i.cjs +79 -0
- package/dist/rm-SSGETQVQ-BaWdfV2i.cjs.map +1 -0
- package/dist/rm-SSGETQVQ-C6EQ5XnR.mjs +79 -0
- package/dist/rm-SSGETQVQ-C6EQ5XnR.mjs.map +1 -0
- package/dist/rmdir-OC4ZLPYA-COg4QKnN.mjs +131 -0
- package/dist/rmdir-OC4ZLPYA-COg4QKnN.mjs.map +1 -0
- package/dist/rmdir-OC4ZLPYA-DK3A8POR.cjs +131 -0
- package/dist/rmdir-OC4ZLPYA-DK3A8POR.cjs.map +1 -0
- package/dist/run.cjs +13 -0
- package/dist/run.cjs.map +1 -0
- package/dist/run.d.cts +1 -0
- package/dist/run.d.mts +1 -0
- package/dist/run.mjs +14 -0
- package/dist/run.mjs.map +1 -0
- package/dist/sed-S5UIK574-CQ1AnR3r.cjs +1717 -0
- package/dist/sed-S5UIK574-CQ1AnR3r.cjs.map +1 -0
- package/dist/sed-S5UIK574-P4wu0pe1.mjs +1717 -0
- package/dist/sed-S5UIK574-P4wu0pe1.mjs.map +1 -0
- package/dist/seq-M5EC7Q57-BlpnRLkX.mjs +84 -0
- package/dist/seq-M5EC7Q57-BlpnRLkX.mjs.map +1 -0
- package/dist/seq-M5EC7Q57-CObcFJ6w.cjs +84 -0
- package/dist/seq-M5EC7Q57-CObcFJ6w.cjs.map +1 -0
- package/dist/sha1sum-2PTOAFR6-BPLIR6an.cjs +15 -0
- package/dist/sha1sum-2PTOAFR6-BPLIR6an.cjs.map +1 -0
- package/dist/sha1sum-2PTOAFR6-jNQ-uyUw.mjs +15 -0
- package/dist/sha1sum-2PTOAFR6-jNQ-uyUw.mjs.map +1 -0
- package/dist/sha256sum-NS7D3IXX-Bvq-KnSV.cjs +15 -0
- package/dist/sha256sum-NS7D3IXX-Bvq-KnSV.cjs.map +1 -0
- package/dist/sha256sum-NS7D3IXX-DebIy64D.mjs +15 -0
- package/dist/sha256sum-NS7D3IXX-DebIy64D.mjs.map +1 -0
- package/dist/sleep-X22JJINO-BZNoBeaB.mjs +66 -0
- package/dist/sleep-X22JJINO-BZNoBeaB.mjs.map +1 -0
- package/dist/sleep-X22JJINO-DP1z72-Q.cjs +66 -0
- package/dist/sleep-X22JJINO-DP1z72-Q.cjs.map +1 -0
- package/dist/sort-SW2YEO5B-BWZaGhuw.cjs +318 -0
- package/dist/sort-SW2YEO5B-BWZaGhuw.cjs.map +1 -0
- package/dist/sort-SW2YEO5B-DewIJ9_h.mjs +318 -0
- package/dist/sort-SW2YEO5B-DewIJ9_h.mjs.map +1 -0
- package/dist/split-4KKZZXXE-Bhr_rhRz.cjs +247 -0
- package/dist/split-4KKZZXXE-Bhr_rhRz.cjs.map +1 -0
- package/dist/split-4KKZZXXE-ciJXyT15.mjs +247 -0
- package/dist/split-4KKZZXXE-ciJXyT15.mjs.map +1 -0
- package/dist/sqlite3-CGOEFJAO-CdyK5NF3.cjs +2877 -0
- package/dist/sqlite3-CGOEFJAO-CdyK5NF3.cjs.map +1 -0
- package/dist/sqlite3-CGOEFJAO-K8u_Ru5X.mjs +2875 -0
- package/dist/sqlite3-CGOEFJAO-K8u_Ru5X.mjs.map +1 -0
- package/dist/start-DCnxLHI5.mjs +30918 -0
- package/dist/start-DCnxLHI5.mjs.map +1 -0
- package/dist/start-y3y8zgSv.cjs +31051 -0
- package/dist/start-y3y8zgSv.cjs.map +1 -0
- package/dist/start.cjs +3 -0
- package/dist/start.d.cts +28 -0
- package/dist/start.d.mts +28 -0
- package/dist/start.mjs +2 -0
- package/dist/stat-CD34IZ4P-BL8u_Aqm.mjs +64 -0
- package/dist/stat-CD34IZ4P-BL8u_Aqm.mjs.map +1 -0
- package/dist/stat-CD34IZ4P-BSu3fjXb.cjs +64 -0
- package/dist/stat-CD34IZ4P-BSu3fjXb.cjs.map +1 -0
- package/dist/strings-6WDHLGMX-Xt8Gbe8-.cjs +178 -0
- package/dist/strings-6WDHLGMX-Xt8Gbe8-.cjs.map +1 -0
- package/dist/strings-6WDHLGMX-lZect78u.mjs +178 -0
- package/dist/strings-6WDHLGMX-lZect78u.mjs.map +1 -0
- package/dist/tac-2STMMJYW-6DSfXKEM.cjs +52 -0
- package/dist/tac-2STMMJYW-6DSfXKEM.cjs.map +1 -0
- package/dist/tac-2STMMJYW-CYopDu0z.mjs +52 -0
- package/dist/tac-2STMMJYW-CYopDu0z.mjs.map +1 -0
- package/dist/tail-R4PCA2C4-05tRE3pO.mjs +36 -0
- package/dist/tail-R4PCA2C4-05tRE3pO.mjs.map +1 -0
- package/dist/tail-R4PCA2C4-B8zVnbJv.cjs +36 -0
- package/dist/tail-R4PCA2C4-B8zVnbJv.cjs.map +1 -0
- package/dist/tar-STHHZTZ6-BF9uOAeY.cjs +2839 -0
- package/dist/tar-STHHZTZ6-BF9uOAeY.cjs.map +1 -0
- package/dist/tar-STHHZTZ6-BGc4fGMj.mjs +2836 -0
- package/dist/tar-STHHZTZ6-BGc4fGMj.mjs.map +1 -0
- package/dist/tee-YUZ2FKCJ-CZGSWOLF.mjs +45 -0
- package/dist/tee-YUZ2FKCJ-CZGSWOLF.mjs.map +1 -0
- package/dist/tee-YUZ2FKCJ-DXc_xwaw.cjs +45 -0
- package/dist/tee-YUZ2FKCJ-DXc_xwaw.cjs.map +1 -0
- package/dist/time-D4LNBSWX-C5yYBJS0.mjs +107 -0
- package/dist/time-D4LNBSWX-C5yYBJS0.mjs.map +1 -0
- package/dist/time-D4LNBSWX-CQI3pEaI.cjs +107 -0
- package/dist/time-D4LNBSWX-CQI3pEaI.cjs.map +1 -0
- package/dist/timeout-YDCRSLPQ-C57Y8ySP.cjs +110 -0
- package/dist/timeout-YDCRSLPQ-C57Y8ySP.cjs.map +1 -0
- package/dist/timeout-YDCRSLPQ-CsT6X_C0.mjs +110 -0
- package/dist/timeout-YDCRSLPQ-CsT6X_C0.mjs.map +1 -0
- package/dist/touch-UA33VN3N-Cyx5v5-2.cjs +103 -0
- package/dist/touch-UA33VN3N-Cyx5v5-2.cjs.map +1 -0
- package/dist/touch-UA33VN3N-DYslBCYn.mjs +103 -0
- package/dist/touch-UA33VN3N-DYslBCYn.mjs.map +1 -0
- package/dist/tr-36LHWFRQ-C57tK13M.mjs +165 -0
- package/dist/tr-36LHWFRQ-C57tK13M.mjs.map +1 -0
- package/dist/tr-36LHWFRQ-CJ7ZK1Cv.cjs +165 -0
- package/dist/tr-36LHWFRQ-CJ7ZK1Cv.cjs.map +1 -0
- package/dist/tree-YLD52CNT-C01jI2xZ.mjs +185 -0
- package/dist/tree-YLD52CNT-C01jI2xZ.mjs.map +1 -0
- package/dist/tree-YLD52CNT-C0new1hw.cjs +185 -0
- package/dist/tree-YLD52CNT-C0new1hw.cjs.map +1 -0
- package/dist/true-FHQXJXBE-CIHy9LuF.mjs +30 -0
- package/dist/true-FHQXJXBE-CIHy9LuF.mjs.map +1 -0
- package/dist/true-FHQXJXBE-CROnM_dr.cjs +31 -0
- package/dist/true-FHQXJXBE-CROnM_dr.cjs.map +1 -0
- package/dist/unexpand-CADSA4VO-DgiJnv3D.mjs +154 -0
- package/dist/unexpand-CADSA4VO-DgiJnv3D.mjs.map +1 -0
- package/dist/unexpand-CADSA4VO-KAVxaOsW.cjs +154 -0
- package/dist/unexpand-CADSA4VO-KAVxaOsW.cjs.map +1 -0
- package/dist/uniq-XSIZR6PB-C05c3Clm.mjs +90 -0
- package/dist/uniq-XSIZR6PB-C05c3Clm.mjs.map +1 -0
- package/dist/uniq-XSIZR6PB-a2hQnbkY.cjs +90 -0
- package/dist/uniq-XSIZR6PB-a2hQnbkY.cjs.map +1 -0
- package/dist/wc-LF7NU4LA-D_LGPXUP.mjs +109 -0
- package/dist/wc-LF7NU4LA-D_LGPXUP.mjs.map +1 -0
- package/dist/wc-LF7NU4LA-UNORxUJr.cjs +109 -0
- package/dist/wc-LF7NU4LA-UNORxUJr.cjs.map +1 -0
- package/dist/which-XEM24D5D-4seJsWKQ.cjs +61 -0
- package/dist/which-XEM24D5D-4seJsWKQ.cjs.map +1 -0
- package/dist/which-XEM24D5D-BmDHO2AT.mjs +61 -0
- package/dist/which-XEM24D5D-BmDHO2AT.mjs.map +1 -0
- package/dist/whoami-XMTX52VE-CA-yJTvn.cjs +23 -0
- package/dist/whoami-XMTX52VE-CA-yJTvn.cjs.map +1 -0
- package/dist/whoami-XMTX52VE-DW_4VMpE.mjs +23 -0
- package/dist/whoami-XMTX52VE-DW_4VMpE.mjs.map +1 -0
- package/dist/with-project-scope-7t3SHNwz.mjs +56 -0
- package/dist/with-project-scope-7t3SHNwz.mjs.map +1 -0
- package/dist/with-project-scope-Drmz2h2Z.cjs +79 -0
- package/dist/with-project-scope-Drmz2h2Z.cjs.map +1 -0
- package/dist/xan-Y6WF3IRG-B_ysBBaD.mjs +2826 -0
- package/dist/xan-Y6WF3IRG-B_ysBBaD.mjs.map +1 -0
- package/dist/xan-Y6WF3IRG-DvYlOlaJ.cjs +2826 -0
- package/dist/xan-Y6WF3IRG-DvYlOlaJ.cjs.map +1 -0
- package/dist/xan-view-HDVKHFC2-Bv8_W4eE.mjs +11 -0
- package/dist/xan-view-HDVKHFC2-Bv8_W4eE.mjs.map +1 -0
- package/dist/xan-view-HDVKHFC2-ClhOnUAS.cjs +10 -0
- package/dist/xan-view-HDVKHFC2-ClhOnUAS.cjs.map +1 -0
- package/dist/xargs-MGZPH7AX-BvvOKhXS.cjs +110 -0
- package/dist/xargs-MGZPH7AX-BvvOKhXS.cjs.map +1 -0
- package/dist/xargs-MGZPH7AX-la_JFVst.mjs +110 -0
- package/dist/xargs-MGZPH7AX-la_JFVst.mjs.map +1 -0
- package/dist/yq-4QJW3EQG-Bq2dt3bL.mjs +8604 -0
- package/dist/yq-4QJW3EQG-Bq2dt3bL.mjs.map +1 -0
- package/dist/yq-4QJW3EQG-WlQHm2uv.cjs +8604 -0
- package/dist/yq-4QJW3EQG-WlQHm2uv.cjs.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,1136 @@
|
|
|
1
|
+
import { t as m$1 } from "./chunk-BZUGFHVS-B2NchobP.mjs";
|
|
2
|
+
import { createRequire } from "node:module";
|
|
3
|
+
//#region ../../node_modules/.pnpm/just-bash@3.0.1/node_modules/just-bash/dist/bundle/chunks/chunk-TN7HHBQW.js
|
|
4
|
+
createRequire(import.meta.url);
|
|
5
|
+
function v() {
|
|
6
|
+
let a = [
|
|
7
|
+
{
|
|
8
|
+
prop: "Function",
|
|
9
|
+
target: globalThis,
|
|
10
|
+
violationType: "function_constructor",
|
|
11
|
+
strategy: "throw",
|
|
12
|
+
reason: "Function constructor allows arbitrary code execution"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
prop: "eval",
|
|
16
|
+
target: globalThis,
|
|
17
|
+
violationType: "eval",
|
|
18
|
+
strategy: "throw",
|
|
19
|
+
reason: "eval() allows arbitrary code execution"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
prop: "setTimeout",
|
|
23
|
+
target: globalThis,
|
|
24
|
+
violationType: "setTimeout",
|
|
25
|
+
strategy: "throw",
|
|
26
|
+
reason: "setTimeout with string argument allows code execution"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
prop: "setInterval",
|
|
30
|
+
target: globalThis,
|
|
31
|
+
violationType: "setInterval",
|
|
32
|
+
strategy: "throw",
|
|
33
|
+
reason: "setInterval with string argument allows code execution"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
prop: "setImmediate",
|
|
37
|
+
target: globalThis,
|
|
38
|
+
violationType: "setImmediate",
|
|
39
|
+
strategy: "throw",
|
|
40
|
+
reason: "setImmediate could be used to escape sandbox context"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
prop: "env",
|
|
44
|
+
target: process,
|
|
45
|
+
violationType: "process_env",
|
|
46
|
+
strategy: "throw",
|
|
47
|
+
reason: "process.env could leak sensitive environment variables",
|
|
48
|
+
allowedKeys: new Set([
|
|
49
|
+
"NODE_V8_COVERAGE",
|
|
50
|
+
"NODE_DEBUG",
|
|
51
|
+
"NODE_DEBUG_NATIVE",
|
|
52
|
+
"NODE_COMPILE_CACHE",
|
|
53
|
+
"WATCH_REPORT_DEPENDENCIES",
|
|
54
|
+
"FORCE_COLOR",
|
|
55
|
+
"DEBUG",
|
|
56
|
+
"UNDICI_NO_FG",
|
|
57
|
+
"JEST_WORKER_ID",
|
|
58
|
+
"__MINIMATCH_TESTING_PLATFORM__",
|
|
59
|
+
"LOG_TOKENS",
|
|
60
|
+
"LOG_STREAM"
|
|
61
|
+
])
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
prop: "binding",
|
|
65
|
+
target: process,
|
|
66
|
+
violationType: "process_binding",
|
|
67
|
+
strategy: "throw",
|
|
68
|
+
reason: "process.binding provides access to native Node.js modules"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
prop: "_linkedBinding",
|
|
72
|
+
target: process,
|
|
73
|
+
violationType: "process_binding",
|
|
74
|
+
strategy: "throw",
|
|
75
|
+
reason: "process._linkedBinding provides access to native Node.js modules"
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
prop: "dlopen",
|
|
79
|
+
target: process,
|
|
80
|
+
violationType: "process_dlopen",
|
|
81
|
+
strategy: "throw",
|
|
82
|
+
reason: "process.dlopen allows loading native addons"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
prop: "getBuiltinModule",
|
|
86
|
+
target: process,
|
|
87
|
+
violationType: "process_get_builtin_module",
|
|
88
|
+
strategy: "throw",
|
|
89
|
+
reason: "process.getBuiltinModule allows loading native Node.js modules (fs, child_process, vm)"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
prop: "exit",
|
|
93
|
+
target: process,
|
|
94
|
+
violationType: "process_exit",
|
|
95
|
+
strategy: "throw",
|
|
96
|
+
reason: "process.exit could terminate the interpreter"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
prop: "abort",
|
|
100
|
+
target: process,
|
|
101
|
+
violationType: "process_exit",
|
|
102
|
+
strategy: "throw",
|
|
103
|
+
reason: "process.abort could crash the interpreter"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
prop: "kill",
|
|
107
|
+
target: process,
|
|
108
|
+
violationType: "process_kill",
|
|
109
|
+
strategy: "throw",
|
|
110
|
+
reason: "process.kill could signal other processes"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
prop: "setuid",
|
|
114
|
+
target: process,
|
|
115
|
+
violationType: "process_setuid",
|
|
116
|
+
strategy: "throw",
|
|
117
|
+
reason: "process.setuid could escalate privileges"
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
prop: "setgid",
|
|
121
|
+
target: process,
|
|
122
|
+
violationType: "process_setuid",
|
|
123
|
+
strategy: "throw",
|
|
124
|
+
reason: "process.setgid could escalate privileges"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
prop: "seteuid",
|
|
128
|
+
target: process,
|
|
129
|
+
violationType: "process_setuid",
|
|
130
|
+
strategy: "throw",
|
|
131
|
+
reason: "process.seteuid could escalate effective user privileges"
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
prop: "setegid",
|
|
135
|
+
target: process,
|
|
136
|
+
violationType: "process_setuid",
|
|
137
|
+
strategy: "throw",
|
|
138
|
+
reason: "process.setegid could escalate effective group privileges"
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
prop: "initgroups",
|
|
142
|
+
target: process,
|
|
143
|
+
violationType: "process_setuid",
|
|
144
|
+
strategy: "throw",
|
|
145
|
+
reason: "process.initgroups could modify supplementary group IDs"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
prop: "setgroups",
|
|
149
|
+
target: process,
|
|
150
|
+
violationType: "process_setuid",
|
|
151
|
+
strategy: "throw",
|
|
152
|
+
reason: "process.setgroups could modify supplementary group IDs"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
prop: "umask",
|
|
156
|
+
target: process,
|
|
157
|
+
violationType: "process_umask",
|
|
158
|
+
strategy: "throw",
|
|
159
|
+
reason: "process.umask could modify file creation permissions"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
prop: "argv",
|
|
163
|
+
target: process,
|
|
164
|
+
violationType: "process_argv",
|
|
165
|
+
strategy: "throw",
|
|
166
|
+
reason: "process.argv may contain secrets in CLI arguments"
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
prop: "cwd",
|
|
170
|
+
target: process,
|
|
171
|
+
violationType: "process_chdir",
|
|
172
|
+
strategy: "throw",
|
|
173
|
+
reason: "process.cwd could disclose real host working directory path"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
prop: "chdir",
|
|
177
|
+
target: process,
|
|
178
|
+
violationType: "process_chdir",
|
|
179
|
+
strategy: "throw",
|
|
180
|
+
reason: "process.chdir could confuse the interpreter's CWD tracking"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
prop: "report",
|
|
184
|
+
target: process,
|
|
185
|
+
violationType: "process_report",
|
|
186
|
+
strategy: "throw",
|
|
187
|
+
reason: "process.report could disclose full environment, host paths, and system info"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
prop: "loadEnvFile",
|
|
191
|
+
target: process,
|
|
192
|
+
violationType: "process_env",
|
|
193
|
+
strategy: "throw",
|
|
194
|
+
reason: "process.loadEnvFile could load env files bypassing env proxy"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
prop: "setUncaughtExceptionCaptureCallback",
|
|
198
|
+
target: process,
|
|
199
|
+
violationType: "process_exception_handler",
|
|
200
|
+
strategy: "throw",
|
|
201
|
+
reason: "setUncaughtExceptionCaptureCallback could intercept security errors"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
prop: "send",
|
|
205
|
+
target: process,
|
|
206
|
+
violationType: "process_send",
|
|
207
|
+
strategy: "throw",
|
|
208
|
+
reason: "process.send could communicate with parent process in IPC contexts"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
prop: "channel",
|
|
212
|
+
target: process,
|
|
213
|
+
violationType: "process_channel",
|
|
214
|
+
strategy: "throw",
|
|
215
|
+
reason: "process.channel could access IPC channel to parent process"
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
prop: "cpuUsage",
|
|
219
|
+
target: process,
|
|
220
|
+
violationType: "process_timing",
|
|
221
|
+
strategy: "throw",
|
|
222
|
+
reason: "process.cpuUsage could enable timing side-channel attacks"
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
prop: "memoryUsage",
|
|
226
|
+
target: process,
|
|
227
|
+
violationType: "process_timing",
|
|
228
|
+
strategy: "throw",
|
|
229
|
+
reason: "process.memoryUsage could enable timing side-channel attacks"
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
prop: "hrtime",
|
|
233
|
+
target: process,
|
|
234
|
+
violationType: "process_timing",
|
|
235
|
+
strategy: "throw",
|
|
236
|
+
reason: "process.hrtime could enable timing side-channel attacks"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
prop: "WeakRef",
|
|
240
|
+
target: globalThis,
|
|
241
|
+
violationType: "weak_ref",
|
|
242
|
+
strategy: "throw",
|
|
243
|
+
reason: "WeakRef could be used to leak references outside sandbox"
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
prop: "FinalizationRegistry",
|
|
247
|
+
target: globalThis,
|
|
248
|
+
violationType: "finalization_registry",
|
|
249
|
+
strategy: "throw",
|
|
250
|
+
reason: "FinalizationRegistry could be used to leak references outside sandbox"
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
prop: "Reflect",
|
|
254
|
+
target: globalThis,
|
|
255
|
+
violationType: "reflect",
|
|
256
|
+
strategy: "freeze",
|
|
257
|
+
reason: "Reflect provides introspection capabilities"
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
prop: "Proxy",
|
|
261
|
+
target: globalThis,
|
|
262
|
+
violationType: "proxy",
|
|
263
|
+
strategy: "throw",
|
|
264
|
+
reason: "Proxy allows intercepting and modifying object behavior"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
prop: "WebAssembly",
|
|
268
|
+
target: globalThis,
|
|
269
|
+
violationType: "webassembly",
|
|
270
|
+
strategy: "throw",
|
|
271
|
+
reason: "WebAssembly allows executing arbitrary compiled code"
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
prop: "SharedArrayBuffer",
|
|
275
|
+
target: globalThis,
|
|
276
|
+
violationType: "shared_array_buffer",
|
|
277
|
+
strategy: "throw",
|
|
278
|
+
reason: "SharedArrayBuffer could enable side-channel communication or timing attacks"
|
|
279
|
+
},
|
|
280
|
+
{
|
|
281
|
+
prop: "Atomics",
|
|
282
|
+
target: globalThis,
|
|
283
|
+
violationType: "atomics",
|
|
284
|
+
strategy: "throw",
|
|
285
|
+
reason: "Atomics could enable side-channel communication or timing attacks"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
prop: "performance",
|
|
289
|
+
target: globalThis,
|
|
290
|
+
violationType: "performance_timing",
|
|
291
|
+
strategy: "throw",
|
|
292
|
+
reason: "performance.now() provides sub-millisecond timing for side-channel attacks"
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
prop: "stdout",
|
|
296
|
+
target: process,
|
|
297
|
+
violationType: "process_stdout",
|
|
298
|
+
strategy: "throw",
|
|
299
|
+
reason: "process.stdout could bypass interpreter output to write to host stdout"
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
prop: "stderr",
|
|
303
|
+
target: process,
|
|
304
|
+
violationType: "process_stderr",
|
|
305
|
+
strategy: "throw",
|
|
306
|
+
reason: "process.stderr could bypass interpreter output to write to host stderr"
|
|
307
|
+
},
|
|
308
|
+
{
|
|
309
|
+
prop: "__defineGetter__",
|
|
310
|
+
target: Object.prototype,
|
|
311
|
+
violationType: "prototype_mutation",
|
|
312
|
+
strategy: "throw",
|
|
313
|
+
reason: "__defineGetter__ allows prototype pollution via getter injection"
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
prop: "__defineSetter__",
|
|
317
|
+
target: Object.prototype,
|
|
318
|
+
violationType: "prototype_mutation",
|
|
319
|
+
strategy: "throw",
|
|
320
|
+
reason: "__defineSetter__ allows prototype pollution via setter injection"
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
prop: "__lookupGetter__",
|
|
324
|
+
target: Object.prototype,
|
|
325
|
+
violationType: "prototype_mutation",
|
|
326
|
+
strategy: "throw",
|
|
327
|
+
reason: "__lookupGetter__ enables introspection for prototype pollution attacks"
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
prop: "__lookupSetter__",
|
|
331
|
+
target: Object.prototype,
|
|
332
|
+
violationType: "prototype_mutation",
|
|
333
|
+
strategy: "throw",
|
|
334
|
+
reason: "__lookupSetter__ enables introspection for prototype pollution attacks"
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
prop: "JSON",
|
|
338
|
+
target: globalThis,
|
|
339
|
+
violationType: "json_mutation",
|
|
340
|
+
strategy: "freeze",
|
|
341
|
+
reason: "Freeze JSON to prevent mutation of parsing/serialization"
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
prop: "Math",
|
|
345
|
+
target: globalThis,
|
|
346
|
+
violationType: "math_mutation",
|
|
347
|
+
strategy: "freeze",
|
|
348
|
+
reason: "Freeze Math to prevent mutation of math utilities"
|
|
349
|
+
}
|
|
350
|
+
];
|
|
351
|
+
try {
|
|
352
|
+
let e = Object.getPrototypeOf(async () => {}).constructor;
|
|
353
|
+
e && e !== Function && a.push({
|
|
354
|
+
prop: "constructor",
|
|
355
|
+
target: Object.getPrototypeOf(async () => {}),
|
|
356
|
+
violationType: "async_function_constructor",
|
|
357
|
+
strategy: "throw",
|
|
358
|
+
reason: "AsyncFunction constructor allows arbitrary async code execution"
|
|
359
|
+
});
|
|
360
|
+
} catch {}
|
|
361
|
+
try {
|
|
362
|
+
let e = Object.getPrototypeOf(function* () {}).constructor;
|
|
363
|
+
e && e !== Function && a.push({
|
|
364
|
+
prop: "constructor",
|
|
365
|
+
target: Object.getPrototypeOf(function* () {}),
|
|
366
|
+
violationType: "generator_function_constructor",
|
|
367
|
+
strategy: "throw",
|
|
368
|
+
reason: "GeneratorFunction constructor allows arbitrary generator code execution"
|
|
369
|
+
});
|
|
370
|
+
} catch {}
|
|
371
|
+
try {
|
|
372
|
+
let e = Object.getPrototypeOf(async function* () {}).constructor;
|
|
373
|
+
e && e !== Function && e !== Object.getPrototypeOf(async () => {}).constructor && a.push({
|
|
374
|
+
prop: "constructor",
|
|
375
|
+
target: Object.getPrototypeOf(async function* () {}),
|
|
376
|
+
violationType: "async_generator_function_constructor",
|
|
377
|
+
strategy: "throw",
|
|
378
|
+
reason: "AsyncGeneratorFunction constructor allows arbitrary async generator code execution"
|
|
379
|
+
});
|
|
380
|
+
} catch {}
|
|
381
|
+
return a.filter((e) => {
|
|
382
|
+
try {
|
|
383
|
+
return e.target[e.prop] !== void 0;
|
|
384
|
+
} catch {
|
|
385
|
+
return !1;
|
|
386
|
+
}
|
|
387
|
+
});
|
|
388
|
+
}
|
|
389
|
+
var f = typeof __BROWSER__ < "u" && __BROWSER__;
|
|
390
|
+
function w() {
|
|
391
|
+
return typeof crypto < "u" && crypto.randomUUID ? crypto.randomUUID() : "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, (a) => {
|
|
392
|
+
let e = Math.random() * 16 | 0;
|
|
393
|
+
return (a === "x" ? e : e & 3 | 8).toString(16);
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
var x = null;
|
|
397
|
+
if (!f) try {
|
|
398
|
+
let { AsyncLocalStorage: a } = m$1("node:async_hooks");
|
|
399
|
+
x = a;
|
|
400
|
+
} catch {}
|
|
401
|
+
var k = `
|
|
402
|
+
|
|
403
|
+
This is a defense-in-depth measure and indicates a bug in just-bash. Please report this at security@vercel.com`, d = class extends Error {
|
|
404
|
+
violation;
|
|
405
|
+
constructor(e, t) {
|
|
406
|
+
super(e + k), this.violation = t, this.name = "SecurityViolationError";
|
|
407
|
+
}
|
|
408
|
+
}, u = !f && x ? new x() : null, T = 1e3;
|
|
409
|
+
function D(a, e, ...t) {
|
|
410
|
+
return u.run(a, () => e(...t));
|
|
411
|
+
}
|
|
412
|
+
var m = {
|
|
413
|
+
enabled: !0,
|
|
414
|
+
auditMode: !1
|
|
415
|
+
};
|
|
416
|
+
function E(a) {
|
|
417
|
+
return a === void 0 ? {
|
|
418
|
+
...m,
|
|
419
|
+
enabled: !1
|
|
420
|
+
} : typeof a == "boolean" ? {
|
|
421
|
+
...m,
|
|
422
|
+
enabled: a
|
|
423
|
+
} : {
|
|
424
|
+
...m,
|
|
425
|
+
...a
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
var _ = class a {
|
|
429
|
+
static instance = null;
|
|
430
|
+
static importHooksRegistered = !1;
|
|
431
|
+
static trustedExecutionDepth = /* @__PURE__ */ new Map();
|
|
432
|
+
config;
|
|
433
|
+
refCount = 0;
|
|
434
|
+
patchFailures = [];
|
|
435
|
+
activeExecutionIds = /* @__PURE__ */ new Set();
|
|
436
|
+
contextCache = /* @__PURE__ */ new Map();
|
|
437
|
+
originalDescriptors = [];
|
|
438
|
+
violations = [];
|
|
439
|
+
activationTime = 0;
|
|
440
|
+
totalActiveTimeMs = 0;
|
|
441
|
+
constructor(e) {
|
|
442
|
+
this.config = e;
|
|
443
|
+
}
|
|
444
|
+
static getInstance(e) {
|
|
445
|
+
let t = E(e);
|
|
446
|
+
if (!a.instance) a.instance = new a(t);
|
|
447
|
+
else {
|
|
448
|
+
let r = a.instance.config;
|
|
449
|
+
if (t.enabled !== r.enabled || t.auditMode !== r.auditMode) throw new Error(`DefenseInDepthBox config conflict: requested {enabled: ${t.enabled}, auditMode: ${t.auditMode}} but singleton already has {enabled: ${r.enabled}, auditMode: ${r.auditMode}}. All Bash instances must use the same defense-in-depth security settings, or call DefenseInDepthBox.resetInstance() between incompatible configurations.`);
|
|
450
|
+
}
|
|
451
|
+
return a.instance;
|
|
452
|
+
}
|
|
453
|
+
static resetInstance() {
|
|
454
|
+
a.instance && (a.instance.forceDeactivate(), a.instance = null), a.trustedExecutionDepth.clear();
|
|
455
|
+
}
|
|
456
|
+
static isInSandboxedContext() {
|
|
457
|
+
return u ? u?.getStore()?.sandboxActive === !0 : !1;
|
|
458
|
+
}
|
|
459
|
+
static getCurrentExecutionId() {
|
|
460
|
+
if (u) return u?.getStore()?.executionId;
|
|
461
|
+
}
|
|
462
|
+
static enterTrustedScope(e) {
|
|
463
|
+
let t = a.trustedExecutionDepth.get(e) ?? 0;
|
|
464
|
+
a.trustedExecutionDepth.set(e, t + 1);
|
|
465
|
+
}
|
|
466
|
+
static leaveTrustedScope(e) {
|
|
467
|
+
let t = a.trustedExecutionDepth.get(e);
|
|
468
|
+
if (t) {
|
|
469
|
+
if (t === 1) {
|
|
470
|
+
a.trustedExecutionDepth.delete(e);
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
a.trustedExecutionDepth.set(e, t - 1);
|
|
474
|
+
}
|
|
475
|
+
}
|
|
476
|
+
static isTrustedScopeActive(e) {
|
|
477
|
+
return e ? (a.trustedExecutionDepth.get(e) ?? 0) > 0 : !1;
|
|
478
|
+
}
|
|
479
|
+
isExecutionIdActive(e) {
|
|
480
|
+
return this.activeExecutionIds.has(e);
|
|
481
|
+
}
|
|
482
|
+
getCachedContext(e) {
|
|
483
|
+
let t = this.contextCache.get(e);
|
|
484
|
+
return t || (t = {
|
|
485
|
+
sandboxActive: !0,
|
|
486
|
+
executionId: e
|
|
487
|
+
}, this.contextCache.set(e, t)), t;
|
|
488
|
+
}
|
|
489
|
+
getPreferredActiveExecutionId() {
|
|
490
|
+
if (this.activeExecutionIds.size !== 0) for (let e of this.activeExecutionIds) return e;
|
|
491
|
+
}
|
|
492
|
+
static bindCurrentContext(e) {
|
|
493
|
+
if (!u) return e;
|
|
494
|
+
let t = a.instance, r = u.getStore(), s = r?.sandboxActive === !0 ? r.executionId : t?.getPreferredActiveExecutionId();
|
|
495
|
+
if (!s) return e;
|
|
496
|
+
let n = t?.getCachedContext(s) ?? {
|
|
497
|
+
sandboxActive: !0,
|
|
498
|
+
executionId: s
|
|
499
|
+
};
|
|
500
|
+
return ((...o) => {
|
|
501
|
+
let i = a.instance;
|
|
502
|
+
if (!(i && !i.isExecutionIdActive(s) && (i.recordViolation("bound_callback_after_deactivate", "bound callback", "Bound callback blocked after originating execution was deactivated"), !i.config.auditMode))) return D(n, e, ...o);
|
|
503
|
+
});
|
|
504
|
+
}
|
|
505
|
+
isEnabled() {
|
|
506
|
+
return this.config.enabled === !0 && u !== null && !f;
|
|
507
|
+
}
|
|
508
|
+
updateConfig(e) {
|
|
509
|
+
this.config = {
|
|
510
|
+
...this.config,
|
|
511
|
+
...e
|
|
512
|
+
};
|
|
513
|
+
}
|
|
514
|
+
activate() {
|
|
515
|
+
if (f || !this.config.enabled || !u) {
|
|
516
|
+
let r = w(), s = !1;
|
|
517
|
+
return {
|
|
518
|
+
run: (n) => s ? Promise.reject(/* @__PURE__ */ new Error("DefenseInDepthBox handle is deactivated and cannot run new work")) : n(),
|
|
519
|
+
deactivate: () => {
|
|
520
|
+
s = !0;
|
|
521
|
+
},
|
|
522
|
+
executionId: r
|
|
523
|
+
};
|
|
524
|
+
}
|
|
525
|
+
this.refCount++, this.refCount === 1 && (this.applyPatches(), this.activationTime = Date.now());
|
|
526
|
+
let e = w(), t = !1;
|
|
527
|
+
return {
|
|
528
|
+
run: (r) => t ? Promise.reject(/* @__PURE__ */ new Error("DefenseInDepthBox handle is deactivated and cannot run new work")) : (this.activeExecutionIds.add(e), u.run({
|
|
529
|
+
sandboxActive: !0,
|
|
530
|
+
executionId: e
|
|
531
|
+
}, r)),
|
|
532
|
+
deactivate: () => {
|
|
533
|
+
t || (t = !0, this.activeExecutionIds.delete(e), this.contextCache.delete(e), this.refCount--, this.refCount === 0 && (this.restorePatches(), this.totalActiveTimeMs += Date.now() - this.activationTime), this.refCount < 0 && (this.refCount = 0));
|
|
534
|
+
},
|
|
535
|
+
executionId: e
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
forceDeactivate() {
|
|
539
|
+
this.refCount > 0 && (this.restorePatches(), this.totalActiveTimeMs += Date.now() - this.activationTime), this.activeExecutionIds.clear(), this.contextCache.clear(), this.refCount = 0;
|
|
540
|
+
}
|
|
541
|
+
isActive() {
|
|
542
|
+
return this.refCount > 0;
|
|
543
|
+
}
|
|
544
|
+
getStats() {
|
|
545
|
+
return {
|
|
546
|
+
violationsBlocked: this.violations.length,
|
|
547
|
+
violations: [...this.violations],
|
|
548
|
+
activeTimeMs: this.totalActiveTimeMs + (this.refCount > 0 ? Date.now() - this.activationTime : 0),
|
|
549
|
+
refCount: this.refCount
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
getPatchFailures() {
|
|
553
|
+
return [...this.patchFailures];
|
|
554
|
+
}
|
|
555
|
+
clearViolations() {
|
|
556
|
+
this.violations = [];
|
|
557
|
+
}
|
|
558
|
+
getPathForTarget(e, t) {
|
|
559
|
+
return e === globalThis ? `globalThis.${t}` : e === process ? `process.${t}` : e === Error ? `Error.${t}` : e === Function.prototype ? `Function.prototype.${t}` : e === Object.prototype ? `Object.prototype.${t}` : `<object>.${t}`;
|
|
560
|
+
}
|
|
561
|
+
static runTrusted(e) {
|
|
562
|
+
if (!u) return e();
|
|
563
|
+
let t = u.getStore();
|
|
564
|
+
if (!t) return e();
|
|
565
|
+
let { executionId: r } = t;
|
|
566
|
+
return u.run({
|
|
567
|
+
...t,
|
|
568
|
+
trusted: !0
|
|
569
|
+
}, () => {
|
|
570
|
+
a.enterTrustedScope(r);
|
|
571
|
+
try {
|
|
572
|
+
let s = e();
|
|
573
|
+
return typeof s == "object" && s !== null && "finally" in s && typeof s.finally == "function" ? s.finally(() => {
|
|
574
|
+
a.leaveTrustedScope(r);
|
|
575
|
+
}) : (a.leaveTrustedScope(r), s);
|
|
576
|
+
} catch (s) {
|
|
577
|
+
throw a.leaveTrustedScope(r), s;
|
|
578
|
+
}
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
static async runTrustedAsync(e) {
|
|
582
|
+
if (!u) return e();
|
|
583
|
+
let t = u.getStore();
|
|
584
|
+
if (!t) return e();
|
|
585
|
+
let { executionId: r } = t;
|
|
586
|
+
return u.run({
|
|
587
|
+
...t,
|
|
588
|
+
trusted: !0
|
|
589
|
+
}, async () => {
|
|
590
|
+
a.enterTrustedScope(r);
|
|
591
|
+
try {
|
|
592
|
+
return await e();
|
|
593
|
+
} finally {
|
|
594
|
+
a.leaveTrustedScope(r);
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
shouldBlock() {
|
|
599
|
+
if (f || this.config.auditMode || !u) return !1;
|
|
600
|
+
let e = u?.getStore();
|
|
601
|
+
return !(e?.sandboxActive !== !0 || e.trusted || a.isTrustedScopeActive(e.executionId));
|
|
602
|
+
}
|
|
603
|
+
recordViolation(e, t, r) {
|
|
604
|
+
let s = {
|
|
605
|
+
timestamp: Date.now(),
|
|
606
|
+
type: e,
|
|
607
|
+
message: r,
|
|
608
|
+
path: t,
|
|
609
|
+
stack: (/* @__PURE__ */ new Error()).stack,
|
|
610
|
+
executionId: u?.getStore()?.executionId
|
|
611
|
+
};
|
|
612
|
+
if (this.violations.length < T && this.violations.push(s), this.config.onViolation) try {
|
|
613
|
+
this.config.onViolation(s);
|
|
614
|
+
} catch (n) {
|
|
615
|
+
console.debug("[DefenseInDepthBox] onViolation callback threw:", n instanceof Error ? n.message : n);
|
|
616
|
+
}
|
|
617
|
+
return s;
|
|
618
|
+
}
|
|
619
|
+
createBlockingProxy(e, t, r) {
|
|
620
|
+
let s = this;
|
|
621
|
+
return new Proxy(e, {
|
|
622
|
+
apply(n, o, i) {
|
|
623
|
+
if (s.shouldBlock()) {
|
|
624
|
+
let c = `${t} is blocked during script execution`;
|
|
625
|
+
throw new d(c, s.recordViolation(r, t, c));
|
|
626
|
+
}
|
|
627
|
+
return s.config.auditMode && u?.getStore()?.sandboxActive === !0 && s.recordViolation(r, t, `${t} called (audit mode)`), Reflect.apply(n, o, i);
|
|
628
|
+
},
|
|
629
|
+
construct(n, o, i) {
|
|
630
|
+
if (s.shouldBlock()) {
|
|
631
|
+
let c = `${t} constructor is blocked during script execution`;
|
|
632
|
+
throw new d(c, s.recordViolation(r, t, c));
|
|
633
|
+
}
|
|
634
|
+
return s.config.auditMode && u?.getStore()?.sandboxActive === !0 && s.recordViolation(r, t, `${t} constructor called (audit mode)`), Reflect.construct(n, o, i);
|
|
635
|
+
}
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
createBlockingObjectProxy(e, t, r, s) {
|
|
639
|
+
let n = this;
|
|
640
|
+
return new Proxy(e, {
|
|
641
|
+
get(o, i, c) {
|
|
642
|
+
if (n.shouldBlock()) {
|
|
643
|
+
if (s && typeof i == "string" && s.has(i)) return Reflect.get(o, i, c);
|
|
644
|
+
let l = `${t}.${String(i)}`, p = `${l} is blocked during script execution`;
|
|
645
|
+
throw new d(p, n.recordViolation(r, l, p));
|
|
646
|
+
}
|
|
647
|
+
if (n.config.auditMode && u?.getStore()?.sandboxActive === !0) {
|
|
648
|
+
let l = `${t}.${String(i)}`;
|
|
649
|
+
n.recordViolation(r, l, `${l} accessed (audit mode)`);
|
|
650
|
+
}
|
|
651
|
+
return Reflect.get(o, i, c);
|
|
652
|
+
},
|
|
653
|
+
set(o, i, c, l) {
|
|
654
|
+
if (n.shouldBlock()) {
|
|
655
|
+
let p = `${t}.${String(i)}`, h = `${p} modification is blocked during script execution`;
|
|
656
|
+
throw new d(h, n.recordViolation(r, p, h));
|
|
657
|
+
}
|
|
658
|
+
return Reflect.set(o, i, c, l);
|
|
659
|
+
},
|
|
660
|
+
ownKeys(o) {
|
|
661
|
+
if (n.shouldBlock()) {
|
|
662
|
+
let i = `${t} enumeration is blocked during script execution`;
|
|
663
|
+
throw new d(i, n.recordViolation(r, t, i));
|
|
664
|
+
}
|
|
665
|
+
return Reflect.ownKeys(o);
|
|
666
|
+
},
|
|
667
|
+
getOwnPropertyDescriptor(o, i) {
|
|
668
|
+
if (n.shouldBlock()) {
|
|
669
|
+
let c = `${t}.${String(i)}`, l = `${c} descriptor access is blocked during script execution`;
|
|
670
|
+
throw new d(l, n.recordViolation(r, c, l));
|
|
671
|
+
}
|
|
672
|
+
return Reflect.getOwnPropertyDescriptor(o, i);
|
|
673
|
+
},
|
|
674
|
+
has(o, i) {
|
|
675
|
+
if (n.shouldBlock()) {
|
|
676
|
+
let c = `${t}.${String(i)}`, l = `${c} existence check is blocked during script execution`;
|
|
677
|
+
throw new d(l, n.recordViolation(r, c, l));
|
|
678
|
+
}
|
|
679
|
+
return Reflect.has(o, i);
|
|
680
|
+
},
|
|
681
|
+
deleteProperty(o, i) {
|
|
682
|
+
if (n.shouldBlock()) {
|
|
683
|
+
let c = `${t}.${String(i)}`, l = `${c} deletion is blocked during script execution`;
|
|
684
|
+
throw new d(l, n.recordViolation(r, c, l));
|
|
685
|
+
}
|
|
686
|
+
return Reflect.deleteProperty(o, i);
|
|
687
|
+
},
|
|
688
|
+
setPrototypeOf(o, i) {
|
|
689
|
+
if (n.shouldBlock()) {
|
|
690
|
+
let c = `${t} setPrototypeOf is blocked during script execution`;
|
|
691
|
+
throw new d(c, n.recordViolation(r, t, c));
|
|
692
|
+
}
|
|
693
|
+
return Reflect.setPrototypeOf(o, i);
|
|
694
|
+
},
|
|
695
|
+
defineProperty(o, i, c) {
|
|
696
|
+
if (n.shouldBlock()) {
|
|
697
|
+
let l = `${t}.${String(i)}`, p = `${l} defineProperty is blocked during script execution`;
|
|
698
|
+
throw new d(p, n.recordViolation(r, l, p));
|
|
699
|
+
}
|
|
700
|
+
return Reflect.defineProperty(o, i, c);
|
|
701
|
+
}
|
|
702
|
+
});
|
|
703
|
+
}
|
|
704
|
+
applyPatches() {
|
|
705
|
+
this.patchFailures = [];
|
|
706
|
+
let e = v(), t = new Set([
|
|
707
|
+
"process_send",
|
|
708
|
+
"process_channel",
|
|
709
|
+
"process_stdout",
|
|
710
|
+
"process_stderr"
|
|
711
|
+
]);
|
|
712
|
+
for (let n of e) t.has(n.violationType) || this.applyPatch(n);
|
|
713
|
+
this.protectConstructorChain(), this.protectErrorPrepareStackTrace(), this.protectPromiseThen(), this.protectDynamicImport(), this.protectModuleLoad(), this.protectModuleResolveFilename(), this.protectProcessMainModule(), this.protectProcessExecPath(), this.lockWellKnownSymbols(), this.protectProxyRevocable();
|
|
714
|
+
let r = ["Function.prototype.constructor", "Module._load"], s = this.patchFailures.filter((n) => r.includes(n));
|
|
715
|
+
if (s.length > 0) throw this.restorePatches(), /* @__PURE__ */ new Error(`DefenseInDepthBox: critical patches failed: ${s.join(", ")}`);
|
|
716
|
+
}
|
|
717
|
+
protectConstructorChain() {
|
|
718
|
+
this.patchPrototypeConstructor(Function.prototype, "Function.prototype.constructor", "function_constructor");
|
|
719
|
+
try {
|
|
720
|
+
let e = Object.getPrototypeOf(async () => {}).constructor;
|
|
721
|
+
e && e !== Function && this.patchPrototypeConstructor(e.prototype, "AsyncFunction.prototype.constructor", "async_function_constructor");
|
|
722
|
+
} catch (e) {
|
|
723
|
+
this.patchFailures.push("AsyncFunction.prototype.constructor"), console.debug("[DefenseInDepthBox] Could not patch AsyncFunction.prototype.constructor:", e instanceof Error ? e.message : e);
|
|
724
|
+
}
|
|
725
|
+
try {
|
|
726
|
+
let e = Object.getPrototypeOf(function* () {}).constructor;
|
|
727
|
+
e && e !== Function && this.patchPrototypeConstructor(e.prototype, "GeneratorFunction.prototype.constructor", "generator_function_constructor");
|
|
728
|
+
} catch (e) {
|
|
729
|
+
this.patchFailures.push("GeneratorFunction.prototype.constructor"), console.debug("[DefenseInDepthBox] Could not patch GeneratorFunction.prototype.constructor:", e instanceof Error ? e.message : e);
|
|
730
|
+
}
|
|
731
|
+
try {
|
|
732
|
+
let e = Object.getPrototypeOf(async function* () {}).constructor, t = Object.getPrototypeOf(async () => {}).constructor;
|
|
733
|
+
e && e !== Function && e !== t && this.patchPrototypeConstructor(e.prototype, "AsyncGeneratorFunction.prototype.constructor", "async_generator_function_constructor");
|
|
734
|
+
} catch (e) {
|
|
735
|
+
this.patchFailures.push("AsyncGeneratorFunction.prototype.constructor"), console.debug("[DefenseInDepthBox] Could not patch AsyncGeneratorFunction.prototype.constructor:", e instanceof Error ? e.message : e);
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
protectErrorPrepareStackTrace() {
|
|
739
|
+
let e = this;
|
|
740
|
+
try {
|
|
741
|
+
let t = Object.getOwnPropertyDescriptor(Error, "prepareStackTrace");
|
|
742
|
+
this.originalDescriptors.push({
|
|
743
|
+
target: Error,
|
|
744
|
+
prop: "prepareStackTrace",
|
|
745
|
+
descriptor: t
|
|
746
|
+
});
|
|
747
|
+
let r = t?.value;
|
|
748
|
+
Object.defineProperty(Error, "prepareStackTrace", {
|
|
749
|
+
get() {
|
|
750
|
+
return r;
|
|
751
|
+
},
|
|
752
|
+
set(s) {
|
|
753
|
+
if (e.shouldBlock()) {
|
|
754
|
+
let n = "Error.prepareStackTrace modification is blocked during script execution";
|
|
755
|
+
throw new d(n, e.recordViolation("error_prepare_stack_trace", "Error.prepareStackTrace", n));
|
|
756
|
+
}
|
|
757
|
+
e.config.auditMode && u?.getStore()?.sandboxActive === !0 && e.recordViolation("error_prepare_stack_trace", "Error.prepareStackTrace", "Error.prepareStackTrace set (audit mode)"), r = s;
|
|
758
|
+
},
|
|
759
|
+
configurable: !0
|
|
760
|
+
});
|
|
761
|
+
} catch (t) {
|
|
762
|
+
this.patchFailures.push("Error.prepareStackTrace"), console.debug("[DefenseInDepthBox] Could not protect Error.prepareStackTrace:", t instanceof Error ? t.message : t);
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
protectPromiseThen() {
|
|
766
|
+
let e = this;
|
|
767
|
+
try {
|
|
768
|
+
let n = function(...o) {
|
|
769
|
+
return u.run(this.captured, () => {
|
|
770
|
+
if (!this.box.isExecutionIdActive(this.executionId)) {
|
|
771
|
+
if (this.box.recordViolation("promise_then_after_deactivate", "Promise.then", "Promise.then callback is blocked after defense deactivation"), this.box.config.auditMode) return Reflect.apply(this.cb, void 0, o);
|
|
772
|
+
if (this.kind === "fulfilled") return o[0];
|
|
773
|
+
throw o[0];
|
|
774
|
+
}
|
|
775
|
+
return Reflect.apply(this.cb, void 0, o);
|
|
776
|
+
});
|
|
777
|
+
};
|
|
778
|
+
let r = Object.getOwnPropertyDescriptor(Promise.prototype, "then");
|
|
779
|
+
this.originalDescriptors.push({
|
|
780
|
+
target: Promise.prototype,
|
|
781
|
+
prop: "then",
|
|
782
|
+
descriptor: r
|
|
783
|
+
});
|
|
784
|
+
let s = r?.value;
|
|
785
|
+
if (typeof s != "function") return;
|
|
786
|
+
Object.defineProperty(Promise.prototype, "then", {
|
|
787
|
+
value: function(i, c) {
|
|
788
|
+
if (!u) return Reflect.apply(s, this, [i, c]);
|
|
789
|
+
let l = u.getStore(), p = l?.sandboxActive === !0 && l.trusted !== !0 ? l.executionId : void 0;
|
|
790
|
+
if (!p) return Reflect.apply(s, this, [i, c]);
|
|
791
|
+
let h = e.getCachedContext(p), y = (b, P) => typeof b != "function" ? b : n.bind({
|
|
792
|
+
box: e,
|
|
793
|
+
executionId: p,
|
|
794
|
+
captured: h,
|
|
795
|
+
cb: b,
|
|
796
|
+
kind: P
|
|
797
|
+
});
|
|
798
|
+
return Reflect.apply(s, this, [y(i, "fulfilled"), y(c, "rejected")]);
|
|
799
|
+
},
|
|
800
|
+
writable: !0,
|
|
801
|
+
configurable: !0
|
|
802
|
+
});
|
|
803
|
+
} catch (r) {
|
|
804
|
+
this.patchFailures.push("Promise.prototype.then"), console.debug("[DefenseInDepthBox] Could not protect Promise.prototype.then:", r instanceof Error ? r.message : r);
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
patchPrototypeConstructor(e, t, r) {
|
|
808
|
+
let s = this;
|
|
809
|
+
try {
|
|
810
|
+
let n = Object.getOwnPropertyDescriptor(e, "constructor");
|
|
811
|
+
this.originalDescriptors.push({
|
|
812
|
+
target: e,
|
|
813
|
+
prop: "constructor",
|
|
814
|
+
descriptor: n
|
|
815
|
+
});
|
|
816
|
+
let o = n?.value;
|
|
817
|
+
Object.defineProperty(e, "constructor", {
|
|
818
|
+
get() {
|
|
819
|
+
if (s.shouldBlock()) {
|
|
820
|
+
let i = `${t} access is blocked during script execution`;
|
|
821
|
+
throw new d(i, s.recordViolation(r, t, i));
|
|
822
|
+
}
|
|
823
|
+
return s.config.auditMode && u?.getStore()?.sandboxActive === !0 && s.recordViolation(r, t, `${t} accessed (audit mode)`), o;
|
|
824
|
+
},
|
|
825
|
+
set(i) {
|
|
826
|
+
if (s.shouldBlock()) {
|
|
827
|
+
let c = `${t} modification is blocked during script execution`;
|
|
828
|
+
throw new d(c, s.recordViolation(r, t, c));
|
|
829
|
+
}
|
|
830
|
+
Object.defineProperty(this, "constructor", {
|
|
831
|
+
value: i,
|
|
832
|
+
writable: !0,
|
|
833
|
+
configurable: !0
|
|
834
|
+
});
|
|
835
|
+
},
|
|
836
|
+
configurable: !0
|
|
837
|
+
});
|
|
838
|
+
} catch (n) {
|
|
839
|
+
this.patchFailures.push(t), console.debug(`[DefenseInDepthBox] Could not patch ${t}:`, n instanceof Error ? n.message : n);
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
protectProcessMainModule() {
|
|
843
|
+
if (typeof process > "u") return;
|
|
844
|
+
let e = this;
|
|
845
|
+
try {
|
|
846
|
+
let t = Object.getOwnPropertyDescriptor(process, "mainModule");
|
|
847
|
+
this.originalDescriptors.push({
|
|
848
|
+
target: process,
|
|
849
|
+
prop: "mainModule",
|
|
850
|
+
descriptor: t
|
|
851
|
+
});
|
|
852
|
+
let r = t?.value;
|
|
853
|
+
r !== void 0 && Object.defineProperty(process, "mainModule", {
|
|
854
|
+
get() {
|
|
855
|
+
if (e.shouldBlock()) {
|
|
856
|
+
let s = "process.mainModule access is blocked during script execution";
|
|
857
|
+
throw new d(s, e.recordViolation("process_main_module", "process.mainModule", s));
|
|
858
|
+
}
|
|
859
|
+
return e.config.auditMode && u?.getStore()?.sandboxActive === !0 && e.recordViolation("process_main_module", "process.mainModule", "process.mainModule accessed (audit mode)"), r;
|
|
860
|
+
},
|
|
861
|
+
set(s) {
|
|
862
|
+
if (e.shouldBlock()) {
|
|
863
|
+
let n = "process.mainModule modification is blocked during script execution";
|
|
864
|
+
throw new d(n, e.recordViolation("process_main_module", "process.mainModule", n));
|
|
865
|
+
}
|
|
866
|
+
Object.defineProperty(process, "mainModule", {
|
|
867
|
+
value: s,
|
|
868
|
+
writable: !0,
|
|
869
|
+
configurable: !0
|
|
870
|
+
});
|
|
871
|
+
},
|
|
872
|
+
configurable: !0
|
|
873
|
+
});
|
|
874
|
+
} catch (t) {
|
|
875
|
+
this.patchFailures.push("process.mainModule"), console.debug("[DefenseInDepthBox] Could not protect process.mainModule:", t instanceof Error ? t.message : t);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
protectProcessExecPath() {
|
|
879
|
+
if (typeof process > "u") return;
|
|
880
|
+
let e = this;
|
|
881
|
+
try {
|
|
882
|
+
let t = Object.getOwnPropertyDescriptor(process, "execPath");
|
|
883
|
+
this.originalDescriptors.push({
|
|
884
|
+
target: process,
|
|
885
|
+
prop: "execPath",
|
|
886
|
+
descriptor: t
|
|
887
|
+
});
|
|
888
|
+
let r = t?.value ?? process.execPath;
|
|
889
|
+
Object.defineProperty(process, "execPath", {
|
|
890
|
+
get() {
|
|
891
|
+
if (e.shouldBlock()) {
|
|
892
|
+
let s = "process.execPath access is blocked during script execution";
|
|
893
|
+
throw new d(s, e.recordViolation("process_exec_path", "process.execPath", s));
|
|
894
|
+
}
|
|
895
|
+
return e.config.auditMode && u?.getStore()?.sandboxActive === !0 && e.recordViolation("process_exec_path", "process.execPath", "process.execPath accessed (audit mode)"), r;
|
|
896
|
+
},
|
|
897
|
+
set(s) {
|
|
898
|
+
if (e.shouldBlock()) {
|
|
899
|
+
let n = "process.execPath modification is blocked during script execution";
|
|
900
|
+
throw new d(n, e.recordViolation("process_exec_path", "process.execPath", n));
|
|
901
|
+
}
|
|
902
|
+
Object.defineProperty(process, "execPath", {
|
|
903
|
+
value: s,
|
|
904
|
+
writable: !0,
|
|
905
|
+
configurable: !0
|
|
906
|
+
});
|
|
907
|
+
},
|
|
908
|
+
configurable: !0
|
|
909
|
+
});
|
|
910
|
+
} catch (t) {
|
|
911
|
+
this.patchFailures.push("process.execPath"), console.debug("[DefenseInDepthBox] Could not protect process.execPath:", t instanceof Error ? t.message : t);
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
lockWellKnownSymbols() {
|
|
915
|
+
let e = (t, r) => {
|
|
916
|
+
try {
|
|
917
|
+
let s = Object.getOwnPropertyDescriptor(t, r);
|
|
918
|
+
if (s?.configurable) {
|
|
919
|
+
if ("value" in s) {
|
|
920
|
+
Object.defineProperty(t, r, {
|
|
921
|
+
...s,
|
|
922
|
+
configurable: !1,
|
|
923
|
+
writable: !1
|
|
924
|
+
});
|
|
925
|
+
return;
|
|
926
|
+
}
|
|
927
|
+
Object.defineProperty(t, r, {
|
|
928
|
+
...s,
|
|
929
|
+
configurable: !1
|
|
930
|
+
});
|
|
931
|
+
}
|
|
932
|
+
} catch {}
|
|
933
|
+
};
|
|
934
|
+
for (let t of [
|
|
935
|
+
Array,
|
|
936
|
+
Map,
|
|
937
|
+
Set,
|
|
938
|
+
RegExp,
|
|
939
|
+
Promise
|
|
940
|
+
]) e(t, Symbol.species);
|
|
941
|
+
for (let t of [
|
|
942
|
+
Array.prototype,
|
|
943
|
+
String.prototype,
|
|
944
|
+
Map.prototype,
|
|
945
|
+
Set.prototype
|
|
946
|
+
]) e(t, Symbol.iterator);
|
|
947
|
+
e(Symbol.prototype, Symbol.toPrimitive), e(Date.prototype, Symbol.toPrimitive);
|
|
948
|
+
for (let t of [
|
|
949
|
+
Symbol.match,
|
|
950
|
+
Symbol.matchAll,
|
|
951
|
+
Symbol.replace,
|
|
952
|
+
Symbol.search,
|
|
953
|
+
Symbol.split
|
|
954
|
+
]) e(RegExp.prototype, t);
|
|
955
|
+
e(Function.prototype, Symbol.hasInstance), e(Array.prototype, Symbol.unscopables);
|
|
956
|
+
for (let t of [
|
|
957
|
+
Map.prototype,
|
|
958
|
+
Set.prototype,
|
|
959
|
+
Promise.prototype,
|
|
960
|
+
ArrayBuffer.prototype
|
|
961
|
+
]) e(t, Symbol.toStringTag);
|
|
962
|
+
try {
|
|
963
|
+
let t = Object.getOwnPropertyDescriptor(Error, "stackTraceLimit");
|
|
964
|
+
this.originalDescriptors.push({
|
|
965
|
+
target: Error,
|
|
966
|
+
prop: "stackTraceLimit",
|
|
967
|
+
descriptor: t
|
|
968
|
+
}), Object.defineProperty(Error, "stackTraceLimit", {
|
|
969
|
+
value: Error.stackTraceLimit,
|
|
970
|
+
writable: !1,
|
|
971
|
+
configurable: !0
|
|
972
|
+
});
|
|
973
|
+
} catch {}
|
|
974
|
+
}
|
|
975
|
+
protectProxyRevocable() {
|
|
976
|
+
let e = this;
|
|
977
|
+
try {
|
|
978
|
+
let t = Proxy.revocable;
|
|
979
|
+
if (typeof t != "function") return;
|
|
980
|
+
let r = Object.getOwnPropertyDescriptor(Proxy, "revocable");
|
|
981
|
+
this.originalDescriptors.push({
|
|
982
|
+
target: Proxy,
|
|
983
|
+
prop: "revocable",
|
|
984
|
+
descriptor: r
|
|
985
|
+
}), Object.defineProperty(Proxy, "revocable", {
|
|
986
|
+
value: function(n, o) {
|
|
987
|
+
if (e.shouldBlock()) {
|
|
988
|
+
let i = "Proxy.revocable is blocked during script execution";
|
|
989
|
+
throw new d(i, e.recordViolation("proxy", "Proxy.revocable", i));
|
|
990
|
+
}
|
|
991
|
+
return e.config.auditMode && u?.getStore()?.sandboxActive === !0 && e.recordViolation("proxy", "Proxy.revocable", "Proxy.revocable called (audit mode)"), t(n, o);
|
|
992
|
+
},
|
|
993
|
+
writable: !1,
|
|
994
|
+
configurable: !0
|
|
995
|
+
});
|
|
996
|
+
} catch (t) {
|
|
997
|
+
this.patchFailures.push("Proxy.revocable"), console.debug("[DefenseInDepthBox] Could not protect Proxy.revocable:", t instanceof Error ? t.message : t);
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
protectDynamicImport() {
|
|
1001
|
+
if (!(f || a.importHooksRegistered)) try {
|
|
1002
|
+
let e = this, t = m$1("node:module"), r = /* @__PURE__ */ new Set();
|
|
1003
|
+
for (let o of t.builtinModules ?? []) {
|
|
1004
|
+
let i = o.startsWith("node:") ? o.slice(5) : o;
|
|
1005
|
+
r.add(i);
|
|
1006
|
+
let c = i.indexOf("/");
|
|
1007
|
+
c > 0 && r.add(i.slice(0, c));
|
|
1008
|
+
}
|
|
1009
|
+
let s = (o) => {
|
|
1010
|
+
if (o.startsWith("./") || o.startsWith("../") || o.startsWith("/") || o.startsWith("file:") || o.startsWith("data:") || o.startsWith("blob:") || o.startsWith("http:") || o.startsWith("https:")) return !1;
|
|
1011
|
+
let i = o.startsWith("node:") ? o.slice(5) : o;
|
|
1012
|
+
if (!i) return !1;
|
|
1013
|
+
if (typeof t.isBuiltin == "function" && t.isBuiltin(i) || r.has(i)) return !0;
|
|
1014
|
+
let c = i.indexOf("/");
|
|
1015
|
+
return c > 0 && r.has(i.slice(0, c));
|
|
1016
|
+
}, n = () => {
|
|
1017
|
+
let o = u?.getStore();
|
|
1018
|
+
return e.config.auditMode === !0 && o?.sandboxActive === !0 && o.trusted !== !0 && !a.isTrustedScopeActive(o.executionId);
|
|
1019
|
+
};
|
|
1020
|
+
if (typeof t.registerHooks == "function") {
|
|
1021
|
+
t.registerHooks({ resolve(o, i, c) {
|
|
1022
|
+
if (o.startsWith("data:") || o.startsWith("blob:")) throw new Error(`dynamic import of ${o.startsWith("data:") ? "data:" : "blob:"} URLs is blocked by defense-in-depth`);
|
|
1023
|
+
if (s(o)) {
|
|
1024
|
+
let l = `import(${o})`, p = `dynamic import of Node.js builtin '${o}' is blocked during script execution`;
|
|
1025
|
+
if (e.shouldBlock()) throw new d(p, e.recordViolation("dynamic_import_builtin", l, p));
|
|
1026
|
+
n() && e.recordViolation("dynamic_import_builtin", l, `dynamic import of Node.js builtin '${o}' called (audit mode)`);
|
|
1027
|
+
}
|
|
1028
|
+
return c(o, i);
|
|
1029
|
+
} }), a.importHooksRegistered = !0;
|
|
1030
|
+
return;
|
|
1031
|
+
}
|
|
1032
|
+
if (typeof t.register == "function") {
|
|
1033
|
+
let o = [
|
|
1034
|
+
"export async function resolve(specifier, context, nextResolve) {",
|
|
1035
|
+
" if (specifier.startsWith(\"data:\") || specifier.startsWith(\"blob:\")) {",
|
|
1036
|
+
" throw new Error(\"dynamic import of \" + (specifier.startsWith(\"data:\") ? \"data:\" : \"blob:\") + \" URLs is blocked by defense-in-depth\");",
|
|
1037
|
+
" }",
|
|
1038
|
+
" return nextResolve(specifier, context);",
|
|
1039
|
+
"}"
|
|
1040
|
+
].join(`
|
|
1041
|
+
`);
|
|
1042
|
+
t.register(`data:text/javascript,${encodeURIComponent(o)}`), a.importHooksRegistered = !0;
|
|
1043
|
+
}
|
|
1044
|
+
} catch (e) {
|
|
1045
|
+
console.debug("[DefenseInDepthBox] Could not register import() hooks:", e instanceof Error ? e.message : e);
|
|
1046
|
+
}
|
|
1047
|
+
}
|
|
1048
|
+
protectModuleLoad() {
|
|
1049
|
+
if (!f) try {
|
|
1050
|
+
let e = null;
|
|
1051
|
+
if (typeof process < "u") {
|
|
1052
|
+
let o = process.mainModule;
|
|
1053
|
+
o && typeof o == "object" && (e = o.constructor);
|
|
1054
|
+
}
|
|
1055
|
+
if (!e && typeof m$1 < "u" && typeof m$1.main < "u" && (e = m$1.main.constructor), !e || typeof e._load != "function") return;
|
|
1056
|
+
let t = e._load, r = Object.getOwnPropertyDescriptor(e, "_load");
|
|
1057
|
+
this.originalDescriptors.push({
|
|
1058
|
+
target: e,
|
|
1059
|
+
prop: "_load",
|
|
1060
|
+
descriptor: r
|
|
1061
|
+
});
|
|
1062
|
+
let n = this.createBlockingProxy(t, "Module._load", "module_load");
|
|
1063
|
+
Object.defineProperty(e, "_load", {
|
|
1064
|
+
value: n,
|
|
1065
|
+
writable: !0,
|
|
1066
|
+
configurable: !0
|
|
1067
|
+
});
|
|
1068
|
+
} catch (e) {
|
|
1069
|
+
this.patchFailures.push("Module._load"), console.debug("[DefenseInDepthBox] Could not protect Module._load:", e instanceof Error ? e.message : e);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
protectModuleResolveFilename() {
|
|
1073
|
+
if (!f) try {
|
|
1074
|
+
let e = null;
|
|
1075
|
+
if (typeof process < "u") {
|
|
1076
|
+
let o = process.mainModule;
|
|
1077
|
+
o && typeof o == "object" && (e = o.constructor);
|
|
1078
|
+
}
|
|
1079
|
+
if (!e && typeof m$1 < "u" && typeof m$1.main < "u" && (e = m$1.main.constructor), !e || typeof e._resolveFilename != "function") return;
|
|
1080
|
+
let t = e._resolveFilename, r = Object.getOwnPropertyDescriptor(e, "_resolveFilename");
|
|
1081
|
+
this.originalDescriptors.push({
|
|
1082
|
+
target: e,
|
|
1083
|
+
prop: "_resolveFilename",
|
|
1084
|
+
descriptor: r
|
|
1085
|
+
});
|
|
1086
|
+
let n = this.createBlockingProxy(t, "Module._resolveFilename", "module_resolve_filename");
|
|
1087
|
+
Object.defineProperty(e, "_resolveFilename", {
|
|
1088
|
+
value: n,
|
|
1089
|
+
writable: !0,
|
|
1090
|
+
configurable: !0
|
|
1091
|
+
});
|
|
1092
|
+
} catch (e) {
|
|
1093
|
+
this.patchFailures.push("Module._resolveFilename"), console.debug("[DefenseInDepthBox] Could not protect Module._resolveFilename:", e instanceof Error ? e.message : e);
|
|
1094
|
+
}
|
|
1095
|
+
}
|
|
1096
|
+
applyPatch(e) {
|
|
1097
|
+
let { target: t, prop: r, violationType: s, strategy: n } = e;
|
|
1098
|
+
try {
|
|
1099
|
+
let o = t[r];
|
|
1100
|
+
if (o === void 0) return;
|
|
1101
|
+
let i = Object.getOwnPropertyDescriptor(t, r);
|
|
1102
|
+
if (this.originalDescriptors.push({
|
|
1103
|
+
target: t,
|
|
1104
|
+
prop: r,
|
|
1105
|
+
descriptor: i
|
|
1106
|
+
}), n === "freeze") typeof o == "object" && o !== null && Object.freeze(o);
|
|
1107
|
+
else {
|
|
1108
|
+
let c = this.getPathForTarget(t, r), l = typeof o == "function" ? this.createBlockingProxy(o, c, s) : this.createBlockingObjectProxy(o, c, s, e.allowedKeys);
|
|
1109
|
+
Object.defineProperty(t, r, {
|
|
1110
|
+
value: l,
|
|
1111
|
+
writable: !0,
|
|
1112
|
+
configurable: !0
|
|
1113
|
+
});
|
|
1114
|
+
}
|
|
1115
|
+
} catch (o) {
|
|
1116
|
+
let i = this.getPathForTarget(t, r);
|
|
1117
|
+
this.patchFailures.push(i), console.debug(`[DefenseInDepthBox] Could not patch ${i}:`, o instanceof Error ? o.message : o);
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
restorePatches() {
|
|
1121
|
+
for (let e = this.originalDescriptors.length - 1; e >= 0; e--) {
|
|
1122
|
+
let { target: t, prop: r, descriptor: s } = this.originalDescriptors[e];
|
|
1123
|
+
try {
|
|
1124
|
+
s ? Object.defineProperty(t, r, s) : delete t[r];
|
|
1125
|
+
} catch (n) {
|
|
1126
|
+
let o = this.getPathForTarget(t, r);
|
|
1127
|
+
console.debug(`[DefenseInDepthBox] Could not restore ${o}:`, n instanceof Error ? n.message : n);
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
this.originalDescriptors = [];
|
|
1131
|
+
}
|
|
1132
|
+
};
|
|
1133
|
+
//#endregion
|
|
1134
|
+
export { d as n, _ as t };
|
|
1135
|
+
|
|
1136
|
+
//# sourceMappingURL=chunk-TN7HHBQW-B8PYcKz5.mjs.map
|