TUI labels Follow Records results as wordlist names and omits records_found

Abierto Apto para principiantes
#494 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
88/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
go
Área
cli

Línea de trabajo

Empieza por internal/tui/model.go, especialmente por updateScan, record y summary, y luego compara el manejo de la CLI en internal/cli/session.go y internal/cli/summary.go. Revisa internal/tui/form.go y las pruebas existentes en internal/tui/passes_test.go; ejecuta go test ./internal/tui/. El trabajo estará terminado cuando los resultados del seguimiento estén etiquetados como registros en ambas pasadas, los informes incluyan records_found y una prueba de TUI cubra ambas cosas.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
Go
Estrellas
1
Forks
1
Merge medio
10 h
PR fusionados (30 d)
26

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TMHSDigital/subenum

Todos los issues de TMHSDigital/subenum

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.