weavatrix 0.2.6 → 0.2.7
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/README.md +57 -10
- package/SECURITY.md +14 -0
- package/docs/agent-task-benchmark.md +58 -0
- package/docs/releases/v0.2.7.md +93 -0
- package/package.json +6 -1
- package/scripts/run-agent-task-benchmark.mjs +119 -0
- package/skill/SKILL.md +27 -7
- package/src/analysis/allowed-test-runner.js +59 -0
- package/src/analysis/data-flow-evidence.js +114 -0
- package/src/analysis/dead-code-review.js +51 -0
- package/src/analysis/dep-check.js +42 -3
- package/src/analysis/duplicate-groups.js +84 -0
- package/src/analysis/hot-path-review.js +20 -2
- package/src/analysis/internal-audit.run.js +6 -1
- package/src/analysis/task-retrieval.js +116 -0
- package/src/mcp/catalog.mjs +26 -6
- package/src/mcp/graph-context.mjs +1 -1
- package/src/mcp/tools-graph.mjs +46 -3
- package/src/mcp/tools-health.mjs +15 -28
- package/src/mcp/tools-impact-change.mjs +1 -0
- package/src/mcp/tools-verified-change.mjs +169 -0
- package/src/security/malware-heuristics.exclusions.js +3 -3
- package/src/security/malware-heuristics.roots.js +4 -1
- package/src/security/malware-heuristics.scan.js +4 -2
- package/src/security/malware-scoring.js +22 -5
|
@@ -26,8 +26,11 @@ function visibleSignals(signals, allow) {
|
|
|
26
26
|
return hasStrongerUrl ? kept.filter((s) => s.key !== "hardcoded-url") : kept;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
// Heuristic source matches can justify urgent review, but they cannot prove that code executed or
|
|
30
|
+
// credentials left the machine. Reserve `critical` for independently confirmed advisories/runtime
|
|
31
|
+
// evidence; this scanner therefore has an explicit HIGH ceiling.
|
|
32
|
+
function heuristicSeverity(baseSeverity, smoking, multi) {
|
|
33
|
+
if (baseSeverity === "critical") return "high";
|
|
31
34
|
if ((smoking || multi) && (baseSeverity === "medium" || baseSeverity === "low")) return "high";
|
|
32
35
|
return baseSeverity;
|
|
33
36
|
}
|
|
@@ -63,20 +66,34 @@ export function buildMalwareFindings({ byPkg, importedPkgs, contentRoots, scanMo
|
|
|
63
66
|
for (const key of keys) {
|
|
64
67
|
const ofKey = visible.filter((s) => s.key === key);
|
|
65
68
|
const base = ofKey[0];
|
|
66
|
-
const severity =
|
|
69
|
+
const severity = heuristicSeverity(base.severity, smoking, multi);
|
|
67
70
|
findings.push(makeFinding({
|
|
68
71
|
category: "malware",
|
|
69
72
|
rule: key,
|
|
70
73
|
severity,
|
|
71
74
|
confidence: base.nearZeroFp ? "high" : multi ? "medium" : "low",
|
|
75
|
+
assessment: "SUSPICIOUS_STATIC_EVIDENCE",
|
|
76
|
+
confirmedExecution: false,
|
|
77
|
+
requiresRuntimeConfirmation: true,
|
|
78
|
+
severityCeiling: "high",
|
|
72
79
|
title: `${base.what}: ${pkg}`,
|
|
73
|
-
detail: `${base.what} in installed package "${pkg}"${multi ? ` - co-occurs with ${[...keys].filter((k) => k !== key).join(", ")} (escalated)` : ""}${importedPkgs.has(pkg) ? ". This package IS imported by the repo's own code." : ". Transitive install (
|
|
80
|
+
detail: `${base.what} in installed package "${pkg}"${multi ? ` - co-occurs with ${[...keys].filter((k) => k !== key).join(", ")} (escalated)` : ""}${importedPkgs.has(pkg) ? ". This package IS imported by the repo's own code." : ". Transitive install (its install scripts may have run)."} Static heuristic evidence only: execution, package compromise, and credential exposure are NOT confirmed. Inspect the cited file and verify origin/lockfile/runtime evidence before acting.`,
|
|
74
81
|
package: pkg,
|
|
75
82
|
file: base.file ? String(base.file).replace(/\\/g, "/") : "",
|
|
76
83
|
line: base.line || 0,
|
|
77
84
|
evidence: evidenceRows(ofKey),
|
|
78
85
|
source: "heuristic",
|
|
79
|
-
|
|
86
|
+
verification: {
|
|
87
|
+
staticPattern: "MATCHED",
|
|
88
|
+
runtimeExecution: "NOT_VERIFIED",
|
|
89
|
+
packageOrigin: "NOT_VERIFIED",
|
|
90
|
+
lockfileIntegrity: "NOT_VERIFIED",
|
|
91
|
+
credentialExposure: "NOT_VERIFIED",
|
|
92
|
+
decision: "MANUAL_CONFIRMATION_REQUIRED",
|
|
93
|
+
},
|
|
94
|
+
fixHint: smoking
|
|
95
|
+
? `quarantine and inspect ${pkg}; verify package origin and lockfile integrity before removal; rotate secrets only if execution or credential exposure is confirmed`
|
|
96
|
+
: `review the cited code in ${pkg}`,
|
|
80
97
|
}));
|
|
81
98
|
}
|
|
82
99
|
}
|