You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CLI and TUI copy the zone summary fields and pre-scan notices by hand #474
The CLI and the TUI fill the same seven zone fields of TargetSummary (AXFR and NSEC) by hand, line for line. The TUI also retypes several of the CLI's pre-scan notices as string literals.
Where
internal/cli/summary.go:35-42 and internal/tui/model.go:741-748 (zone fields; the TUI comment says "The same zone fields as the CLI's report")
Notices: the "Skipped %d invalid wordlist entries ..." line at internal/cli/session.go:754 and internal/tui/model.go:332; simulation notes at internal/tui/model.go:336, :340, :356 vs internal/cli/cli.go:514, internal/cli/session.go:427-435; the bundled-list note at internal/tui/model.go:377 retypes bundledWordlistName (internal/cli/wordlist.go:14).
Impact
Every new zone field (the NSEC fields were the last, #437) and every wording or limit change must be made in two places. Only the per-front-end tests catch a miss. The sources and permutation parts were already shared (report.Sources, report.Permutation, passive.AddedLine), so the pattern exists but was not applied here.
Suggested fix
Add a test that runs one lab zone through the CLI's targetSummary and the TUI's summary and compares the AXFR, NSEC and ZoneDenial fields.
Add report.Zone(t *output.TargetSummary, r axfr.Result, foundBy map[string]int) in internal/report and switch the TUI, then the CLI.
Move the shared notices into small functions next to their data (for example wordlist.SkippedLine(n), wordlist.BundledNote, a simulation-note helper), called from both front ends.
Fixed in 933ad25: new report.Zone fills the AXFR/NSEC/ZoneDenial fields and zone queries for both the CLI (via a targetAXFR.result() conversion) and the TUI. report.SimulationNote, wordlist.SkippedLine and wordlist.BundledName replace the retyped notices in both front ends; the printed text is the same. New TestZone and TestSimulationNote pin the shared output, and the existing CLI and TUI tests pass unchanged. Gate (gofmt, vet, golangci-lint v2.15.0, full suite) passes.
Activity
TMHSDigital commentedon Nov 29, 2026
Fixed in 933ad25: new report.Zone fills the AXFR/NSEC/ZoneDenial fields and zone queries for both the CLI (via a targetAXFR.result() conversion) and the TUI. report.SimulationNote, wordlist.SkippedLine and wordlist.BundledName replace the retyped notices in both front ends; the printed text is the same. New TestZone and TestSimulationNote pin the shared output, and the existing CLI and TUI tests pass unchanged. Gate (gofmt, vet, golangci-lint v2.15.0, full suite) passes.