Skip to content

Commit a36d9b3

Browse files
committed
Fix dedup clustering: only strong matches cluster
Moderate matches (same package, different CWE/version/files) were being union-find merged into clusters, causing unrelated advisories targeting the same repo to appear as duplicates. Now only strong matches (package AND cwe/version/files overlap) cluster. Moderate and weak matches are still reported as informational signals for the agent's semantic analysis layer. Found via live testing against anticomputer/vulnerable-test-app: an AI slop report (CWE-94, version <= 99.0.0) was incorrectly clustered with two legitimate SQL injection reports (CWE-89, version <= 0.0.1) because all three shared the same Go package.
1 parent 0f243d9 commit a36d9b3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/seclab_taskflows/mcp_servers/pvr_ghsa.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ def union(x, y):
453453
"match_level": result["match_level"],
454454
"reasons": result["reasons"],
455455
})
456-
if result["match_level"] in ("strong", "moderate"):
456+
if result["match_level"] == "strong":
457457
union(i, j)
458458

459459
# Build clusters from union-find

0 commit comments

Comments
 (0)