You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Passive-source merge is duplicated between the CLI and pkg/subenum #265
The CLI and the library merge passive-source names into the candidate list with separate copies of the same logic. The CLI helpers still have CT-only names from before #193.
pkg/subenum/sources.go:21-63 (withSourceNames, its own User-Agent constant at :21)
internal/passive/passive.go:67-69 (passive.New registry, which pkg bypasses by building ct.Client and passive.Wayback directly)
Why it hurts now
A third source has to be wired in two places. Dedupe and ordering rules can diverge between the CLI and the library, and resume positions depend on that order.
Plan
Test first: a table test for the merge (dedupe, order, normalization) run against both current implementations.
Move the merge into passive.Merge(entries, names, domain) ([]string, int) and call it from both.
Rename withCTEntries and withCTSeeds to source-neutral names.
Have the pkg constructors call passive.New and share the User-Agent constant.
Fixed in 49d245a: the merge now lives in passive.Merge and is called by both the CLI's candidates.add and pkg's withSourceNames; pkg's CertificateTransparency/WaybackMachine go through passive.New. (withCTEntries/withCTSeeds had already been renamed.) Verified with the new TestMerge, the full test suite and golangci-lint v2.15.0.
Activity
TMHSDigital commentedon Nov 14, 2026
Fixed in 49d245a: the merge now lives in passive.Merge and is called by both the CLI's candidates.add and pkg's withSourceNames; pkg's CertificateTransparency/WaybackMachine go through passive.New. (withCTEntries/withCTSeeds had already been renamed.) Verified with the new TestMerge, the full test suite and golangci-lint v2.15.0.