diff --git a/scripts/src/hwlab-node-web-sentinel-p5.ts b/scripts/src/hwlab-node-web-sentinel-p5.ts index e8656fd0..e7a1c69c 100644 --- a/scripts/src/hwlab-node-web-sentinel-p5.ts +++ b/scripts/src/hwlab-node-web-sentinel-p5.ts @@ -333,7 +333,7 @@ function mergeSentinelReportFindings(primary: readonly Record[] const seen = new Set(); 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); diff --git a/scripts/src/hwlab-node-web-sentinel-service.ts b/scripts/src/hwlab-node-web-sentinel-service.ts index 2dbc3e6b..5f34adb4 100644 --- a/scripts/src/hwlab-node-web-sentinel-service.ts +++ b/scripts/src/hwlab-node-web-sentinel-service.ts @@ -1536,7 +1536,8 @@ function mergeVisibleFindings(primary: readonly Record[], artif const merged: Record[] = []; const seen = new Set(); for (const item of [...primary, ...artifact]) { - const key = `${findingIdentity(item) ?? JSON.stringify(item).slice(0, 160)}:${stringOrNull(item.severity) ?? stringOrNull(item.level) ?? ""}`; + const id = findingIdentity(item); + const key = id ?? `${JSON.stringify(item).slice(0, 160)}:${stringOrNull(item.severity) ?? stringOrNull(item.level) ?? ""}`; if (seen.has(key)) continue; seen.add(key); merged.push(item);