Resumed -follow-records hits come back with source wordlist
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 35/100
Línea de trabajo
Read internal/cli/session.go around restoreTarget and emitFrom, then review the resume tests in internal/cli. Add a hermetic resume test for a -follow-records hit and run go test ./internal/cli. Done means resumed results report records and records_found matches an uninterrupted run; pull request #442 is already open against this issue.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
When a run with -follow-records is resumed, results that the record-follow step found come back with sources: ["wordlist"] instead of ["records"]. The results file, -stats (records_found), and the source breakdown then disagree with the uninterrupted run.
Where
internal/cli/session.go:908(restoreTarget)internal/cli/session.go:653(emitFrom)internal/candidates/candidates.go:126(SourcesOf)
Details
restoreTarget re-emits each saved result as scan.Event{Result: r.Result}. Only -ptr hits get their saved sources back (ptrHit, added in #436). For everything else emitFrom works out the sources again:
case ev.Followed:
res.Sources = candidates.FromRecords
case !permutation:
res.Sources = s.cands.SourcesOf(res.Subdomain)
The restored event never has Followed set, and a record-follow target is not in the candidate set, so SourcesOf falls back to FromWordlist. s.foundBy then counts it under wordlist, not records.
Impact
For resumed -follow-records scans, results files and -stats report record-follow hits as wordlist hits. -diff against an uninterrupted run's file can also differ in sources. Low severity: the names themselves are correct.
Steps to reproduce
- Run a lab scan with
-follow-recordsand-resume state.jsonagainst a zone where a CNAME, MX or NS target is a new in-scope name. - Interrupt it after that name is found, then resume.
- In the JSON output, the followed name has
"sources": ["wordlist"].
Suggested fix
In restoreTarget, pass the saved r.Sources to emitFrom whenever they are present, as the -ptr branch already does, instead of recomputing them. Add a resume test that covers a -follow-records hit.
Acceptance criteria
- A resumed run reports record-follow hits with source
records, andrecords_foundmatches the uninterrupted run - A test covers it
Getting started
- Relevant files:
internal/cli/session.go,internal/cli/resume.go, the existing resume tests ininternal/cli - How to run tests:
go test ./internal/cli(tests must stay hermetic: use-simulate, a lab zone orinternal/dnstest) - Related: #432, #436
Filed by repo-audit/fix-issues at 2fb80e4. Severity: low. Effort: S. audit-key: bug|internal/cli/session.go|restoreTarget-sources
- Lenguaje dominante
- Go
- Estrellas
- 1
- Forks
- 1
- Merge medio
- 8 h 3 min
- PR fusionados (30 d)
- 31
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TMHSDigital/subenum
-
enhancement severity: low
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
TMHSDigital/subenum#416 ·
Los mantenedores suelen responder en 1 día
-
area: cli enhancement help wanted severity: low
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
TMHSDigital/subenum#376 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
community marketing priority: low
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
TMHSDigital/subenum#132 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
documentation marketing priority: medium
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
TMHSDigital/subenum#127 ·
Los mantenedores suelen responder en 1 día
-
ci feature marketing priority: medium
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
TMHSDigital/subenum#126 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de TMHSDigital/subenum
Issues similares
-
hive size:simple
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
nwverse/persona#12800 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
karmada-io/karmada#8110 ·
Los mantenedores suelen responder en 1 día
-
add CLI flag to hide animationPosiblemente ocupada @prdai la tomó hoy. Abiertofeature request
Dificultad 2/5 1-3 horas Aptitud para principiantes 60/100
ollama/ollama#19828 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Expose session state keys on the Go todo and agent-mode providersPosiblemente ocupada @gabisonia la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
microsoft/agent-framework-go#1412 ·
Los mantenedores suelen responder en 1 día