Skip to content

Fix nmap service information leaking to unrelated ports #1624

@coderabbitai

Description

@coderabbitai

Description

A bug was identified where nmap-derived service information is incorrectly propagated to ports that have no service data. This occurs when service fields from a previous port are not cleared and leak into subsequent port outputs in JSON and CSV formats.

Impact

When running naabu with nmap service detection (e.g., -nmap-cli 'nmap -sV'), ports without service information incorrectly inherit service data from previously scanned ports in the output files, while terminal output displays correctly.

Related Pull Request

This issue is being tracked for PR #1613: #1613

Requested by: @Mzack9999
Comment: #1613 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: BugInconsistencies or issues which will cause an issue or problem for users or implementors.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions