Skip to content

SpiderFoot automates OSINT for threat intelligence and mapping your attack surface.

sfwebui: do not show api key instructions for modules with no instructions (#1264)

bcoles840c3de9b6fd
diff --git a/modules/sfp_dehashed.py b/modules/sfp_dehashed.py
index 3696a4bd..58681a63 100644
--- a/modules/sfp_dehashed.py
+++ b/modules/sfp_dehashed.py
@@ -29,6 +29,8 @@ class sfp_dehashed(SpiderFootPlugin):
'references': [
"https://www.dehashed.com/docs"
],
+ 'apiKeyInstructions': [
+ ],
'favIcon': "https://www.dehashed.com/assets/img/favicon.ico",
'logo': "https://www.dehashed.com/assets/img/logo.png",
'description': "Have you been compromised? "
diff --git a/modules/sfp_grayhatwarfare.py b/modules/sfp_grayhatwarfare.py
index dd2794aa..19e2b6bc 100644
--- a/modules/sfp_grayhatwarfare.py
+++ b/modules/sfp_grayhatwarfare.py
@@ -29,6 +29,8 @@ class sfp_grayhatwarfare(SpiderFootPlugin):
'references': [
"https://buckets.grayhatwarfare.com/docs/api/v1"
],
+ 'apiKeyInstructions': [
+ ],
'favIcon': "https://buckets.grayhatwarfare.com/assets/template/images/favicon.png",
'logo': "https://buckets.grayhatwarfare.com/assets/images/logo/logo-sm.png",
'description': "It is a searchable database of open buckets."
diff --git a/modules/sfp_onioncity.py b/modules/sfp_onioncity.py
index eba8f7ef..13efba87 100644
--- a/modules/sfp_onioncity.py
+++ b/modules/sfp_onioncity.py
@@ -27,6 +27,8 @@ class sfp_onioncity(SpiderFootPlugin):
'dataSource': {
'website': "https://onion.link/",
'model': "FREE_NOAUTH_UNLIMITED",
+ 'apiKeyInstructions': [
+ ],
'favIcon': "https://www.google.com/s2/favicons?domain=https://onion.link",
'logo': "https://onion.link/images/OC.png",
'description': "Enabling search and global access to Tor's onionsites.",
diff --git a/modules/sfp_seon.py b/modules/sfp_seon.py
index 22d8253f..ed19f1b2 100644
--- a/modules/sfp_seon.py
+++ b/modules/sfp_seon.py
@@ -30,6 +30,8 @@ class sfp_seon(SpiderFootPlugin):
'references': [
"https://developers.seon.io/"
],
+ 'apiKeyInstructions': [
+ ],
'favIcon': "https://seon.io/assets/favicons/favicon-16x16.png",
'logo': "https://seon.io/assets/favicons/apple-touch-icon-152.png",
'description': "SEON Fraud Prevention tools help organisations reduce "
diff --git a/modules/sfp_sociallinks.py b/modules/sfp_sociallinks.py
index 53844154..4ac699e0 100644
--- a/modules/sfp_sociallinks.py
+++ b/modules/sfp_sociallinks.py
@@ -30,7 +30,9 @@ class sfp_sociallinks(SpiderFootPlugin):
'references': [
"https://docs.osint.rest/"
],
- 'favIcon': "view-source:https://static.tildacdn.com/tild6563-6633-4533-b362-663333656461/favicon.ico",
+ 'apiKeyInstructions': [
+ ],
+ 'favIcon': "https://static.tildacdn.com/tild6563-6633-4533-b362-663333656461/favicon.ico",
'logo': "https://static.tildacdn.com/tild3935-6136-4330-b561-643034663032/LogoSL.svg",
'description': "Social Links provides instruments for OSINT methods "
"that are used by the world's leading investigation and law enforcement agencies",
diff --git a/test/unit/test_spiderfoot_module_loading.py b/test/unit/test_spiderfoot_module_loading.py
index d83363da..9ad10539 100644
--- a/test/unit/test_spiderfoot_module_loading.py
+++ b/test/unit/test_spiderfoot_module_loading.py
@@ -56,13 +56,11 @@ class TestSpiderFootModuleLoading(unittest.TestCase):
self.assertTrue(m.get('object'))
self.assertTrue(m.get('name'))
self.assertTrue(m.get('meta'))
+ self.assertTrue(m.get('descr'))
+ self.assertTrue(m.get('consumes'))
self.assertIsInstance(m.get('cats'), list)
- # self.assertTrue(m.get('group'))
self.assertIsInstance(m.get('labels'), list)
- self.assertTrue(m.get('descr'))
- # self.assertTrue(m.get('provides'))
self.assertIsInstance(m.get('provides'), list)
- self.assertTrue(m.get('consumes'))
self.assertIsInstance(m.get('consumes'), list)
self.assertIsInstance(m.get('meta'), dict)
@@ -70,14 +68,20 @@ class TestSpiderFootModuleLoading(unittest.TestCase):
if module in ["sfp__stor_db", "sfp__stor_stdout"]:
continue
- for cat in m.get('group', list()):
- self.assertIn(cat, valid_use_cases)
+ self.assertTrue(m.get('group'))
+ self.assertTrue(m.get('provides'))
+
+ for group in m.get('group', list()):
+ self.assertIn(group, valid_use_cases)
for cat in m.get('cats', list()):
self.assertIn(cat, valid_categories)
- self.assertTrue(m.get('name'))
- self.assertTrue(m.get('descr'))
+ meta = m.get('meta')
+
+ if 'dataSource' in meta and 'apikey' in m.get('labels'):
+ self.assertIsInstance(meta.get('dataSource').get('apiKeyInstructions'), list)
+ # self.assertTrue(meta.get('dataSource').get('apiKeyInstructions'))
# check len(options) == len(option descriptions)
if m.get('opts'):