@mlvscan/wasm-core 1.1.7 → 1.1.8

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.
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "mainAssemblyName": "MLVScan.WASM.dll",
3
3
  "resources": {
4
- "hash": "sha256-jTAixhhqHmH6Js7hnz8TbIU8LPF6Av7QIkhdNfm8da8=",
4
+ "hash": "sha256-srpC+gJJTrckZXDceVEAbnKBW0qyrtdYgY8djhRV5xc=",
5
5
  "jsModuleNative": {
6
6
  "dotnet.native.js": "sha256-clxzGaAFwcQ6QWhwQ7dzpD9ktR/87yTache3B45gqoQ="
7
7
  },
@@ -9,7 +9,7 @@
9
9
  "dotnet.runtime.js": "sha256-TGUqQm2/C+r+yZ5BCjd72qyLw9wv0KPFKzKXk/giiyY="
10
10
  },
11
11
  "wasmNative": {
12
- "dotnet.native.wasm": "sha256-fin1Zl1yIo6hXwrmCD6i3R0OLwYlXlPPBuP9GwGRhfQ="
12
+ "dotnet.native.wasm": "sha256-7LljILBN1AFf6EU6LHPYFSM546zEqe1EGl7AAP3pb1Q="
13
13
  },
14
14
  "wasmSymbols": {
15
15
  "dotnet.native.js.symbols": "sha256-mcn0xQOEP6bIrzi/nvTIsKV7ryyqIdVUtbOIC/EOcqI="
@@ -20,20 +20,20 @@
20
20
  "icudt_no_CJK.dat": "sha256-L7sV7NEYP37/Qr2FPCePo5cJqRgTXRwGHuwF5Q+0Nfs="
21
21
  },
22
22
  "assembly": {
23
- "MLVScan.Core.wasm": "sha256-I6pReZ5whl4GsSwBOycEb5zMmcsiocjRQSFEUKSY+64=",
24
- "MLVScan.WASM.wasm": "sha256-E3uY+sg1PROG3DaOEhgnwb3Qrwiol/wRsrpVKKnqMKs=",
25
- "Mono.Cecil.wasm": "sha256-9nKX3pNgOOICbt5NYrpLzfr68C2NenjxIZRWMSm3+9s=",
26
- "System.Collections.Concurrent.wasm": "sha256-63SVm6IOpVPPAswPtjPxNn+UVLmQVcVw/TsZkAERzZ0=",
27
- "System.Collections.wasm": "sha256-suGbEYUofGw2k7rtWARZyGc4mKVUtVEV3TwUd3fZmmo=",
23
+ "MLVScan.Core.wasm": "sha256-7eOR8Ohi5TY7ipV+izk4JnlUYvfbYDeVXQyw5oimuIk=",
24
+ "MLVScan.WASM.wasm": "sha256-cj5XyssWdMzZ11cr3W8VgqgEa6sBRn2QFeaCfZk7Dzo=",
25
+ "Mono.Cecil.wasm": "sha256-+26bn77S22+aVO+7xKl2WP74xQjSYR0S8GP6mRWf9C8=",
26
+ "System.Collections.Concurrent.wasm": "sha256-pFhCmskR6dmKt18zv1jrGGR184LyXdz408BBMX4BBhg=",
27
+ "System.Collections.wasm": "sha256-TRwwb/PWxTAKfplBNqMkn14z5rNLvuy459MunrnseDo=",
28
28
  "System.IO.Compression.wasm": "sha256-zPnVmOjOHN/V1tNLjZurM9T/xj1LXcVlKv+emtlb3gA=",
29
- "System.Linq.wasm": "sha256-9tHJX23oXTc36XpgjNVp5rHnx9pG+W2584qC0yZIJII=",
30
- "System.Memory.wasm": "sha256-kNlcsfG/cVsoTKFZc2vbR+COjs4GUSwhQHlLCNkCqEg=",
31
- "System.Private.CoreLib.wasm": "sha256-k4QAIYYtp+zKYAMwo5l55YeGDF4iEi70Q5M7PSB/uBc=",
29
+ "System.Linq.wasm": "sha256-1wPZ41jMHt8ciwhU3I4TFTqP5hLFGPgwv9ELOm1r4sc=",
30
+ "System.Memory.wasm": "sha256-csnkwt/JrsppyyW/C58TooGjK2jHvla7al1hV1pbTm4=",
31
+ "System.Private.CoreLib.wasm": "sha256-Zvoxo5D29MB/hBBw4MTVcRXUU77qT05R4VgGobV5ycw=",
32
32
  "System.Runtime.InteropServices.JavaScript.wasm": "sha256-knh9wD83/GTpX28IRzoUJy42zEAtXZdBUcckFTm6bzw=",
33
33
  "System.Security.Cryptography.wasm": "sha256-1yetTxYoa9Mv2JdPd07A9bKVQKSs1o/cCS66raJYlMQ=",
34
- "System.Text.Encodings.Web.wasm": "sha256-0Yj+mrS4Z2sHQGjRimW4tqk281Rv2anm+6r0rfM+7x8=",
35
- "System.Text.Json.wasm": "sha256-2eNYX3n7GnAmU/ijgyEEbIqVdeKYh9kjIVv4cA1Q3lc=",
36
- "System.Text.RegularExpressions.wasm": "sha256-OhRvJc9wBjXcObymgRgCyOalu/X7h8WyZAGrSpsMgYg="
34
+ "System.Text.Encodings.Web.wasm": "sha256-nPDcUnKJT3K4bYAjeaZI+9dn3OmAWOVz87kkXfy7znA=",
35
+ "System.Text.Json.wasm": "sha256-AeaONG3Ex8c3fn8CGqF/3LBoWcM5ZFPr+ulSTe/PVRQ=",
36
+ "System.Text.RegularExpressions.wasm": "sha256-6xU3ws3QrP3va4o+lU66Gz4HOOB8fkyaR4hm51P5cJQ="
37
37
  },
38
38
  "vfs": {
39
39
  "runtimeconfig.bin": {
Binary file
package/dist/index.d.ts CHANGED
@@ -18,7 +18,7 @@
18
18
  * const result = await scanAssembly(dllBytes, 'MyMod.dll')
19
19
  * ```
20
20
  */
21
- import type { ScanResult } from './types';
21
+ import type { ScanConfigInput, ScanResult } from './types';
22
22
  /**
23
23
  * Options for initializing the WASM scanner.
24
24
  *
@@ -81,6 +81,11 @@ export declare function initScanner(options?: ScannerInitOptions): Promise<void>
81
81
  * @throws When the scanner is not in mock mode but the WASM scan call fails.
82
82
  */
83
83
  export declare function scanAssembly(fileBytes: Uint8Array, fileName: string): Promise<ScanResult>;
84
+ /**
85
+ * Scans an assembly with an explicit scan configuration (including deep analysis options).
86
+ * Use this for opt-in deep scans while keeping quick scan defaults for normal usage.
87
+ */
88
+ export declare function scanAssemblyWithConfig(fileBytes: Uint8Array, fileName: string, config: ScanConfigInput): Promise<ScanResult>;
84
89
  /**
85
90
  * Returns whether the scanner is ready to use (initialization finished, either
86
91
  * with real WASM or mock). Use this to gate UI (e.g. enable "Scan" only when
package/dist/index.js CHANGED
@@ -161,6 +161,35 @@ export async function scanAssembly(fileBytes, fileName) {
161
161
  throw new Error(`Scan failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
162
162
  }
163
163
  }
164
+ /**
165
+ * Scans an assembly with an explicit scan configuration (including deep analysis options).
166
+ * Use this for opt-in deep scans while keeping quick scan defaults for normal usage.
167
+ */
168
+ export async function scanAssemblyWithConfig(fileBytes, fileName, config) {
169
+ if (!scannerLoaded) {
170
+ await initScanner();
171
+ }
172
+ if (useMockScanner || !scannerExports) {
173
+ return {
174
+ ...mockScanResult,
175
+ input: {
176
+ fileName,
177
+ sizeBytes: fileBytes.length,
178
+ },
179
+ };
180
+ }
181
+ if (!scannerExports.MLVScan?.WASM?.ScannerExports) {
182
+ throw new Error('Scanner not properly initialized: MLVScan.WASM.ScannerExports not found');
183
+ }
184
+ try {
185
+ const configJson = JSON.stringify(config ?? {});
186
+ const resultJson = scannerExports.MLVScan.WASM.ScannerExports.ScanAssemblyWithConfig(fileBytes, fileName, configJson);
187
+ return JSON.parse(resultJson);
188
+ }
189
+ catch (error) {
190
+ throw new Error(`Scan with config failed: ${error instanceof Error ? error.message : 'Unknown error'}`);
191
+ }
192
+ }
164
193
  /**
165
194
  * Returns whether the scanner is ready to use (initialization finished, either
166
195
  * with real WASM or mock). Use this to gate UI (e.g. enable "Scan" only when
package/dist/types.d.ts CHANGED
@@ -119,3 +119,35 @@ export interface DeveloperGuidance {
119
119
  alternativeApis?: string[];
120
120
  isRemediable: boolean;
121
121
  }
122
+ export interface DeepBehaviorAnalysisConfig {
123
+ enableDeepAnalysis?: boolean;
124
+ emitDiagnosticFindings?: boolean;
125
+ requireCorrelatedBaseFinding?: boolean;
126
+ deepScanOnlyFlaggedMethods?: boolean;
127
+ enableStringDecodeFlow?: boolean;
128
+ enableExecutionChainAnalysis?: boolean;
129
+ enableResourcePayloadAnalysis?: boolean;
130
+ enableDynamicLoadCorrelation?: boolean;
131
+ enableNativeInteropCorrelation?: boolean;
132
+ enableScriptHostLaunchAnalysis?: boolean;
133
+ enableEnvironmentPivotCorrelation?: boolean;
134
+ enableNetworkToExecutionCorrelation?: boolean;
135
+ maxInstructionsPerMethod?: number;
136
+ maxAnalysisTimeMsPerMethod?: number;
137
+ maxDeepMethodsPerAssembly?: number;
138
+ maxTrackedDataFlowEdgesPerMethod?: number;
139
+ }
140
+ export interface ScanConfigInput {
141
+ developerMode?: boolean;
142
+ enableCrossMethodAnalysis?: boolean;
143
+ maxCallChainDepth?: number;
144
+ enableReturnValueTracking?: boolean;
145
+ detectAssemblyMetadata?: boolean;
146
+ enableMultiSignalDetection?: boolean;
147
+ analyzeExceptionHandlers?: boolean;
148
+ analyzeLocalVariables?: boolean;
149
+ analyzePropertyAccessors?: boolean;
150
+ enableRecursiveResourceScanning?: boolean;
151
+ maxRecursiveResourceSizeMB?: number;
152
+ deepAnalysis?: DeepBehaviorAnalysisConfig;
153
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mlvscan/wasm-core",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "WebAssembly core for MLVScan - scanning Unity mods in the browser",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",