muaddib-scanner 2.11.86 → 2.11.87
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
package/src/monitor/classify.js
CHANGED
|
@@ -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
|
-
//
|
|
181
|
-
//
|
|
182
|
-
|
|
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
|
|