TUI labels Follow Records results as wordlist names and omits records_found

Aberta Para iniciantes
#494 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
88/100
Tipo de issue
Bug
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
go
Domínio
cli

Direção de pesquisa

Comece por internal/tui/model.go, especialmente updateScan, record e summary, depois compare o tratamento da CLI em internal/cli/session.go e internal/cli/summary.go. Verifique internal/tui/form.go e os testes existentes em internal/tui/passes_test.go; execute go test ./internal/tui/. O trabalho estará concluído quando os resultados do acompanhamento estiverem identificados como registros nas duas passagens, os relatórios incluírem records_found e um teste de TUI cobrir ambos.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

area: tui bug good first issue severity: low

Summary

With Follow Records on, the TUI does not know which results came from a found name's records. The engine marks them (Event.Followed), and the command line labels them sources: ["records"] and counts them in records_found; the TUI drops the mark, so they are labelled as wordlist names (or as permutation hits) and the report has no records_found.

Where

  • internal/tui/model.go (updateScan: m.record(ev.Result) passes the result without ev.Followed; record; summary never sets RecordsFound)
  • internal/tui/form.go (formValues.attributed does not count Follow Records, so with only that toggle on the results file has no sources at all)
  • For comparison: internal/cli/session.go (emitFrom: case ev.Followed: res.Sources = candidates.FromRecords) and internal/cli/summary.go (t.RecordsFound = res.foundBy[candidates.Records])

Details

// internal/tui/model.go
case ev.Kind == scan.EventResult:
	m.record(ev.Result)

record then picks the sources from the stage and the candidate set only. A followed name is not in the candidate set, and SourcesOf answers ["wordlist"] for any name it does not know.

Impact

TUI users who turn on Follow Records with Sources, Permute, Zone Transfer, NSEC Walk, Service Names or PTR Lookups get results files that say a followed name (for example lb-7.int.example.com behind app CNAME lb-7.int) came from the wordlist. With Follow Records alone, the file names no sources. The Stats File and the JSONL summary lack records_found, which the command line writes for the same scan.

Steps to reproduce

  1. Serve a zone where app.example.com has CNAME lb-7.int.example.com and lb-7.int.example.com has an A record.
  2. In the TUI: wordlist app, Record Types A,CNAME, Follow Records and Permute on, an Output file in jsonl.
  3. The line for lb-7.int.example.com has "sources":["wordlist"]; the summary line has no records_found. The command line with -follow-records -permute writes "sources":["records"] and "records_found":1.

Suggested fix

Pass the event (or its Followed flag) to record, label a followed result candidates.FromRecords before the stage and candidate-set cases, count Follow Records in attributed, and set t.RecordsFound = m.foundBy[candidates.Records] in summary.

Acceptance criteria

  • A followed name's result in a TUI output file has sources ["records"], in the main pass and in a later pass.
  • The TUI's report has records_found when Follow Records found names.
  • A test in internal/tui covers both.

Getting started

  • Relevant files: internal/tui/model.go, internal/tui/form.go, internal/tui/passes_test.go
  • How to run tests: go test ./internal/tui/
  • Related: #476, #432

Filed by repo-audit/fix-issues at b8afd4d. Severity: low. Effort: S. audit-key: bug|internal/tui/model.go|record

Linguagem predominante
Go
Estrelas
1
Forks
1
Merge médio
10h
PRs com merge (30d)
26

Preparar o ambiente

Abrir no Codespaces

Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de TMHSDigital/subenum

Todas as issues de TMHSDigital/subenum

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.