|
7 | 7 |
|
8 | 8 | from api_app.analyzables_manager.models import Analyzable |
9 | 9 | from api_app.analyzers_manager.file_analyzers import quark_engine, yara_scan |
10 | | -from api_app.analyzers_manager.models import AnalyzerConfig |
11 | 10 | from api_app.analyzers_manager.observable_analyzers import ( |
12 | 11 | feodo_tracker, |
13 | | - greynoise_labs, |
14 | 12 | ja4_db, |
15 | 13 | maxmind, |
16 | 14 | phishing_army, |
|
19 | 17 | tor_nodes_danmeuk, |
20 | 18 | tweetfeeds, |
21 | 19 | ) |
22 | | -from api_app.choices import Classification, PythonModuleBasePaths |
23 | | -from api_app.models import Job, Parameter, PluginConfig, PythonModule |
| 20 | +from api_app.choices import Classification |
| 21 | +from api_app.models import Job |
24 | 22 | from intel_owl.tasks import check_stuck_analysis, remove_old_jobs |
25 | 23 |
|
26 | 24 | from . import CustomTestCase, get_logger |
@@ -306,57 +304,3 @@ def create_yara_file(path): |
306 | 304 | mock_zipfile.return_value.extractall.side_effect = create_yara_file |
307 | 305 | result = yara_scan.YaraScan.update() |
308 | 306 | self.assertTrue(result) |
309 | | - |
310 | | - @if_mock_connections( |
311 | | - patch( |
312 | | - "requests.post", |
313 | | - return_value=MockUpResponse( |
314 | | - { |
315 | | - "data": { |
316 | | - "topC2s": { |
317 | | - "queryInfo": { |
318 | | - "resultsAvailable": 1914, |
319 | | - "resultsLimit": 191, |
320 | | - }, |
321 | | - "c2s": [ |
322 | | - { |
323 | | - "source_ip": "91.92.247.12", |
324 | | - "c2_ips": ["103.245.236.120"], |
325 | | - "c2_domains": [], |
326 | | - "hits": 11608, |
327 | | - }, |
328 | | - { |
329 | | - "source_ip": "14.225.208.190", |
330 | | - "c2_ips": ["14.225.213.142"], |
331 | | - "c2_domains": [], |
332 | | - "hits": 2091, |
333 | | - "pervasiveness": 26, |
334 | | - }, |
335 | | - { |
336 | | - "source_ip": "157.10.53.101", |
337 | | - "c2_ips": ["14.225.208.190"], |
338 | | - "c2_domains": [], |
339 | | - "hits": 1193, |
340 | | - "pervasiveness": 23, |
341 | | - }, |
342 | | - ], |
343 | | - }, |
344 | | - }, |
345 | | - }, |
346 | | - 200, |
347 | | - ), |
348 | | - ) |
349 | | - ) |
350 | | - def test_greynoise_labs_updater(self, mock_post=None): |
351 | | - python_module = PythonModule.objects.get( |
352 | | - base_path=PythonModuleBasePaths.ObservableAnalyzer.value, |
353 | | - module="greynoise_labs.GreynoiseLabs", |
354 | | - ) |
355 | | - PluginConfig.objects.create( |
356 | | - value="test", |
357 | | - parameter=Parameter.objects.get(python_module=python_module, is_secret=True, name="auth_token"), |
358 | | - for_organization=False, |
359 | | - owner=None, |
360 | | - analyzer_config=AnalyzerConfig.objects.filter(python_module=python_module).first(), |
361 | | - ) |
362 | | - self.assertTrue(greynoise_labs.GreynoiseLabs.update()) |
0 commit comments