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分
- マージ済み PR(30日)
- 31
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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 1週間以上 初心者へのやさしさ 35/100
TMHSDigital/subenum#132 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation marketing priority: medium
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
TMHSDigital/subenum#127 ·
メンテナーはふだん 1 日以内に返信
-
ci feature marketing priority: medium
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
TMHSDigital/subenum#126 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
TMHSDigital/subenum の issue をすべて見る
似ている issue
-
hive size:simple
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
nwverse/persona#12800 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
karmada-io/karmada#8110 ·
メンテナーはふだん 1 日以内に返信
-
add CLI flag to hide animation対応中かも @prdai が今日担当しました。 オープンfeature request
難易度 2/5 1〜3時間 初心者へのやさしさ 60/100
ollama/ollama#19828 · コメント 1 件 ·
メンテナーはふだん 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 日以内に返信