From ba1b8d1c21ee47c54aa409a5485b8b858ac53a30 Mon Sep 17 00:00:00 2001 From: Jannik Hollenbach Date: Wed, 7 Jan 2026 10:36:47 +0100 Subject: [PATCH 1/2] Ensure Host findings still have a valid location even when they are not named Signed-off-by: Jannik Hollenbach --- scanners/nmap/parser/parser.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scanners/nmap/parser/parser.js b/scanners/nmap/parser/parser.js index afa97cfb55..d6a71e6a1a 100644 --- a/scanners/nmap/parser/parser.js +++ b/scanners/nmap/parser/parser.js @@ -52,7 +52,7 @@ function transformToFindings(hosts) { name: `Host: ${getHostOrIp({ hostname, ips })}`, category: "Host", description: "Found a host", - location: hostname, + location: getHostOrIp({ hostname, ips }), severity: "INFORMATIONAL", osi_layer: "NETWORK", attributes: { From a5325d327eeb8e66a3ec7b697645ad2935b1454d Mon Sep 17 00:00:00 2001 From: Jannik Hollenbach Date: Wed, 7 Jan 2026 10:40:19 +0100 Subject: [PATCH 2/2] Update snapshots to include location for unnamed hosts Signed-off-by: Jannik Hollenbach --- scanners/nmap/parser/parser.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scanners/nmap/parser/parser.test.js b/scanners/nmap/parser/parser.test.js index 3d4083192b..a5ffda26e5 100644 --- a/scanners/nmap/parser/parser.test.js +++ b/scanners/nmap/parser/parser.test.js @@ -1202,7 +1202,7 @@ test("should parse output of runs run --verbose properly", async () => { }, "category": "Host", "description": "Found a host", - "location": null, + "location": "192.168.178.32", "name": "Host: 192.168.178.32", "osi_layer": "NETWORK", "severity": "INFORMATIONAL", @@ -1217,7 +1217,7 @@ test("should parse output of runs run --verbose properly", async () => { }, "category": "Host", "description": "Found a host", - "location": null, + "location": "192.168.178.42", "name": "Host: 192.168.178.42", "osi_layer": "NETWORK", "severity": "INFORMATIONAL", @@ -1232,7 +1232,7 @@ test("should parse output of runs run --verbose properly", async () => { }, "category": "Host", "description": "Found a host", - "location": null, + "location": "192.168.178.49", "name": "Host: 192.168.178.49", "osi_layer": "NETWORK", "severity": "INFORMATIONAL", @@ -1247,7 +1247,7 @@ test("should parse output of runs run --verbose properly", async () => { }, "category": "Host", "description": "Found a host", - "location": null, + "location": "192.168.178.166", "name": "Host: 192.168.178.166", "osi_layer": "NETWORK", "severity": "INFORMATIONAL",