From 2b6c5f628612d70b6a42c9d1297ecb34d017595d Mon Sep 17 00:00:00 2001 From: Dogan Can Bakir <65292895+dogancanbakir@users.noreply.github.com> Date: Thu, 12 Dec 2024 22:14:23 +0300 Subject: [PATCH] Make failing sources non-default and exclude from tests (#1475) * make `dnsdumpster` non-default * minor * make `subdomaincenter` non-default --- v2/pkg/passive/sources_test.go | 4 ++-- v2/pkg/passive/sources_wo_auth_test.go | 16 +++++++++------- .../sources/dnsdumpster/dnsdumpster.go | 2 +- .../sources/subdomaincenter/subdomaincenter.go | 2 +- 4 files changed, 13 insertions(+), 11 deletions(-) diff --git a/v2/pkg/passive/sources_test.go b/v2/pkg/passive/sources_test.go index c99716d58..551a60740 100644 --- a/v2/pkg/passive/sources_test.go +++ b/v2/pkg/passive/sources_test.go @@ -68,7 +68,7 @@ var ( "chinaz", "crtsh", "digitorus", - "dnsdumpster", + // "dnsdumpster", //failing with "unexpected status code 403 received" "dnsrepo", "fofa", "fullhunt", @@ -89,7 +89,7 @@ var ( // "threatminer", // "reconcloud", "builtwith", - "subdomaincenter", + // "subdomaincenter", //failing with empty result } expectedDefaultRecursiveSources = []string{ diff --git a/v2/pkg/passive/sources_wo_auth_test.go b/v2/pkg/passive/sources_wo_auth_test.go index db30aba8a..b8ffc3de2 100644 --- a/v2/pkg/passive/sources_wo_auth_test.go +++ b/v2/pkg/passive/sources_wo_auth_test.go @@ -24,13 +24,15 @@ func TestSourcesWithoutKeys(t *testing.T) { } ignoredSources := []string{ - "commoncrawl", // commoncrawl is under resourced and will likely time-out so step over it for this test https://groups.google.com/u/2/g/common-crawl/c/3QmQjFA_3y4/m/vTbhGqIBBQAJ - "riddler", // failing due to cloudfront protection - "crtsh", // Fails in GH Action (possibly IP-based ban) causing a timeout. - "hackertarget", // Fails in GH Action (possibly IP-based ban) but works locally - "waybackarchive", // Fails randomly - "alienvault", // 503 Service Temporarily Unavailable - "digitorus", // failing with "Failed to retrieve certificate" + "commoncrawl", // commoncrawl is under resourced and will likely time-out so step over it for this test https://groups.google.com/u/2/g/common-crawl/c/3QmQjFA_3y4/m/vTbhGqIBBQAJ + "riddler", // failing due to cloudfront protection + "crtsh", // Fails in GH Action (possibly IP-based ban) causing a timeout. + "hackertarget", // Fails in GH Action (possibly IP-based ban) but works locally + "waybackarchive", // Fails randomly + "alienvault", // 503 Service Temporarily Unavailable + "digitorus", // failing with "Failed to retrieve certificate" + "dnsdumpster", // failing with "unexpected status code 403 received" + "subdomaincenter", //failing with empty result or random reason /shrug } domain := "hackerone.com" diff --git a/v2/pkg/subscraping/sources/dnsdumpster/dnsdumpster.go b/v2/pkg/subscraping/sources/dnsdumpster/dnsdumpster.go index 8e6afbd4a..6298d2c2d 100644 --- a/v2/pkg/subscraping/sources/dnsdumpster/dnsdumpster.go +++ b/v2/pkg/subscraping/sources/dnsdumpster/dnsdumpster.go @@ -118,7 +118,7 @@ func (s *Source) Name() string { } func (s *Source) IsDefault() bool { - return true + return false } func (s *Source) HasRecursiveSupport() bool { diff --git a/v2/pkg/subscraping/sources/subdomaincenter/subdomaincenter.go b/v2/pkg/subscraping/sources/subdomaincenter/subdomaincenter.go index 40873f32a..ea928f7ee 100644 --- a/v2/pkg/subscraping/sources/subdomaincenter/subdomaincenter.go +++ b/v2/pkg/subscraping/sources/subdomaincenter/subdomaincenter.go @@ -63,7 +63,7 @@ func (s *Source) Name() string { } func (s *Source) IsDefault() bool { - return true + return false } func (s *Source) HasRecursiveSupport() bool {