just-bash 2.12.5 → 2.12.7
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/dist/banned-patterns-test.d.ts +0 -7
- package/dist/bin/chunks/{awk2-4MK3F3NZ.js → awk2-EB5SCHVW.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-ZRRNCS7N.js → chunks/chunk-5MUD3WB2.js} +1 -1
- package/dist/bin/chunks/{chunk-EMSJEY2U.js → chunk-BBRVF6XE.js} +1 -1
- package/dist/bin/chunks/chunk-DHFZMFUW.js +36 -0
- package/dist/bin/{shell/chunks/chunk-5ATRLST6.js → chunks/chunk-IRCLOW32.js} +1 -1
- package/dist/bin/{shell/chunks/chunk-UT6LUTWP.js → chunks/chunk-JX6YLHDX.js} +1 -1
- package/dist/bin/chunks/chunk-NTKUVXEL.js +5 -0
- package/dist/bin/chunks/{chunk-RDGXTKIB.js → chunk-OLN6BSO3.js} +1 -1
- package/dist/bin/chunks/chunk-PIBXJ3VX.js +13 -0
- package/dist/bin/chunks/chunk-PLKGKTIS.js +6 -0
- package/dist/bin/{shell/chunks/chunk-WWVVJW3F.js → chunks/chunk-QTII62YM.js} +1 -1
- package/dist/bin/chunks/{chunk-RS2PRILS.js → chunk-ROMKUVHI.js} +1 -1
- package/dist/bin/chunks/{chunk-2HDH5VPF.js → chunk-VCKKRS7V.js} +1 -1
- package/dist/bin/chunks/chunk-ZJGIBTWD.js +2 -0
- package/dist/bin/{shell/chunks/chunk-6W7JTG6A.js → chunks/chunk-ZNPXCE5B.js} +99 -99
- package/dist/bin/{shell/chunks/curl-GIQ5S66Y.js → chunks/curl-3GMIPMCI.js} +1 -1
- package/dist/bin/{shell/chunks/flag-coverage-NDF6MQAO.js → chunks/flag-coverage-7GOZYXJT.js} +1 -1
- package/dist/bin/{shell/chunks/jq-F7FJ46VM.js → chunks/jq-P457LMHU.js} +1 -1
- package/dist/bin/chunks/{python3-QBGIYRFR.js → python3-45TMCI4M.js} +7 -7
- package/dist/bin/{shell/chunks/sed-ENUQOCBB.js → chunks/sed-UV2LTNVK.js} +1 -1
- package/dist/bin/chunks/sleep-3WHM7JMW.js +2 -0
- package/dist/bin/{shell/chunks/sqlite3-4SBQACEE.js → chunks/sqlite3-B3P3OMPI.js} +1 -1
- package/dist/bin/chunks/tar-SO3XDDIW.js +2 -0
- package/dist/bin/chunks/timeout-BYB3L2JA.js +2 -0
- package/dist/bin/chunks/worker.js +155 -14
- package/dist/bin/chunks/xan-FZB7FHX3.js +2 -0
- package/dist/bin/chunks/yq-H7D2U3HS.js +2 -0
- package/dist/bin/just-bash.js +125 -125
- package/dist/bin/shell/chunks/{awk2-4MK3F3NZ.js → awk2-EB5SCHVW.js} +1 -1
- package/dist/bin/{chunks/chunk-ZRRNCS7N.js → shell/chunks/chunk-5MUD3WB2.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-EMSJEY2U.js → chunk-BBRVF6XE.js} +1 -1
- package/dist/bin/shell/chunks/chunk-DHFZMFUW.js +36 -0
- package/dist/bin/{chunks/chunk-5ATRLST6.js → shell/chunks/chunk-IRCLOW32.js} +1 -1
- package/dist/bin/{chunks/chunk-UT6LUTWP.js → shell/chunks/chunk-JX6YLHDX.js} +1 -1
- package/dist/bin/shell/chunks/chunk-NTKUVXEL.js +5 -0
- package/dist/bin/shell/chunks/{chunk-RDGXTKIB.js → chunk-OLN6BSO3.js} +1 -1
- package/dist/bin/shell/chunks/chunk-PIBXJ3VX.js +13 -0
- package/dist/bin/shell/chunks/chunk-PLKGKTIS.js +6 -0
- package/dist/bin/{chunks/chunk-WWVVJW3F.js → shell/chunks/chunk-QTII62YM.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-RS2PRILS.js → chunk-ROMKUVHI.js} +1 -1
- package/dist/bin/shell/chunks/{chunk-2HDH5VPF.js → chunk-VCKKRS7V.js} +1 -1
- package/dist/bin/shell/chunks/chunk-ZJGIBTWD.js +2 -0
- package/dist/bin/{chunks/chunk-6W7JTG6A.js → shell/chunks/chunk-ZNPXCE5B.js} +99 -99
- package/dist/bin/{chunks/curl-GIQ5S66Y.js → shell/chunks/curl-3GMIPMCI.js} +1 -1
- package/dist/bin/{chunks/flag-coverage-NDF6MQAO.js → shell/chunks/flag-coverage-7GOZYXJT.js} +1 -1
- package/dist/bin/{chunks/jq-F7FJ46VM.js → shell/chunks/jq-P457LMHU.js} +1 -1
- package/dist/bin/shell/chunks/{python3-XN7O5X3A.js → python3-IV3DBMHM.js} +7 -7
- package/dist/bin/{chunks/sed-ENUQOCBB.js → shell/chunks/sed-UV2LTNVK.js} +1 -1
- package/dist/bin/shell/chunks/sleep-3WHM7JMW.js +2 -0
- package/dist/bin/{chunks/sqlite3-4SBQACEE.js → shell/chunks/sqlite3-B3P3OMPI.js} +1 -1
- package/dist/bin/shell/chunks/tar-SO3XDDIW.js +2 -0
- package/dist/bin/shell/chunks/timeout-BYB3L2JA.js +2 -0
- package/dist/bin/shell/chunks/xan-FZB7FHX3.js +2 -0
- package/dist/bin/shell/chunks/yq-H7D2U3HS.js +2 -0
- package/dist/bin/shell/shell.js +124 -124
- package/dist/bundle/browser.js +503 -503
- package/dist/bundle/chunks/{awk2-ID6QVUYU.js → awk2-VPBKDCSO.js} +1 -1
- package/dist/bundle/chunks/{chunk-CBAJ47B3.js → chunk-4YPFHVJJ.js} +1 -1
- package/dist/bundle/chunks/{chunk-3ZBKQKTX.js → chunk-6HBBXB3L.js} +1 -1
- package/dist/bundle/chunks/chunk-72EQZSVH.js +4 -0
- package/dist/bundle/chunks/{chunk-SJ5LXPUH.js → chunk-7YDOWJ75.js} +1 -1
- package/dist/bundle/chunks/chunk-AUD37QB3.js +35 -0
- package/dist/bundle/chunks/{chunk-TVHAURH5.js → chunk-BED5HSP2.js} +1 -1
- package/dist/bundle/chunks/{chunk-3J4BCKUH.js → chunk-C7ZTXK5C.js} +99 -99
- package/dist/bundle/chunks/chunk-DZZS6SJP.js +1 -0
- package/dist/bundle/chunks/chunk-KZ7BI7TV.js +5 -0
- package/dist/bundle/chunks/chunk-U5FWK6IA.js +12 -0
- package/dist/bundle/chunks/{chunk-HOFSUCIB.js → chunk-VBF2GWEM.js} +1 -1
- package/dist/bundle/chunks/{chunk-AYQ5FKKK.js → chunk-VSWTMNI3.js} +1 -1
- package/dist/bundle/chunks/{chunk-L75XCEQX.js → chunk-X36DXRVC.js} +1 -1
- package/dist/bundle/chunks/{chunk-2OZNLYX4.js → chunk-X3CVFNQZ.js} +1 -1
- package/dist/bundle/chunks/{curl-743M564K.js → curl-KM2ZAUR6.js} +1 -1
- package/dist/bundle/chunks/{flag-coverage-4M54QHNZ.js → flag-coverage-NT32EG6Q.js} +1 -1
- package/dist/bundle/chunks/{jq-5FRYP6YP.js → jq-NLRWI2Q6.js} +1 -1
- package/dist/bundle/chunks/{python3-WANWDR22.js → python3-G2ZUJAQL.js} +7 -7
- package/dist/bundle/chunks/{sed-TS7M7I25.js → sed-2BILOGNL.js} +1 -1
- package/dist/bundle/chunks/sleep-IUBP5GMH.js +1 -0
- package/dist/bundle/chunks/{sqlite3-IH5QMEIK.js → sqlite3-VEDNWJL6.js} +1 -1
- package/dist/bundle/chunks/tar-LKO7DKAK.js +1 -0
- package/dist/bundle/chunks/timeout-TL4Q5YKZ.js +1 -0
- package/dist/bundle/chunks/worker.js +155 -14
- package/dist/bundle/chunks/xan-KSDYKKEK.js +1 -0
- package/dist/bundle/chunks/yq-HIQ4WMDY.js +1 -0
- package/dist/bundle/index.cjs +717 -717
- package/dist/bundle/index.js +111 -111
- package/dist/commands/python3/worker.d.ts +1 -0
- package/dist/commands/query-engine/safe-object.d.ts +13 -0
- package/dist/commands/sqlite3/worker.d.ts +1 -0
- package/dist/network/allow-list/shared.d.ts +4 -0
- package/dist/network/types.d.ts +5 -1
- package/package.json +34 -34
- package/vendor/cpython-emscripten/python.wasm +0 -0
- package/dist/bin/chunks/chunk-DERQIX2O.js +0 -36
- package/dist/bin/chunks/chunk-LWKIHJ5L.js +0 -13
- package/dist/bin/chunks/chunk-Q5MYEU7X.js +0 -5
- package/dist/bin/chunks/chunk-UYBH3FNE.js +0 -2
- package/dist/bin/chunks/chunk-W752QGNZ.js +0 -6
- package/dist/bin/chunks/sleep-5T34UFNF.js +0 -2
- package/dist/bin/chunks/tar-3UIZ4IRM.js +0 -2
- package/dist/bin/chunks/timeout-7ECKKPNP.js +0 -2
- package/dist/bin/chunks/xan-5QTBTP4U.js +0 -2
- package/dist/bin/chunks/yq-O5RSLLA3.js +0 -2
- package/dist/bin/shell/chunks/chunk-DERQIX2O.js +0 -36
- package/dist/bin/shell/chunks/chunk-LWKIHJ5L.js +0 -13
- package/dist/bin/shell/chunks/chunk-Q5MYEU7X.js +0 -5
- package/dist/bin/shell/chunks/chunk-UYBH3FNE.js +0 -2
- package/dist/bin/shell/chunks/chunk-W752QGNZ.js +0 -6
- package/dist/bin/shell/chunks/sleep-5T34UFNF.js +0 -2
- package/dist/bin/shell/chunks/tar-3UIZ4IRM.js +0 -2
- package/dist/bin/shell/chunks/timeout-7ECKKPNP.js +0 -2
- package/dist/bin/shell/chunks/xan-5QTBTP4U.js +0 -2
- package/dist/bin/shell/chunks/yq-O5RSLLA3.js +0 -2
- package/dist/bundle/chunks/chunk-7MKBHGLS.js +0 -1
- package/dist/bundle/chunks/chunk-C764MECG.js +0 -35
- package/dist/bundle/chunks/chunk-FD7SFJNJ.js +0 -4
- package/dist/bundle/chunks/chunk-QI4EPYAT.js +0 -5
- package/dist/bundle/chunks/chunk-R5XRHEZH.js +0 -12
- package/dist/bundle/chunks/sleep-RRZXXEW2.js +0 -1
- package/dist/bundle/chunks/tar-JCULQ5J2.js +0 -1
- package/dist/bundle/chunks/timeout-DNGO7OHT.js +0 -1
- package/dist/bundle/chunks/xan-LAW2EMOM.js +0 -1
- package/dist/bundle/chunks/yq-MFJEXB7R.js +0 -1
|
@@ -169,6 +169,34 @@ function getBlockedGlobals() {
|
|
|
169
169
|
strategy: "throw",
|
|
170
170
|
reason: "process.setgid could escalate privileges"
|
|
171
171
|
},
|
|
172
|
+
{
|
|
173
|
+
prop: "seteuid",
|
|
174
|
+
target: process,
|
|
175
|
+
violationType: "process_setuid",
|
|
176
|
+
strategy: "throw",
|
|
177
|
+
reason: "process.seteuid could escalate effective user privileges"
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
prop: "setegid",
|
|
181
|
+
target: process,
|
|
182
|
+
violationType: "process_setuid",
|
|
183
|
+
strategy: "throw",
|
|
184
|
+
reason: "process.setegid could escalate effective group privileges"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
prop: "initgroups",
|
|
188
|
+
target: process,
|
|
189
|
+
violationType: "process_setuid",
|
|
190
|
+
strategy: "throw",
|
|
191
|
+
reason: "process.initgroups could modify supplementary group IDs"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
prop: "setgroups",
|
|
195
|
+
target: process,
|
|
196
|
+
violationType: "process_setuid",
|
|
197
|
+
strategy: "throw",
|
|
198
|
+
reason: "process.setgroups could modify supplementary group IDs"
|
|
199
|
+
},
|
|
172
200
|
// File permission manipulation
|
|
173
201
|
{
|
|
174
202
|
prop: "umask",
|
|
@@ -205,6 +233,30 @@ function getBlockedGlobals() {
|
|
|
205
233
|
strategy: "throw",
|
|
206
234
|
reason: "process.chdir could confuse the interpreter's CWD tracking"
|
|
207
235
|
},
|
|
236
|
+
// Diagnostic report (leaks full environment, host paths, system info)
|
|
237
|
+
{
|
|
238
|
+
prop: "report",
|
|
239
|
+
target: process,
|
|
240
|
+
violationType: "process_report",
|
|
241
|
+
strategy: "throw",
|
|
242
|
+
reason: "process.report could disclose full environment, host paths, and system info"
|
|
243
|
+
},
|
|
244
|
+
// Environment file loading (Node 21.7+)
|
|
245
|
+
{
|
|
246
|
+
prop: "loadEnvFile",
|
|
247
|
+
target: process,
|
|
248
|
+
violationType: "process_env",
|
|
249
|
+
strategy: "throw",
|
|
250
|
+
reason: "process.loadEnvFile could load env files bypassing env proxy"
|
|
251
|
+
},
|
|
252
|
+
// Exception handler manipulation
|
|
253
|
+
{
|
|
254
|
+
prop: "setUncaughtExceptionCaptureCallback",
|
|
255
|
+
target: process,
|
|
256
|
+
violationType: "process_exception_handler",
|
|
257
|
+
strategy: "throw",
|
|
258
|
+
reason: "setUncaughtExceptionCaptureCallback could intercept security errors"
|
|
259
|
+
},
|
|
208
260
|
// IPC communication vectors (may be undefined in non-IPC contexts)
|
|
209
261
|
{
|
|
210
262
|
prop: "send",
|
|
@@ -818,6 +870,42 @@ var WorkerDefenseInDepth = class {
|
|
|
818
870
|
if (!excludeTypes.has("process_connected")) {
|
|
819
871
|
this.protectProcessConnected();
|
|
820
872
|
}
|
|
873
|
+
this.lockWellKnownSymbols();
|
|
874
|
+
}
|
|
875
|
+
/**
|
|
876
|
+
* Lock well-known Symbol properties on built-in constructors/prototypes.
|
|
877
|
+
*/
|
|
878
|
+
lockWellKnownSymbols() {
|
|
879
|
+
const lock = (obj, sym) => {
|
|
880
|
+
try {
|
|
881
|
+
const desc = Object.getOwnPropertyDescriptor(obj, sym);
|
|
882
|
+
if (desc?.configurable) {
|
|
883
|
+
if ("value" in desc) {
|
|
884
|
+
Object.defineProperty(obj, sym, {
|
|
885
|
+
...desc,
|
|
886
|
+
configurable: false,
|
|
887
|
+
writable: false
|
|
888
|
+
});
|
|
889
|
+
return;
|
|
890
|
+
}
|
|
891
|
+
Object.defineProperty(obj, sym, { ...desc, configurable: false });
|
|
892
|
+
}
|
|
893
|
+
} catch {
|
|
894
|
+
}
|
|
895
|
+
};
|
|
896
|
+
for (const ctor of [Array, Map, Set, RegExp, Promise]) {
|
|
897
|
+
lock(ctor, Symbol.species);
|
|
898
|
+
}
|
|
899
|
+
for (const proto of [
|
|
900
|
+
Array.prototype,
|
|
901
|
+
String.prototype,
|
|
902
|
+
Map.prototype,
|
|
903
|
+
Set.prototype
|
|
904
|
+
]) {
|
|
905
|
+
lock(proto, Symbol.iterator);
|
|
906
|
+
}
|
|
907
|
+
lock(Symbol.prototype, Symbol.toPrimitive);
|
|
908
|
+
lock(Date.prototype, Symbol.toPrimitive);
|
|
821
909
|
}
|
|
822
910
|
/**
|
|
823
911
|
* Protect against .constructor.constructor escape vector.
|
|
@@ -1814,6 +1902,26 @@ var SyncFsBackend = class {
|
|
|
1814
1902
|
// src/commands/python3/worker.ts
|
|
1815
1903
|
import { readFileSync } from "node:fs";
|
|
1816
1904
|
var require2 = createRequire(import.meta.url);
|
|
1905
|
+
var CPYTHON_ENTRY_BASENAME = "/vendor/cpython-emscripten/python.cjs";
|
|
1906
|
+
var CPYTHON_STDLIB_BASENAME = "/vendor/cpython-emscripten/python313.zip";
|
|
1907
|
+
var moduleLoadGuardInstalled = false;
|
|
1908
|
+
function normalizePath(path) {
|
|
1909
|
+
return path.replace(/\\/g, "/");
|
|
1910
|
+
}
|
|
1911
|
+
function isApprovedCpythonEntryPath(path) {
|
|
1912
|
+
return normalizePath(path).endsWith(CPYTHON_ENTRY_BASENAME);
|
|
1913
|
+
}
|
|
1914
|
+
function isApprovedStdlibZipPath(path) {
|
|
1915
|
+
return normalizePath(path).endsWith(CPYTHON_STDLIB_BASENAME);
|
|
1916
|
+
}
|
|
1917
|
+
function assertApprovedPath(path, kind) {
|
|
1918
|
+
const ok = kind === "cpython-entry" ? isApprovedCpythonEntryPath(path) : isApprovedStdlibZipPath(path);
|
|
1919
|
+
if (!ok) {
|
|
1920
|
+
throw new Error(
|
|
1921
|
+
`[Defense-in-depth] rejected ${kind} path outside approved vendor bundle: ${path}`
|
|
1922
|
+
);
|
|
1923
|
+
}
|
|
1924
|
+
}
|
|
1817
1925
|
try {
|
|
1818
1926
|
const NodeModule = require2("node:module");
|
|
1819
1927
|
if (typeof NodeModule._load === "function") {
|
|
@@ -1854,18 +1962,22 @@ try {
|
|
|
1854
1962
|
}
|
|
1855
1963
|
return originalLoad.apply(this, [request, ...rest]);
|
|
1856
1964
|
};
|
|
1965
|
+
moduleLoadGuardInstalled = true;
|
|
1857
1966
|
}
|
|
1858
1967
|
} catch {
|
|
1859
1968
|
}
|
|
1860
|
-
var
|
|
1969
|
+
var cpythonEntryPath;
|
|
1861
1970
|
try {
|
|
1862
|
-
|
|
1863
|
-
|
|
1971
|
+
cpythonEntryPath = require2.resolve(
|
|
1972
|
+
"../../../vendor/cpython-emscripten/python.cjs"
|
|
1864
1973
|
);
|
|
1865
1974
|
} catch (_e) {
|
|
1866
|
-
|
|
1975
|
+
cpythonEntryPath = dirname(import.meta.url).replace("file://", "") + "/../../../vendor/cpython-emscripten/python.cjs";
|
|
1867
1976
|
}
|
|
1977
|
+
assertApprovedPath(cpythonEntryPath, "cpython-entry");
|
|
1978
|
+
var cpythonDir = dirname(cpythonEntryPath);
|
|
1868
1979
|
var stdlibZipPath = `${cpythonDir}/python313.zip`;
|
|
1980
|
+
assertApprovedPath(stdlibZipPath, "cpython-stdlib");
|
|
1869
1981
|
function createHOSTFS(backend, FS, PATH) {
|
|
1870
1982
|
const ERRNO_CODES = {
|
|
1871
1983
|
EPERM: 63,
|
|
@@ -2641,9 +2753,22 @@ sys.modules['jb_http'] = jb_http
|
|
|
2641
2753
|
`;
|
|
2642
2754
|
}
|
|
2643
2755
|
var cachedStdlibZip = new Uint8Array(readFileSync(stdlibZipPath));
|
|
2644
|
-
function
|
|
2756
|
+
function wrapWorkerMessage(protocolToken, message) {
|
|
2757
|
+
const wrapped = /* @__PURE__ */ Object.create(null);
|
|
2758
|
+
if (!message || typeof message !== "object") {
|
|
2759
|
+
wrapped.success = false;
|
|
2760
|
+
wrapped.error = "Worker attempted to post non-object message";
|
|
2761
|
+
wrapped.protocolToken = protocolToken;
|
|
2762
|
+
return wrapped;
|
|
2763
|
+
}
|
|
2764
|
+
for (const [key, value] of Object.entries(message))
|
|
2765
|
+
wrapped[key] = value;
|
|
2766
|
+
wrapped.protocolToken = protocolToken;
|
|
2767
|
+
return wrapped;
|
|
2768
|
+
}
|
|
2769
|
+
function postWorkerMessage(protocolToken, message) {
|
|
2645
2770
|
try {
|
|
2646
|
-
parentPort?.postMessage(message);
|
|
2771
|
+
parentPort?.postMessage(wrapWorkerMessage(protocolToken, message));
|
|
2647
2772
|
} catch (error) {
|
|
2648
2773
|
console.debug(
|
|
2649
2774
|
"[python3-worker] failed to post worker message:",
|
|
@@ -2652,8 +2777,15 @@ function postWorkerMessage(message) {
|
|
|
2652
2777
|
}
|
|
2653
2778
|
}
|
|
2654
2779
|
async function runPython(input) {
|
|
2780
|
+
if (!moduleLoadGuardInstalled) {
|
|
2781
|
+
return {
|
|
2782
|
+
success: false,
|
|
2783
|
+
error: "Defense-in-depth module-loader guard failed to initialize; refusing to execute Python worker"
|
|
2784
|
+
};
|
|
2785
|
+
}
|
|
2655
2786
|
const backend = new SyncFsBackend(input.sharedBuffer);
|
|
2656
|
-
|
|
2787
|
+
assertApprovedPath(cpythonEntryPath, "cpython-entry");
|
|
2788
|
+
const createPythonModule = require2(cpythonEntryPath);
|
|
2657
2789
|
let moduleReady = false;
|
|
2658
2790
|
const pendingStdout = [];
|
|
2659
2791
|
const pendingStderr = [];
|
|
@@ -2711,7 +2843,7 @@ async function runPython(input) {
|
|
|
2711
2843
|
error: `Failed to load CPython: ${message}`
|
|
2712
2844
|
};
|
|
2713
2845
|
}
|
|
2714
|
-
activateDefense();
|
|
2846
|
+
activateDefense(input.protocolToken);
|
|
2715
2847
|
moduleReady = true;
|
|
2716
2848
|
for (const text of pendingStdout) backend.writeStdout(text);
|
|
2717
2849
|
for (const text of pendingStderr) backend.writeStderr(text);
|
|
@@ -2775,7 +2907,7 @@ sys.exit(_jb_exit_code)
|
|
|
2775
2907
|
}
|
|
2776
2908
|
}
|
|
2777
2909
|
var defense = null;
|
|
2778
|
-
function activateDefense() {
|
|
2910
|
+
function activateDefense(protocolToken) {
|
|
2779
2911
|
if (defense) return;
|
|
2780
2912
|
const _DateNow = Date.now;
|
|
2781
2913
|
const degraded = { now: () => _DateNow(), timeOrigin: _DateNow() };
|
|
@@ -2788,7 +2920,10 @@ function activateDefense() {
|
|
|
2788
2920
|
"python3-worker",
|
|
2789
2921
|
"onViolation",
|
|
2790
2922
|
(v) => {
|
|
2791
|
-
postWorkerMessage(
|
|
2923
|
+
postWorkerMessage(protocolToken, {
|
|
2924
|
+
type: "security-violation",
|
|
2925
|
+
violation: v
|
|
2926
|
+
});
|
|
2792
2927
|
}
|
|
2793
2928
|
);
|
|
2794
2929
|
defense = new WorkerDefenseInDepth({
|
|
@@ -2805,20 +2940,26 @@ function activateDefense() {
|
|
|
2805
2940
|
});
|
|
2806
2941
|
}
|
|
2807
2942
|
process.on("uncaughtException", (e) => {
|
|
2943
|
+
if (!activeProtocolToken) {
|
|
2944
|
+
return;
|
|
2945
|
+
}
|
|
2808
2946
|
const message = sanitizeErrorMessage(e.message);
|
|
2809
|
-
postWorkerMessage({
|
|
2947
|
+
postWorkerMessage(activeProtocolToken, {
|
|
2810
2948
|
success: false,
|
|
2811
2949
|
error: `Worker uncaught exception: ${message}`
|
|
2812
2950
|
});
|
|
2813
2951
|
});
|
|
2952
|
+
var activeProtocolToken = null;
|
|
2814
2953
|
if (parentPort) {
|
|
2815
2954
|
if (workerData) {
|
|
2816
|
-
|
|
2955
|
+
const input = workerData;
|
|
2956
|
+
activeProtocolToken = input.protocolToken;
|
|
2957
|
+
runPython(input).then((result) => {
|
|
2817
2958
|
result.defenseStats = defense?.getStats();
|
|
2818
|
-
postWorkerMessage(result);
|
|
2959
|
+
postWorkerMessage(input.protocolToken, result);
|
|
2819
2960
|
}).catch((e) => {
|
|
2820
2961
|
const message = sanitizeUnknownError(e);
|
|
2821
|
-
postWorkerMessage({
|
|
2962
|
+
postWorkerMessage(input.protocolToken, {
|
|
2822
2963
|
success: false,
|
|
2823
2964
|
error: message,
|
|
2824
2965
|
defenseStats: defense?.getStats()
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-4YPFHVJJ.js";import"./chunk-F55TLFGB.js";import"./chunk-SYMJJMQ4.js";import"./chunk-KZ7BI7TV.js";import"./chunk-DZZS6SJP.js";import"./chunk-OJDRYQWQ.js";import"./chunk-X36DXRVC.js";import"./chunk-72EQZSVH.js";import"./chunk-YNYSPYQ5.js";import"./chunk-7L36YK2X.js";import"./chunk-GFQRA5P5.js";import"./chunk-NUFRM6SI.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as xanCommand};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-C7ZTXK5C.js";import"./chunk-SYMJJMQ4.js";import"./chunk-KZ7BI7TV.js";import"./chunk-DZZS6SJP.js";import"./chunk-OJDRYQWQ.js";import"./chunk-X36DXRVC.js";import"./chunk-72EQZSVH.js";import"./chunk-YNYSPYQ5.js";import"./chunk-GFQRA5P5.js";import"./chunk-CCNMISUL.js";import"./chunk-74CEPOFO.js";import"./chunk-DXB73IDG.js";export{b as flagsForFuzzing,a as yqCommand};
|