Resumed -follow-records hits come back with source wordlist
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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
- Ngôn ngữ chính
- Go
- Star
- 1
- Fork
- 1
- Merge trung bình
- 8 giờ 3 phút
- Pull request đã merge (30 ngày)
- 31
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TMHSDigital/subenum
-
enhancement severity: low
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
TMHSDigital/subenum#416 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: cli enhancement help wanted severity: low
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
TMHSDigital/subenum#376 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
community marketing priority: low
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
TMHSDigital/subenum#132 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
documentation marketing priority: medium
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
TMHSDigital/subenum#127 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ci feature marketing priority: medium
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
TMHSDigital/subenum#126 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TMHSDigital/subenum
Issue tương tự
-
add CLI flag to hide animationCó thể đã có người làm @prdai đã nhận hôm nay. Đang mởfeature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 60/100
ollama/ollama#19828 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Expose session state keys on the Go todo and agent-mode providersCó thể đã có người làm @gabisonia đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
microsoft/agent-framework-go#1412 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:webapp bug finding
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
flaky-test
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
kind/cleanup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
kubernetes-sigs/kueue#19279 ·
Maintainer thường phản hồi trong vòng 1 ngày