muaddib-scanner 2.10.48 → 2.10.49

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "muaddib-scanner",
3
- "version": "2.10.48",
3
+ "version": "2.10.49",
4
4
  "description": "Supply-chain threat detection & response for npm & PyPI/Python",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -411,6 +411,14 @@ async function startMonitor(options, stats, dailyAlerts, recentlyScanned, downlo
411
411
  process.on('SIGINT', () => gracefulShutdown('SIGINT'));
412
412
  process.on('SIGTERM', () => gracefulShutdown('SIGTERM'));
413
413
 
414
+ // ─── Deferred sandbox worker ───
415
+ // Started BEFORE the first processQueue so it can process T1b/T2 packages
416
+ // that get deferred during the initial batch (which blocks for 30min-2h).
417
+ if (isSandboxEnabled() && sandboxAvailableRef.value) {
418
+ startDeferredWorker(stats);
419
+ console.log('[MONITOR] Deferred sandbox worker started (30s interval, dedicated slot)');
420
+ }
421
+
414
422
  // Initial poll + scan (sequential for first run)
415
423
  await poll(state, scanQueue, stats);
416
424
  saveState(state, stats);
@@ -448,14 +456,6 @@ async function startMonitor(options, stats, dailyAlerts, recentlyScanned, downlo
448
456
  persistDeferredQueue(); // Piggyback: persist deferred sandbox queue on same interval
449
457
  }, QUEUE_PERSIST_INTERVAL);
450
458
 
451
- // ─── Deferred sandbox worker ───
452
- // Retries T1b/T2 packages that were skipped when sandbox slots were full.
453
- // Runs every 30s, processes at most 1 item per tick, yields to T1a.
454
- if (isSandboxEnabled() && sandboxAvailableRef.value) {
455
- startDeferredWorker(stats);
456
- console.log('[MONITOR] Deferred sandbox worker started (30s interval, T1a-safe)');
457
- }
458
-
459
459
  // ─── Continuous processing loop ───
460
460
  // Consumes scanQueue independently of polling. Workers inside processQueue
461
461
  // check scanQueue.length > 0 after each item, so items added by a concurrent