Resumed -follow-records hits come back with source wordlist
维护者通常 1 天内回复
评估
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Go
- 星标
- 1
- 派生
- 1
- 平均合并
- 8 小时 3 分钟
- 30 天内合并 PR
- 31
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/subenum 的其他 Issue
-
enhancement severity: low
难度 4/5 3-5 天 新手友好度 55/100
TMHSDigital/subenum#416 ·
维护者通常 1 天内回复
-
area: cli enhancement help wanted severity: low
难度 4/5 3-5 天 新手友好度 35/100
TMHSDigital/subenum#376 · 1 条评论 ·
维护者通常 1 天内回复
-
community marketing priority: low
难度 5/5 一周以上 新手友好度 35/100
TMHSDigital/subenum#132 · 1 条评论 ·
维护者通常 1 天内回复
-
documentation marketing priority: medium
难度 5/5 一周以上 新手友好度 25/100
TMHSDigital/subenum#127 ·
维护者通常 1 天内回复
-
ci feature marketing priority: medium
难度 5/5 一周以上 新手友好度 35/100
TMHSDigital/subenum#126 · 1 条评论 ·
维护者通常 1 天内回复
查看 TMHSDigital/subenum 的全部 Issue
相似的 Issue
-
add CLI flag to hide animation可能已有人在做 @prdai 今天认领。 未关闭feature request
难度 2/5 1-3 小时 新手友好度 60/100
维护者通常 1 天内回复
-
Expose session state keys on the Go todo and agent-mode providers可能已有人在做 @gabisonia 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
microsoft/agent-framework-go#1412 ·
维护者通常 1 天内回复
-
area:webapp bug finding
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
flaky-test
难度 1/5 1 小时以内 新手友好度 88/100
维护者通常 1 天内回复
-
kind/cleanup
难度 2/5 1-3 小时 新手友好度 82/100
kubernetes-sigs/kueue#19279 ·
维护者通常 1 天内回复