Skip to content

M1: Fix NmapAdapter two-stage correctness and remove the raw_flags fallback #70

Backlog

Description

@h45sh

Context

tools/nmap/adapter.py still has the legacy raw_flags regex fallback and several two-stage edge cases: an attached output flag such as -oXout.xml is not detected, so -oX - is appended as well; -p ranges are stripped by _strip_version_flags(); and Stage 1 can report false opens.

Acceptance criteria

  • Append -oX - only when no XML output flag is present.
  • Preserve -p and port ranges across the Stage 1/Stage 2 split.
  • Remove the raw_flags fallback and require typed parameters.
  • Emit cancellation events and keep per-stage timeouts separate.
  • Add regression tests with a recorded Stage 1/Stage 2 transcript.

Out of scope

New NSE scripts or service detection changes.

Part of #24

Activity

  1. added this to the M1 Truth milestone on Nov 29, 2026
  2. added
    type:bug
    priority:P1
    area:adapters
    on Nov 29, 2026
  3. h45sh commented on Dec 1, 2026

    @h45sh
    OwnerAuthor

    Additional observed behaviors during Stage 1/2 nmap runs against a target (192.0.2.10):

    • Non-standard HTTP ports (e.g., :8080) can be misclassified as http-proxy in Stage 1 and tcpwrapped (banner: null) in Stage 2 (subsequent http_probe on :8080 corrects the network.service node).
    • Even when Nmap XML includes <hostname name="host.example.com" type="PTR"/> and ostype="Linux", the persisted network.host node leaves hostname: null and os: null.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:adapterspriority:P1type:bug

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions