muaddib-scanner 2.11.86 → 2.11.88

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.11.86",
3
+ "version": "2.11.88",
4
4
  "description": "Supply-chain threat detection & response for npm & PyPI/Python",
5
5
  "main": "src/index.js",
6
6
  "bin": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "target": "node_modules",
3
- "timestamp": "2026-06-10T23:35:51.270Z",
3
+ "timestamp": "2026-06-11T08:02:35.162Z",
4
4
  "threats": [
5
5
  {
6
6
  "type": "string_mutation_obfuscation",
@@ -1090,7 +1090,11 @@ const CASCADE_TYPES = new Set([
1090
1090
  'proxy_data_intercept', // MUADDIB-AST-043
1091
1091
  'remote_code_load', // MUADDIB-AST-040
1092
1092
  'obfuscation_detected', // src/scanner/obfuscation.js
1093
- 'js_obfuscation_pattern'
1093
+ 'js_obfuscation_pattern',
1094
+ // FPR audit 2026-06: these two also fire on legitimate minified vendor bundles
1095
+ // (string-rewrite tables, base64 blobs) and were escaping the bundle cap.
1096
+ 'string_mutation_obfuscation',
1097
+ 'high_entropy_string'
1094
1098
  ]);
1095
1099
  const CASCADE_MIN_TYPES = 3;
1096
1100
  const CASCADE_MIN_FILE_BYTES = 20 * 1024;
@@ -175,11 +175,29 @@ function isSuspectClassification(result) {
175
175
  if (hasLifecycleWithIntent(result)) {
176
176
  return { suspect: true, tier: '1a' };
177
177
  }
178
+ // IOC / known-malicious matches (known_malicious_package/hash, pypi_malicious_package,
179
+ // shai_hulud_marker/backdoor) are definite malware → mandatory sandbox, unconditionally.
180
+ // Promotes them out of the (now corroboration-gated) tier-1b zone so the tightening
181
+ // below can never drop a confirmed IOC hit, regardless of score.
182
+ if (hasIOCMatch(result)) {
183
+ return { suspect: true, tier: '1a' };
184
+ }
178
185
 
179
- // Tier 1b: HIGH/CRITICAL severity without HC type or TIER1_TYPES
180
- // Typical bundler FP zone (eval in webpack, minification as obfuscation, etc.)
181
- // Sandbox conditional on score >= 25 or low queue pressure
182
- if (result.summary.critical > 0 || result.summary.high > 0) {
186
+ // Tier 1b: HIGH/CRITICAL severity without HC type or TIER1_TYPES — the heuristic
187
+ // FP zone (a lone non-HC HIGH heuristic like compromised_email_domain /
188
+ // prototype_pollution / trusted_new_dependency flips a package to suspect even at
189
+ // score ~3). FPR audit 2026-06 (200-pkg blind adjudication, ~99% FP): a SINGLE
190
+ // non-HC HIGH finding made ~half of all "suspect" packages, almost all FP. It is
191
+ // no longer sufficient on its own — require corroboration: a real alert score
192
+ // (>=20), a compound, or >=2 DISTINCT HIGH/CRITICAL types. HC types / TIER1_TYPES /
193
+ // lifecycle+intent already returned tier 1a above, and Track R floors confirmed
194
+ // malice at 20, so detection is preserved; lone-heuristic packages fall through to
195
+ // the 2+-distinct-type tier 2/3 logic (and to CLEAN when they carry one finding).
196
+ const _hcSevere = result.threats.filter(t => t.severity === 'HIGH' || t.severity === 'CRITICAL');
197
+ const _highCritTypes = new Set(_hcSevere.map(t => t.type));
198
+ const _hasCompound = result.threats.some(t => t.compound === true);
199
+ const _score = (result.summary && typeof result.summary.riskScore === 'number') ? result.summary.riskScore : 0;
200
+ if (_hcSevere.length > 0 && (_score >= 20 || _hasCompound || _highCritTypes.size >= 2)) {
183
201
  return { suspect: true, tier: '1b' };
184
202
  }
185
203
 
@@ -3348,7 +3348,7 @@ const RULES = {
3348
3348
  trusted_new_dependency: {
3349
3349
  id: 'MUADDIB-TRUSTED-002',
3350
3350
  name: 'Trusted Package Added New Dependency',
3351
- severity: 'HIGH',
3351
+ severity: 'MEDIUM',
3352
3352
  confidence: 'medium',
3353
3353
  domain: 'malware',
3354
3354
  description: 'Un package TRUSTED (>50k downloads/semaine) a ajoute une nouvelle dependance connue (>7 jours) dans un bump de version — changement de surface d\'attaque a verifier.',
@@ -154,7 +154,12 @@ async function checkDepDiff(name, newVersion) {
154
154
  const ageDays = Math.floor(ageMs / 86400000);
155
155
  findings.push({
156
156
  type: 'trusted_new_dependency',
157
- severity: 'HIGH',
157
+ // FPR audit 2026-06: a trusted package adding an ESTABLISHED (>=7d) dependency
158
+ // is an audit/surface-change signal ("a verifier"), not malice — it produced
159
+ // ~169 FPs. Downgraded HIGH->MEDIUM so it no longer alone meets the tier-1b
160
+ // corroboration bar. The real account-takeover case (new/unknown dep <7d) is
161
+ // the separate CRITICAL `trusted_new_unknown_dependency` (HC type) and is intact.
162
+ severity: 'MEDIUM',
158
163
  confidence: 'medium',
159
164
  file: 'package.json',
160
165
  message: `TRUSTED package ${name} added new dependency ${dep} (age: ${ageDays}d) in version ${prevVersion} → ${newVersion}`,