feat(13-03): wire 4 Phase 13 sources into RegisterAll (32 total)

- Register DockerHub, Kubernetes, Terraform, Helm as credentialless sources
- Update RegisterAll tests and integration test to expect 32 sources
This commit is contained in:
salvacybersec
2026-04-06 12:55:52 +03:00
parent c2c43dfba9
commit 7e0e401266
3 changed files with 31 additions and 9 deletions

View File

@@ -524,8 +524,8 @@ func TestRegisterAll_Phase12(t *testing.T) {
}) })
names := eng.List() names := eng.List()
if n := len(names); n != 28 { if n := len(names); n != 32 {
t.Fatalf("expected 28 sources from RegisterAll, got %d: %v", n, names) t.Fatalf("expected 32 sources from RegisterAll, got %d: %v", n, names)
} }
// Build lookup for source access. // Build lookup for source access.

View File

@@ -56,8 +56,8 @@ type SourcesConfig struct {
} }
// RegisterAll registers every Phase 10 code-hosting, Phase 11 search engine / // RegisterAll registers every Phase 10 code-hosting, Phase 11 search engine /
// paste site, and Phase 12 IoT scanner / cloud storage source on engine // paste site, Phase 12 IoT scanner / cloud storage, and Phase 13 container /
// (28 sources total). // IaC source on engine (32 sources total).
// //
// All sources are registered unconditionally so that cmd/recon.go can surface // All sources are registered unconditionally so that cmd/recon.go can surface
// the full catalog via `keyhunter recon list` regardless of which credentials // the full catalog via `keyhunter recon list` regardless of which credentials
@@ -212,4 +212,22 @@ func RegisterAll(engine *recon.Engine, cfg SourcesConfig) {
Registry: reg, Registry: reg,
Limiters: lim, Limiters: lim,
}) })
// Phase 13: Container and IaC sources (credentialless).
engine.Register(&DockerHubSource{
Registry: reg,
Limiters: lim,
})
engine.Register(&KubernetesSource{
Registry: reg,
Limiters: lim,
})
engine.Register(&TerraformSource{
Registry: reg,
Limiters: lim,
})
engine.Register(&HelmSource{
Registry: reg,
Limiters: lim,
})
} }

View File

@@ -16,9 +16,9 @@ func registerTestRegistry() *providers.Registry {
}) })
} }
// TestRegisterAll_WiresAllTwentyEightSources asserts that RegisterAll registers // TestRegisterAll_WiresAllThirtyTwoSources asserts that RegisterAll registers
// every Phase 10 + Phase 11 + Phase 12 source by its stable name on a fresh engine. // every Phase 10 + Phase 11 + Phase 12 + Phase 13 source by its stable name on a fresh engine.
func TestRegisterAll_WiresAllTwentyEightSources(t *testing.T) { func TestRegisterAll_WiresAllThirtyTwoSources(t *testing.T) {
eng := recon.NewEngine() eng := recon.NewEngine()
cfg := SourcesConfig{ cfg := SourcesConfig{
Registry: registerTestRegistry(), Registry: registerTestRegistry(),
@@ -36,6 +36,7 @@ func TestRegisterAll_WiresAllTwentyEightSources(t *testing.T) {
"censys", "censys",
"codeberg", "codeberg",
"codesandbox", "codesandbox",
"dockerhub",
"duckduckgo", "duckduckgo",
"fofa", "fofa",
"gcs", "gcs",
@@ -44,7 +45,9 @@ func TestRegisterAll_WiresAllTwentyEightSources(t *testing.T) {
"github", "github",
"gitlab", "gitlab",
"google", "google",
"helm",
"huggingface", "huggingface",
"k8s",
"kaggle", "kaggle",
"netlas", "netlas",
"pastebin", "pastebin",
@@ -54,6 +57,7 @@ func TestRegisterAll_WiresAllTwentyEightSources(t *testing.T) {
"sandboxes", "sandboxes",
"shodan", "shodan",
"spaces", "spaces",
"terraform",
"yandex", "yandex",
"zoomeye", "zoomeye",
} }
@@ -73,8 +77,8 @@ func TestRegisterAll_MissingCredsStillRegistered(t *testing.T) {
Limiters: recon.NewLimiterRegistry(), Limiters: recon.NewLimiterRegistry(),
}) })
if n := len(eng.List()); n != 28 { if n := len(eng.List()); n != 32 {
t.Fatalf("expected 28 sources registered, got %d: %v", n, eng.List()) t.Fatalf("expected 32 sources registered, got %d: %v", n, eng.List())
} }
// SweepAll with an empty config should filter out cred-gated sources // SweepAll with an empty config should filter out cred-gated sources