fix: dedupe sentinel artifact findings by id
This commit is contained in:
@@ -333,7 +333,7 @@ function mergeSentinelReportFindings(primary: readonly Record<string, unknown>[]
|
||||
const seen = new Set<string>();
|
||||
for (const item of [...primary, ...artifact]) {
|
||||
const id = sentinelReportFindingIdentity(item);
|
||||
const key = `${id ?? JSON.stringify(item).slice(0, 160)}:${stringAtNullable(item, "severity") ?? stringAtNullable(item, "level") ?? ""}`;
|
||||
const key = id ?? `${JSON.stringify(item).slice(0, 160)}:${stringAtNullable(item, "severity") ?? stringAtNullable(item, "level") ?? ""}`;
|
||||
if (seen.has(key)) continue;
|
||||
seen.add(key);
|
||||
merged.push(item);
|
||||
|
||||
Reference in New Issue
Block a user