# mscan native roadmap

The native CLI is the primary deliverable. Each stage is committed separately
after native checks, tests, interface generation, and formatting. Features from
fscan and RustScan are references for independently implemented behavior.

## Stage 1 — TCP scanner

- [x] IP addresses, hostnames, IPv4 CIDR, target files, and exclusions
- [x] Port lists/ranges, bounded workers, timeouts, and connection rate limit
- [x] Separate open, closed, timed out, and failed connections
- [x] Streaming terminal and JSONL results, optional output file
- [x] Loopback integration tests, cancellation and resource cleanup

## Stage 2 — Service discovery

- [x] Bounded banner collection and evidence-based SSH/HTTP identification
- [x] HTTPS/TLS probing and certificate information (DER/base64 export)
- [x] Website titles with bounded response sizes and redirect policy (no redirects)

## Stage 3 — Scan workflows

- [x] Retry policy, progress, CSV reports, and global deadline
- [x] Optional Nmap integration using explicit process arguments
- [x] Native CI configuration and reproducible local performance checks

## Stage 4 — Detection extensions

- [x] Versioned fingerprint rules and explicit plugin interfaces
- [x] Passive detector budgets: zero new requests, bounded evidence/findings, cooperative deadline
- [x] Inventory checks with local fixtures and documented evidence

Stage 4 establishes evidence-based fingerprints and passive inventory checks.
Active vulnerability checks, authentication testing and exploit modules are future
work, each requiring its own explicit scope, fixtures and review.

## Engineering constraints

- Stream CIDR ranges; never materialize a host × port task matrix.
- Concurrency and connection starts per second are independent controls.
- A timeout is not proof that a port is closed.
- Cancellation must release sockets and stop workers.
- Linux native is verified locally; other platforms require their own CI results.
- Track the tested MoonBit toolchain because core async interfaces are evolving.

## Scope and resource safeguards

- [x] Loopback-only default, explicit numeric allowlist for other targets
- [x] Validate resolved destinations and IPv4-mapped IPv6 before connecting
- [x] Default rate 100/s, concurrency 32, 256 hosts, 65536 attempts, 60-second deadline
- [x] Reject over-budget tasks before TCP traffic; retries count toward planning
- [x] Explicit opt-in for protocol probing; no implicit probe activation by rules
- [x] Local-only regression tests for scope failures and CLI safeguards
