TUI labels Follow Records results as wordlist names and omits records_found

オープン 初心者向け
#494 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
88/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
go
領域
cli

調査の方向性

まず internal/tui/model.go、特に updateScan、record、summary を確認し、次に internal/cli/session.go と internal/cli/summary.go のCLI処理と比較してください。internal/tui/form.go と既存のテスト internal/tui/passes_test.go を確認し、go test ./internal/tui/ を実行してください。完了条件は、フォローアップの結果が両方のパスでレコードとしてラベル付けされ、レポートに records_found が含まれ、TUIのテストがその両方をカバーすることです。

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
Go
スター
1
フォーク
1
平均マージ
10時間
マージ済み PR(30日)
26

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TMHSDigital/subenum のほかの issue

TMHSDigital/subenum の issue をすべて見る

似ている issue

Go の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。