@coana-tech/cli 14.12.174 → 14.12.175
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/cli.mjs +1 -1
- package/package.json +1 -1
- package/reachability-analyzers-cli.mjs +1 -1
- package/repos/coana-tech/goana/bin/goana-darwin-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-darwin-arm64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-amd64.gz +0 -0
- package/repos/coana-tech/goana/bin/goana-linux-arm64.gz +0 -0
- package/repos/coana-tech/javap-service/javap-service.jar +0 -0
- package/repos/coana-tech/jelly-private/dist/bundle/approx.js +3 -3
- package/repos/coana-tech/jelly-private/dist/bundle/{chunk-USUJB4DB.js → chunk-6YZBCEC5.js} +2 -2
- package/repos/coana-tech/jelly-private/dist/bundle/{chunk-2EM22I7M.js → chunk-B4YMLUZ5.js} +2 -2
- package/repos/coana-tech/jelly-private/dist/bundle/{chunk-ZYU33ERK.js → chunk-B76EIOV4.js} +2 -2
- package/repos/coana-tech/jelly-private/dist/bundle/{chunk-NHEUSYVH.js → chunk-LFEVD6IY.js} +2 -19
- package/repos/coana-tech/jelly-private/dist/bundle/hooks.js +3 -3
- package/repos/coana-tech/jelly-private/dist/bundle/jelly.js +68 -53
- package/repos/coana-tech/mambalade/dist/mambalade-0.3.20-py3-none-any.whl +0 -0
package/cli.mjs
CHANGED
|
@@ -251421,7 +251421,7 @@ async function onlineScan(dependencyTree, apiKey, timeout) {
|
|
|
251421
251421
|
}
|
|
251422
251422
|
|
|
251423
251423
|
// dist/version.js
|
|
251424
|
-
var version3 = "14.12.
|
|
251424
|
+
var version3 = "14.12.175";
|
|
251425
251425
|
|
|
251426
251426
|
// dist/cli-core.js
|
|
251427
251427
|
var { mapValues, omit, partition, pickBy: pickBy2 } = import_lodash15.default;
|
package/package.json
CHANGED
|
@@ -111209,7 +111209,7 @@ var JSCodeAwareVulnerabilityScanner = class _JSCodeAwareVulnerabilityScanner {
|
|
|
111209
111209
|
analysisOptionsFromHeuristic.approx = process.env.JELLY_APPROX === "true" || experiment === "JELLY_APPROX";
|
|
111210
111210
|
const analysisRes = await runJellyAnalysis(this.mainProjectDir, this.projectDir, analysisOptionsFromHeuristic, this.options, timeoutInSeconds, vulnerabilities, experiment, telemetryHandler, analyzerTelemetryHandler);
|
|
111211
111211
|
const { analysisDiagnostics: diagnostics, matches } = analysisRes;
|
|
111212
|
-
const terminatedEarly = diagnostics.aborted || diagnostics.timeout || diagnostics.lowmemory;
|
|
111212
|
+
const terminatedEarly = diagnostics.aborted || diagnostics.timeout || diagnostics.lowmemory || diagnostics.rangeError;
|
|
111213
111213
|
return {
|
|
111214
111214
|
type: "success",
|
|
111215
111215
|
diagnostics,
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -7,11 +7,11 @@ import "./iterator-helpers-polyfill.js";
|
|
|
7
7
|
import {
|
|
8
8
|
require_hints,
|
|
9
9
|
require_parser
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-B4YMLUZ5.js";
|
|
11
11
|
import {
|
|
12
12
|
require_proxy,
|
|
13
13
|
require_sandbox
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-6YZBCEC5.js";
|
|
15
15
|
import {
|
|
16
16
|
__commonJS,
|
|
17
17
|
__name,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
require_options,
|
|
22
22
|
require_transform,
|
|
23
23
|
require_util
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-LFEVD6IY.js";
|
|
25
25
|
|
|
26
26
|
// lib/approx/approx.js
|
|
27
27
|
var require_approx = __commonJS({
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
__name,
|
|
10
10
|
__require,
|
|
11
11
|
require_transform
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LFEVD6IY.js";
|
|
13
13
|
|
|
14
14
|
// lib/approx/proxy.js
|
|
15
15
|
var require_proxy = __commonJS({
|
|
@@ -268,4 +268,4 @@ export {
|
|
|
268
268
|
require_proxy,
|
|
269
269
|
require_sandbox
|
|
270
270
|
};
|
|
271
|
-
//# sourceMappingURL=chunk-
|
|
271
|
+
//# sourceMappingURL=chunk-6YZBCEC5.js.map
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
require_options,
|
|
15
15
|
require_tokens,
|
|
16
16
|
require_util
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-LFEVD6IY.js";
|
|
18
18
|
|
|
19
19
|
// lib/parsing/parser.js
|
|
20
20
|
var require_parser = __commonJS({
|
|
@@ -516,4 +516,4 @@ export {
|
|
|
516
516
|
require_patching,
|
|
517
517
|
require_hints
|
|
518
518
|
};
|
|
519
|
-
//# sourceMappingURL=chunk-
|
|
519
|
+
//# sourceMappingURL=chunk-B4YMLUZ5.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
__commonJS,
|
|
9
9
|
__name,
|
|
10
10
|
__require
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LFEVD6IY.js";
|
|
12
12
|
|
|
13
13
|
// node_modules/source-map/lib/base64.js
|
|
14
14
|
var require_base64 = __commonJS({
|
|
@@ -224380,4 +224380,4 @@ typescript/lib/typescript.js:
|
|
|
224380
224380
|
and limitations under the License.
|
|
224381
224381
|
***************************************************************************** *)
|
|
224382
224382
|
*/
|
|
224383
|
-
//# sourceMappingURL=chunk-
|
|
224383
|
+
//# sourceMappingURL=chunk-B76EIOV4.js.map
|
|
@@ -14470,7 +14470,7 @@ var require_constraintvars = __commonJS({
|
|
|
14470
14470
|
return mod && mod.__esModule ? mod : { "default": mod };
|
|
14471
14471
|
};
|
|
14472
14472
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14473
|
-
exports.
|
|
14473
|
+
exports.ReadResultVar = exports.AncestorsVar = exports.IntermediateVar = exports.ArgumentsVar = exports.ThisVar = exports.FunctionReturnVar = exports.ObjectPropertyVar = exports.NodeVar = exports.ConstraintVar = void 0;
|
|
14474
14474
|
exports.isObjectPropertyVarObj = isObjectPropertyVarObj;
|
|
14475
14475
|
var types_1 = __require("@babel/types");
|
|
14476
14476
|
var util_1 = require_util();
|
|
@@ -14659,23 +14659,6 @@ var require_constraintvars = __commonJS({
|
|
|
14659
14659
|
}
|
|
14660
14660
|
};
|
|
14661
14661
|
exports.ReadResultVar = ReadResultVar;
|
|
14662
|
-
var CallbackReceiverVar = class extends ConstraintVar {
|
|
14663
|
-
static {
|
|
14664
|
-
__name(this, "CallbackReceiverVar");
|
|
14665
|
-
}
|
|
14666
|
-
fun;
|
|
14667
|
-
constructor(fun) {
|
|
14668
|
-
super();
|
|
14669
|
-
this.fun = fun;
|
|
14670
|
-
}
|
|
14671
|
-
toString() {
|
|
14672
|
-
return `CallbackReceiver[${(0, util_1.locationToStringWithFileAndEnd)(this.fun.loc, true)}]`;
|
|
14673
|
-
}
|
|
14674
|
-
getParent() {
|
|
14675
|
-
return this.fun;
|
|
14676
|
-
}
|
|
14677
|
-
};
|
|
14678
|
-
exports.CallbackReceiverVar = CallbackReceiverVar;
|
|
14679
14662
|
}
|
|
14680
14663
|
});
|
|
14681
14664
|
|
|
@@ -19940,4 +19923,4 @@ fill-range/index.js:
|
|
|
19940
19923
|
* Licensed under the MIT License.
|
|
19941
19924
|
*)
|
|
19942
19925
|
*/
|
|
19943
|
-
//# sourceMappingURL=chunk-
|
|
19926
|
+
//# sourceMappingURL=chunk-LFEVD6IY.js.map
|
|
@@ -6,10 +6,10 @@ import "./iterator-helpers-polyfill.js";
|
|
|
6
6
|
|
|
7
7
|
import {
|
|
8
8
|
require_moduleresolver
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-B76EIOV4.js";
|
|
10
10
|
import {
|
|
11
11
|
require_sandbox
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6YZBCEC5.js";
|
|
13
13
|
import {
|
|
14
14
|
__commonJS,
|
|
15
15
|
__name,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
require_files,
|
|
18
18
|
require_options,
|
|
19
19
|
require_transform
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-LFEVD6IY.js";
|
|
21
21
|
|
|
22
22
|
// lib/approx/hooks.js
|
|
23
23
|
var require_hooks = __commonJS({
|
|
@@ -9,11 +9,11 @@ import {
|
|
|
9
9
|
require_hints,
|
|
10
10
|
require_parser,
|
|
11
11
|
require_patching
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-B4YMLUZ5.js";
|
|
13
13
|
import {
|
|
14
14
|
require_moduleresolver,
|
|
15
15
|
require_typescript
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-B76EIOV4.js";
|
|
17
17
|
import {
|
|
18
18
|
__commonJS,
|
|
19
19
|
__name,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
require_tokens,
|
|
38
38
|
require_transform,
|
|
39
39
|
require_util
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-LFEVD6IY.js";
|
|
41
41
|
|
|
42
42
|
// lib/misc/timer.js
|
|
43
43
|
var require_timer = __commonJS({
|
|
@@ -1515,9 +1515,6 @@ var require_constraintvarproducer = __commonJS({
|
|
|
1515
1515
|
readResultVar(t, prop) {
|
|
1516
1516
|
return this.a.canonicalizeVar(new constraintvars_1.ReadResultVar(t, prop));
|
|
1517
1517
|
}
|
|
1518
|
-
callbackReceiverVar(fun) {
|
|
1519
|
-
return this.a.vulnerabilities?.hasCallbackArgumentPattern ? this.a.canonicalizeVar(new constraintvars_1.CallbackReceiverVar(fun)) : void 0;
|
|
1520
|
-
}
|
|
1521
1518
|
};
|
|
1522
1519
|
exports.ConstraintVarProducer = ConstraintVarProducer;
|
|
1523
1520
|
}
|
|
@@ -1528,36 +1525,45 @@ var require_large_array = __commonJS({
|
|
|
1528
1525
|
"lib/misc/large-array.js"(exports) {
|
|
1529
1526
|
"use strict";
|
|
1530
1527
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1531
|
-
exports.
|
|
1528
|
+
exports.LargeTupleArray = void 0;
|
|
1532
1529
|
var MAX_CHUNK_SIZE = 1 << 25;
|
|
1533
|
-
var
|
|
1530
|
+
var LargeTupleArray = class _LargeTupleArray {
|
|
1534
1531
|
static {
|
|
1535
|
-
__name(this, "
|
|
1532
|
+
__name(this, "LargeTupleArray");
|
|
1536
1533
|
}
|
|
1537
|
-
chunks = [[]];
|
|
1534
|
+
chunks = [[[], []]];
|
|
1538
1535
|
_size = 0;
|
|
1539
1536
|
get length() {
|
|
1540
1537
|
return this._size;
|
|
1541
1538
|
}
|
|
1542
1539
|
set length(_value) {
|
|
1543
1540
|
this.chunks.length = 0;
|
|
1544
|
-
this.chunks.push([]);
|
|
1541
|
+
this.chunks.push([[], []]);
|
|
1545
1542
|
this._size = 0;
|
|
1546
1543
|
}
|
|
1547
|
-
push(
|
|
1548
|
-
const
|
|
1549
|
-
if (
|
|
1550
|
-
this.chunks.push([
|
|
1544
|
+
push(fst, snd) {
|
|
1545
|
+
const [fsts, snds] = this.chunks[this.chunks.length - 1];
|
|
1546
|
+
if (fsts.length >= MAX_CHUNK_SIZE)
|
|
1547
|
+
this.chunks.push([[fst], [snd]]);
|
|
1551
1548
|
else
|
|
1552
|
-
|
|
1549
|
+
fsts.push(fst), snds.push(snd);
|
|
1553
1550
|
this._size++;
|
|
1554
1551
|
}
|
|
1555
|
-
|
|
1556
|
-
for (const
|
|
1557
|
-
|
|
1552
|
+
static forEach(chunks, callback) {
|
|
1553
|
+
for (const [fsts, snds] of chunks)
|
|
1554
|
+
for (let i = 0; i < fsts.length; i++)
|
|
1555
|
+
callback(fsts[i], snds[i]);
|
|
1556
|
+
}
|
|
1557
|
+
forEach(callback) {
|
|
1558
|
+
_LargeTupleArray.forEach(this.chunks, callback);
|
|
1559
|
+
}
|
|
1560
|
+
forEachAndClear(callback) {
|
|
1561
|
+
const snapshot = this.chunks.slice();
|
|
1562
|
+
this.length = 0;
|
|
1563
|
+
_LargeTupleArray.forEach(snapshot, callback);
|
|
1558
1564
|
}
|
|
1559
1565
|
};
|
|
1560
|
-
exports.
|
|
1566
|
+
exports.LargeTupleArray = LargeTupleArray;
|
|
1561
1567
|
}
|
|
1562
1568
|
});
|
|
1563
1569
|
|
|
@@ -1694,8 +1700,8 @@ var require_fragmentstate = __commonJS({
|
|
|
1694
1700
|
externalCallbacksProcessed = /* @__PURE__ */ new Set();
|
|
1695
1701
|
arrayEntriesListeners;
|
|
1696
1702
|
objectPropertiesListeners;
|
|
1697
|
-
postponedListenerCalls = new large_array_1.
|
|
1698
|
-
postponedListenerCalls2 = new large_array_1.
|
|
1703
|
+
postponedListenerCalls = new large_array_1.LargeTupleArray();
|
|
1704
|
+
postponedListenerCalls2 = new large_array_1.LargeTupleArray();
|
|
1699
1705
|
nodesWithNewEdges = /* @__PURE__ */ new Set();
|
|
1700
1706
|
prevNumEdges = 0;
|
|
1701
1707
|
requireGraph = /* @__PURE__ */ new Map();
|
|
@@ -2301,6 +2307,7 @@ var require_diagnostics = __commonJS({
|
|
|
2301
2307
|
uniqueTokens = 0;
|
|
2302
2308
|
aborted = false;
|
|
2303
2309
|
timeout = false;
|
|
2310
|
+
rangeError = false;
|
|
2304
2311
|
lowmemory = false;
|
|
2305
2312
|
analysisTime = 0n;
|
|
2306
2313
|
codeSize = 0;
|
|
@@ -2694,11 +2701,11 @@ var require_solver = __commonJS({
|
|
|
2694
2701
|
logger_1.default.debug(`Adding constraint ${t} \u2208 ${to}`);
|
|
2695
2702
|
this.addToken(t, this.fragmentState.getRepresentative(to));
|
|
2696
2703
|
}
|
|
2697
|
-
enqueueListenerCall(
|
|
2698
|
-
this.fragmentState.postponedListenerCalls.push(
|
|
2704
|
+
enqueueListenerCall(fn, arg) {
|
|
2705
|
+
this.fragmentState.postponedListenerCalls.push(fn, arg);
|
|
2699
2706
|
}
|
|
2700
|
-
enqueueListenerCall2(
|
|
2701
|
-
this.fragmentState.postponedListenerCalls2.push(
|
|
2707
|
+
enqueueListenerCall2(fn, arg) {
|
|
2708
|
+
this.fragmentState.postponedListenerCalls2.push(fn, arg);
|
|
2702
2709
|
}
|
|
2703
2710
|
addToken(t, toRep) {
|
|
2704
2711
|
const f = this.fragmentState;
|
|
@@ -2959,7 +2966,7 @@ var require_solver = __commonJS({
|
|
|
2959
2966
|
if (now)
|
|
2960
2967
|
listener(t);
|
|
2961
2968
|
else {
|
|
2962
|
-
this.enqueueListenerCall(
|
|
2969
|
+
this.enqueueListenerCall(listener, t);
|
|
2963
2970
|
this.diagnostics.tokenListenerNotifications++;
|
|
2964
2971
|
}
|
|
2965
2972
|
}
|
|
@@ -2968,7 +2975,7 @@ var require_solver = __commonJS({
|
|
|
2968
2975
|
const s = (0, util_2.mapGetSet)(this.fragmentState.listenersProcessed, id);
|
|
2969
2976
|
if (!s.has(t)) {
|
|
2970
2977
|
s.add(t);
|
|
2971
|
-
this.enqueueListenerCall2(
|
|
2978
|
+
this.enqueueListenerCall2(listener, t);
|
|
2972
2979
|
this.diagnostics.tokenListener2Notifications++;
|
|
2973
2980
|
}
|
|
2974
2981
|
}
|
|
@@ -3043,7 +3050,7 @@ var require_solver = __commonJS({
|
|
|
3043
3050
|
const ps = f.arrayEntries.get(t);
|
|
3044
3051
|
if (ps)
|
|
3045
3052
|
for (const p of ps) {
|
|
3046
|
-
this.enqueueListenerCall(
|
|
3053
|
+
this.enqueueListenerCall(listener, p);
|
|
3047
3054
|
this.diagnostics.arrayEntriesListenerNotifications++;
|
|
3048
3055
|
}
|
|
3049
3056
|
return m;
|
|
@@ -3062,7 +3069,7 @@ var require_solver = __commonJS({
|
|
|
3062
3069
|
const ts = f.arrayEntriesListeners.get(a);
|
|
3063
3070
|
if (ts)
|
|
3064
3071
|
for (const listener of ts.values()) {
|
|
3065
|
-
this.enqueueListenerCall(
|
|
3072
|
+
this.enqueueListenerCall(listener, prop);
|
|
3066
3073
|
this.diagnostics.arrayEntriesListenerNotifications++;
|
|
3067
3074
|
}
|
|
3068
3075
|
this.addSubsetEdge(f.getRepresentative(f.varProducer.objPropVar(a, prop)), f.getRepresentative(f.varProducer.arrayAllVar(a)));
|
|
@@ -3085,7 +3092,7 @@ var require_solver = __commonJS({
|
|
|
3085
3092
|
if (ps) {
|
|
3086
3093
|
for (const p of ps)
|
|
3087
3094
|
if (!(0, ecmascript_1.isInternalProperty)(p)) {
|
|
3088
|
-
this.enqueueListenerCall(
|
|
3095
|
+
this.enqueueListenerCall(listener, p);
|
|
3089
3096
|
this.diagnostics.objectPropertiesListenerNotifications++;
|
|
3090
3097
|
}
|
|
3091
3098
|
}
|
|
@@ -3104,7 +3111,7 @@ var require_solver = __commonJS({
|
|
|
3104
3111
|
const ts = f.objectPropertiesListeners.get(a);
|
|
3105
3112
|
if (ts)
|
|
3106
3113
|
for (const listener of ts.values()) {
|
|
3107
|
-
this.enqueueListenerCall(
|
|
3114
|
+
this.enqueueListenerCall(listener, prop);
|
|
3108
3115
|
this.diagnostics.objectPropertiesListenerNotifications++;
|
|
3109
3116
|
}
|
|
3110
3117
|
}
|
|
@@ -3328,14 +3335,14 @@ var require_solver = __commonJS({
|
|
|
3328
3335
|
logger_1.default.verbose(`Processing non-bounded listener calls: ${f.postponedListenerCalls.length}`);
|
|
3329
3336
|
const timer = new timer_1.default();
|
|
3330
3337
|
d.listenerNotificationRounds++;
|
|
3331
|
-
|
|
3338
|
+
f.postponedListenerCalls.forEach((fun, arg) => {
|
|
3332
3339
|
fun(arg);
|
|
3333
3340
|
if (++this.postponedListenersProcessed % 100 === 0) {
|
|
3334
3341
|
f.a.timeoutTimer.checkTimeout();
|
|
3335
3342
|
(0, memory_1.checkMemoryLow)();
|
|
3336
3343
|
this.printDiagnostics();
|
|
3337
3344
|
}
|
|
3338
|
-
}
|
|
3345
|
+
});
|
|
3339
3346
|
f.postponedListenerCalls.length = this.postponedListenersProcessed = 0;
|
|
3340
3347
|
d.totalListenerCallTime += timer.elapsed();
|
|
3341
3348
|
} else if (f.postponedListenerCalls2.length > 0) {
|
|
@@ -3351,16 +3358,15 @@ var require_solver = __commonJS({
|
|
|
3351
3358
|
logger_1.default.verbose(`Processing bounded listener calls: ${f.postponedListenerCalls2.length}`);
|
|
3352
3359
|
const timer = new timer_1.default();
|
|
3353
3360
|
d.listenerNotificationRounds++;
|
|
3354
|
-
|
|
3355
|
-
f.postponedListenerCalls2.
|
|
3356
|
-
|
|
3357
|
-
fun.apply(void 0, Array.isArray(args) ? args : [args]);
|
|
3361
|
+
this.postponedListenersProcessed = 0;
|
|
3362
|
+
f.postponedListenerCalls2.forEachAndClear((fun, arg) => {
|
|
3363
|
+
fun(arg);
|
|
3358
3364
|
if (++this.postponedListenersProcessed % 100 === 0) {
|
|
3359
3365
|
f.a.timeoutTimer.checkTimeout();
|
|
3360
3366
|
(0, memory_1.checkMemoryLow)();
|
|
3361
3367
|
this.printDiagnostics();
|
|
3362
3368
|
}
|
|
3363
|
-
}
|
|
3369
|
+
});
|
|
3364
3370
|
d.totalListenerCallTime += timer.elapsed();
|
|
3365
3371
|
if (logger_1.default.isVerboseEnabled() || options_1.options.diagnostics && options_1.options.printProgress)
|
|
3366
3372
|
logger_1.default.info(`${logger_1.isTTY ? logger_1.GREY : ""}Round ${round} completed after ${(0, timer_1.nanoToMs)(this.timer.elapsed())} (call edges: ${f.numberOfCallToFunctionEdges}, vars: ${f.getNumberOfVarsWithTokens()}, tokens: ${f.numberOfTokens}, subsets: ${f.numberOfSubsetEdges})${logger_1.isTTY ? logger_1.RESET : ""}`);
|
|
@@ -4443,6 +4449,16 @@ var require_operations = __commonJS({
|
|
|
4443
4449
|
if (argVar) {
|
|
4444
4450
|
this.solver.addForAllTokensConstraint(argVar, listeners_1.TokenListener.CALL_EXTERNAL, pars.node, (at) => this.invokeExternalCallback(at, pars.node, caller, calleeVar));
|
|
4445
4451
|
f.registerEscapingToExternal(argVar, args[i], caller);
|
|
4452
|
+
if (this.a.vulnerabilities?.hasCallbackArgumentPattern)
|
|
4453
|
+
this.solver.addForAllTokensConstraint(argVar, listeners_1.TokenListener.CALLBACK_ARGUMENT, { t }, (ft) => {
|
|
4454
|
+
if (ft instanceof tokens_1.FunctionToken) {
|
|
4455
|
+
for (const param of ft.fun.params)
|
|
4456
|
+
if ((0, types_1.isIdentifier)(param)) {
|
|
4457
|
+
const paramVar = f.varProducer.nodeVar(param);
|
|
4458
|
+
this.solver.addAccessPath(new accesspaths_1.CallbackArgumentAccessPath(ft.fun), paramVar, pars.node, caller, t.ap);
|
|
4459
|
+
}
|
|
4460
|
+
}
|
|
4461
|
+
});
|
|
4446
4462
|
} else if ((0, types_1.isSpreadElement)(args[i]))
|
|
4447
4463
|
f.warnUnsupported(args[i], "SpreadElement in arguments to external function");
|
|
4448
4464
|
}
|
|
@@ -4519,18 +4535,7 @@ var require_operations = __commonJS({
|
|
|
4519
4535
|
if ((0, types_1.isIdentifier)(param))
|
|
4520
4536
|
this.solver.addAccessPath(accesspaths_1.UnknownAccessPath.instance, f.varProducer.nodeVar(param));
|
|
4521
4537
|
this.solver.addAccessPath(accesspaths_1.UnknownAccessPath.instance, f.varProducer.thisVar(at.fun));
|
|
4522
|
-
const cbargVar = f.varProducer.callbackReceiverVar(at.fun);
|
|
4523
|
-
this.solver.addForAllTokensConstraint(cbargVar, listeners_1.TokenListener.CALLBACK_ARGUMENT, at.fun, (apt) => {
|
|
4524
|
-
if (apt instanceof tokens_1.AccessPathToken) {
|
|
4525
|
-
for (const param of at.fun.params)
|
|
4526
|
-
if ((0, types_1.isIdentifier)(param)) {
|
|
4527
|
-
const paramVar = f.varProducer.nodeVar(param);
|
|
4528
|
-
this.solver.addAccessPath(new accesspaths_1.CallbackArgumentAccessPath(at.fun), paramVar, node, caller, apt.ap);
|
|
4529
|
-
}
|
|
4530
|
-
}
|
|
4531
|
-
});
|
|
4532
4538
|
}
|
|
4533
|
-
this.solver.addSubsetConstraint(calleeVar, f.varProducer.callbackReceiverVar(at.fun));
|
|
4534
4539
|
}
|
|
4535
4540
|
}
|
|
4536
4541
|
readProperty(base, prop, dst, node, enclosing, extrakey = "") {
|
|
@@ -4695,6 +4700,8 @@ var require_operations = __commonJS({
|
|
|
4695
4700
|
if (logger_1.default.isVerboseEnabled())
|
|
4696
4701
|
logger_1.default.verbose(`Lazy: Injecting ${ap} at ${resultVar}`);
|
|
4697
4702
|
this.solver.addAccessPath(ap, resultVar);
|
|
4703
|
+
if ((0, types_1.isExportAllDeclaration)(path.node))
|
|
4704
|
+
this.solver.addAccessPath(ap, this.solver.varProducer.objPropVar(this.a.canonicalizeToken(new tokens_1.NativeObjectToken("module", this.moduleInfo)), "exports"));
|
|
4698
4705
|
}
|
|
4699
4706
|
}
|
|
4700
4707
|
const encl = this.a.getEnclosingFunctionOrModule(path);
|
|
@@ -5112,7 +5119,7 @@ var require_finalization = __commonJS({
|
|
|
5112
5119
|
const f = solver.fragmentState;
|
|
5113
5120
|
const a = solver.globalState;
|
|
5114
5121
|
const d = solver.diagnostics;
|
|
5115
|
-
if (d.aborted || d.timeout || d.lowmemory || d.waveLimitReached > 0 || d.indirectionsLimitReached > 0) {
|
|
5122
|
+
if (d.aborted || d.timeout || d.rangeError || d.lowmemory || d.waveLimitReached > 0 || d.indirectionsLimitReached > 0) {
|
|
5116
5123
|
for (const n of f.callLocations) {
|
|
5117
5124
|
const caller = f.callToContainingFunction.get(n);
|
|
5118
5125
|
(0, assert_1.default)(caller);
|
|
@@ -5798,7 +5805,10 @@ var require_analyzer = __commonJS({
|
|
|
5798
5805
|
d.lowmemory = true;
|
|
5799
5806
|
else if (ex instanceof solver_1.AbortedException)
|
|
5800
5807
|
d.aborted = true;
|
|
5801
|
-
else
|
|
5808
|
+
else if (isDataStructureTooLargeError(ex)) {
|
|
5809
|
+
d.rangeError = true;
|
|
5810
|
+
logger_1.default.warn(`Error: Caught '${ex}', analysis aborted`);
|
|
5811
|
+
} else
|
|
5802
5812
|
throw ex;
|
|
5803
5813
|
} finally {
|
|
5804
5814
|
if (a.approx) {
|
|
@@ -5827,7 +5837,8 @@ var require_analyzer = __commonJS({
|
|
|
5827
5837
|
packages: d.packages,
|
|
5828
5838
|
modules: d.modules,
|
|
5829
5839
|
timeout: d.timeout,
|
|
5830
|
-
aborted: d.aborted
|
|
5840
|
+
aborted: d.aborted,
|
|
5841
|
+
rangeError: d.rangeError
|
|
5831
5842
|
});
|
|
5832
5843
|
d.errors = (0, util_1.getMapHybridSetSize)(solver.fragmentState.errors) + a.filesWithParseErrors.length;
|
|
5833
5844
|
d.warnings = (0, util_1.getMapHybridSetSize)(solver.fragmentState.warnings) + (0, util_1.getMapHybridSetSize)(solver.fragmentState.warningsUnsupported);
|
|
@@ -5874,6 +5885,10 @@ var require_analyzer = __commonJS({
|
|
|
5874
5885
|
}
|
|
5875
5886
|
}
|
|
5876
5887
|
__name(analyzeFiles, "analyzeFiles");
|
|
5888
|
+
function isDataStructureTooLargeError(e) {
|
|
5889
|
+
return e instanceof RangeError && ["Invalid array length", "Set maximum size exceeded", "Map maximum size exceeded"].includes(e.message);
|
|
5890
|
+
}
|
|
5891
|
+
__name(isDataStructureTooLargeError, "isDataStructureTooLargeError");
|
|
5877
5892
|
}
|
|
5878
5893
|
});
|
|
5879
5894
|
|
|
Binary file
|