File tree Expand file tree Collapse file tree
api_app/analyzers_manager/observable_analyzers
tests/api_app/analyzers_manager/unit_tests/observable_analyzers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,6 +103,10 @@ def run(self):
103103 + self .get_param_url (["sortby" , "page" , "installed_software" ])
104104 )
105105 response = requests .post (url , headers = headers , json = {"login" : self .observable_name })
106+ else :
107+ raise AnalyzerConfigurationException (
108+ f"Invalid GENERIC observable (not an email): { self .observable_name } " + " for HudsonRock"
109+ )
106110 else :
107111 raise AnalyzerConfigurationException (
108112 f"Invalid observable type { self .observable_classification } "
Original file line number Diff line number Diff line change 1+ [
2+ {
3+ "number" : 3653 ,
4+ "title" : " [BUG] job_pipeline task does not set job's final status on exception jobs get stuck in RUNNING forever" ,
5+ "url" : " https://github.com/intelowlproject/IntelOwl/issues/3653" ,
6+ "labels" : [
7+ " bug"
8+ ]
9+ },
10+ {
11+ "number" : 3647 ,
12+ "title" : " [Bug] HudsonRock analyzer crashes when GENERIC observable is not an email" ,
13+ "url" : " https://github.com/intelowlproject/IntelOwl/issues/3647" ,
14+ "labels" : [
15+ " bug"
16+ ]
17+ },
18+ {
19+ "number" : 3639 ,
20+ "title" : " Race condition in Job creation causes data loss" ,
21+ "url" : " https://github.com/intelowlproject/IntelOwl/issues/3639" ,
22+ "labels" : [
23+ " bug"
24+ ]
25+ },
26+ {
27+ "number" : 3623 ,
28+ "title" : " Cross-organization data leakage in plugin_state_viewer endpoint" ,
29+ "url" : " https://github.com/intelowlproject/IntelOwl/issues/3623" ,
30+ "labels" : []
31+ },
32+ {
33+ "number" : 3622 ,
34+ "title" : " History artifacts tabs are broken" ,
35+ "url" : " https://github.com/intelowlproject/IntelOwl/issues/3622" ,
36+ "labels" : [
37+ " bug" ,
38+ " frontend"
39+ ]
40+ }
41+ ]
Original file line number Diff line number Diff line change 1+ from api_app .analyzers_manager .exceptions import AnalyzerConfigurationException
12from api_app .analyzers_manager .observable_analyzers .hudsonrock import HudsonRock
23from tests .api_app .analyzers_manager .unit_tests .observable_analyzers .base_test_class import (
34 BaseAnalyzerTest ,
@@ -37,3 +38,11 @@ def get_mocked_response():
3738 200 ,
3839 ),
3940 )
41+
42+ def test_invalid_generic_raises_exception (self ):
43+ config = self .get_extra_config ()
44+ config ["observable_name" ] = "johndoe123"
45+
46+ analyzer = self .analyzer_class (** config )
47+ with self .assertRaises (AnalyzerConfigurationException ):
48+ analyzer .run ()
You can’t perform that action at this time.
0 commit comments