muaddib-scanner 2.10.51 → 2.10.53

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.51",
3
+ "version": "2.10.53",
4
4
  "description": "Supply-chain threat detection & response for npm & PyPI/Python",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -487,6 +487,35 @@ async function runSingleSandbox(packageName, options = {}) {
487
487
  if (f.type === 'canary_exfiltration') return s + 50;
488
488
  return s;
489
489
  }, score + preloadScore));
490
+
491
+ // ── Prevent false CLEAN when sandbox couldn't fully analyze ──
492
+ // If score is 0 but install or entry point failed, mark INCONCLUSIVE
493
+ // so downstream (monitor, webhook) doesn't treat this as confirmed benign.
494
+ if (finalScore === 0) {
495
+ const entryError = report.entrypoint_output &&
496
+ /\[ENTRY_ERROR\]/.test(report.entrypoint_output);
497
+ const installNotFound = report.exit_code !== 0 &&
498
+ report.exit_code !== undefined &&
499
+ report.install_output &&
500
+ /ERR! (?:code E404|404|code ETARGET|code ERESOLVE)/.test(report.install_output);
501
+ if (entryError || installNotFound) {
502
+ const reason = installNotFound
503
+ ? `npm install failed (exit ${report.exit_code})`
504
+ : 'Entry point require() failed';
505
+ findings.push({
506
+ type: 'sandbox_incomplete',
507
+ severity: 'MEDIUM',
508
+ detail: `${reason} — behavioral analysis incomplete`,
509
+ evidence: ((installNotFound ? report.install_output : report.entrypoint_output) || '').substring(0, 300)
510
+ });
511
+ resolve({
512
+ score: -1, severity: 'INCONCLUSIVE', findings, raw_report: report,
513
+ suspicious: false, inconclusive: true
514
+ });
515
+ return;
516
+ }
517
+ }
518
+
490
519
  const severity = getSeverity(finalScore);
491
520
  const result = { score: finalScore, severity, findings, raw_report: report, suspicious: finalScore > 0 };
492
521