Repository navigation
Description
Summary
"Seed then resolve" is built once for certificate transparency. Other keyless passive sources (for example passive-DNS and web-archive indexes) would reuse the same merge path verbatim, but the CT client is a concrete type hard-wired in main_ct.go, and the library cannot seed from CT at all.
Where
internal/ct/ct.go:30(concreteClient, single URL at:22)main_ct.go:24(hard-wired),main_ct.go:40-62(merge-into-candidates logic is already source-agnostic)pkg/subenum/subenum.go:347(no seeding hook in the library)
Proposal
Define type Source interface{ Names(ctx, domain string) ([]string, error) }, move the crt.sh client behind it, add -sources ct,... (default ct when -ct is set), record per-source names and error in the report, and have lab mode refuse all sources as it does -ct. Every seeded name is still verified by resolution. Expose a Sources []Source option in pkg/subenum.
Who benefits
Users who want more coverage without API keys; library embedders who want CT seeding.
Open questions
- External endpoints rate-limit; keep one request per source per target and report failures as notices, as
ct_errordoes - Which sources to ship first
Acceptance criteria
- CT works unchanged through the interface
- At least one additional source behind a flag
- Library can pass sources
Getting started
- Relevant files:
internal/ct/ct.go,main_ct.go,pkg/subenum/subenum.go - How to run tests:
go test ./internal/ct/ . ./pkg/... - Related docs: README (
-ct),docs/library.md
Related: #85
Filed by repo-audit/full-audit at 3139c44. Severity: medium. Effort: M. audit-key: enhancement|internal/ct/ct.go|passive-sources
Activity
TMHSDigital commentedon Nov 13, 2026
Fixed in 0160819.
Interface:
internal/passiveholdsSource(Name,Names(ctx, domain)) and a registry (Known,ParseList,New). The crt.sh client implements it unchanged.Second source:
waybackreads hostnames from the Wayback Machine's CDX index of archived URLs. It's one HTTPS request per target with no API key, bounded to 200k URLs and 64 MB.CLI:
-sources ct,waybackpicks the sources;-ctstays as shorthand for-sources ct.-permuteseeds, and each is still verified by a lookup.sources: [{name, names, error}];ct_namesandct_errorare kept.-sources, and simulation ignores it.Library:
Config.Sources, theSourceinterface,CertificateTransparency(),WaybackMachine()andNoticeSource. Sources are asked before the scan insideRun's goroutine, soRunstill returns at once.Open questions from the issue:
Sourceeach.Acceptance criteria:
Verified with
go test -race ./...and golangci-lint locally, and CI is green on every job.