Debian Codegraph @

hub1/.tests/dovecot-spam/scenario.assert

raw
1 len(results) == 3
2 "2.2.2.2" in results[0].Overflow.GetSources()
3 results[0].Overflow.Sources["2.2.2.2"].IP == "2.2.2.2"
4 results[0].Overflow.Sources["2.2.2.2"].Range == ""
5 results[0].Overflow.Sources["2.2.2.2"].GetScope() == "Ip"
6 results[0].Overflow.Sources["2.2.2.2"].GetValue() == "2.2.2.2"
7 results[0].Overflow.Alert.Events[0].GetMeta("datasource_path") == "dovecot-spam.log"
8 results[0].Overflow.Alert.Events[0].GetMeta("datasource_type") == "file"
9 results[0].Overflow.Alert.Events[0].GetMeta("dovecot_login_result") == "auth_failed"
10 results[0].Overflow.Alert.Events[0].GetMeta("log_type") == "dovecot_logs"
11 results[0].Overflow.Alert.Events[0].GetMeta("machine") == "mail"
12 results[0].Overflow.Alert.Events[0].GetMeta("source_ip") == "2.2.2.2"
13 results[0].Overflow.Alert.Events[0].GetMeta("timestamp")[4:] == "-04-29T15:54:18Z"
14 results[0].Overflow.Alert.Events[1].GetMeta("datasource_path") == "dovecot-spam.log"
15 results[0].Overflow.Alert.Events[1].GetMeta("datasource_type") == "file"
16 results[0].Overflow.Alert.Events[1].GetMeta("dovecot_login_result") == "auth_failed"
17 results[0].Overflow.Alert.Events[1].GetMeta("log_type") == "dovecot_logs"
18 results[0].Overflow.Alert.Events[1].GetMeta("machine") == "mail"
19 results[0].Overflow.Alert.Events[1].GetMeta("source_ip") == "2.2.2.2"
20 results[0].Overflow.Alert.Events[1].GetMeta("timestamp")[4:] == "-04-29T15:54:19Z"
21 results[0].Overflow.Alert.Events[2].GetMeta("datasource_path") == "dovecot-spam.log"
22 results[0].Overflow.Alert.Events[2].GetMeta("datasource_type") == "file"
23 results[0].Overflow.Alert.Events[2].GetMeta("dovecot_login_result") == "auth_failed"
24 results[0].Overflow.Alert.Events[2].GetMeta("log_type") == "dovecot_logs"
25 results[0].Overflow.Alert.Events[2].GetMeta("machine") == "mail"
26 results[0].Overflow.Alert.Events[2].GetMeta("source_ip") == "2.2.2.2"
27 results[0].Overflow.Alert.Events[2].GetMeta("timestamp")[4:] == "-04-29T15:54:20Z"
28 results[0].Overflow.Alert.Events[3].GetMeta("datasource_path") == "dovecot-spam.log"
29 results[0].Overflow.Alert.Events[3].GetMeta("datasource_type") == "file"
30 results[0].Overflow.Alert.Events[3].GetMeta("dovecot_login_result") == "auth_failed"
31 results[0].Overflow.Alert.Events[3].GetMeta("log_type") == "dovecot_logs"
32 results[0].Overflow.Alert.Events[3].GetMeta("machine") == "mail"
33 results[0].Overflow.Alert.Events[3].GetMeta("source_ip") == "2.2.2.2"
34 results[0].Overflow.Alert.Events[3].GetMeta("timestamp")[4:] == "-04-29T15:54:21Z"
35 results[0].Overflow.Alert.GetScenario() == "crowdsecurity/dovecot-spam"
36 results[0].Overflow.Alert.Remediation == true
37 results[0].Overflow.Alert.GetEventsCount() == 4
38 "172.17.0.1" in results[1].Overflow.GetSources()
39 results[1].Overflow.Sources["172.17.0.1"].IP == "172.17.0.1"
40 results[1].Overflow.Sources["172.17.0.1"].Range == ""
41 results[1].Overflow.Sources["172.17.0.1"].GetScope() == "Ip"
42 results[1].Overflow.Sources["172.17.0.1"].GetValue() == "172.17.0.1"
43 results[1].Overflow.Alert.Events[0].GetMeta("datasource_path") == "dovecot-spam.log"
44 results[1].Overflow.Alert.Events[0].GetMeta("datasource_type") == "file"
45 results[1].Overflow.Alert.Events[0].GetMeta("dovecot_login_result") == "auth_failed"
46 results[1].Overflow.Alert.Events[0].GetMeta("log_type") == "dovecot_logs"
47 results[1].Overflow.Alert.Events[0].GetMeta("machine") == "canyon"
48 results[1].Overflow.Alert.Events[0].GetMeta("source_ip") == "172.17.0.1"
49 results[1].Overflow.Alert.Events[0].GetMeta("timestamp")[4:] == "-10-12T15:44:47Z"
50 results[1].Overflow.Alert.Events[1].GetMeta("datasource_path") == "dovecot-spam.log"
51 results[1].Overflow.Alert.Events[1].GetMeta("datasource_type") == "file"
52 results[1].Overflow.Alert.Events[1].GetMeta("dovecot_login_result") == "auth_failed"
53 results[1].Overflow.Alert.Events[1].GetMeta("log_type") == "dovecot_logs"
54 results[1].Overflow.Alert.Events[1].GetMeta("machine") == "canyon"
55 results[1].Overflow.Alert.Events[1].GetMeta("source_ip") == "172.17.0.1"
56 results[1].Overflow.Alert.Events[1].GetMeta("timestamp")[4:] == "-10-12T15:46:28Z"
57 results[1].Overflow.Alert.Events[2].GetMeta("datasource_path") == "dovecot-spam.log"
58 results[1].Overflow.Alert.Events[2].GetMeta("datasource_type") == "file"
59 results[1].Overflow.Alert.Events[2].GetMeta("dovecot_login_result") == "auth_failed"
60 results[1].Overflow.Alert.Events[2].GetMeta("log_type") == "dovecot_logs"
61 results[1].Overflow.Alert.Events[2].GetMeta("machine") == "canyon"
62 results[1].Overflow.Alert.Events[2].GetMeta("source_ip") == "172.17.0.1"
63 results[1].Overflow.Alert.Events[2].GetMeta("timestamp")[4:] == "-10-12T15:46:32Z"
64 results[1].Overflow.Alert.Events[3].GetMeta("datasource_path") == "dovecot-spam.log"
65 results[1].Overflow.Alert.Events[3].GetMeta("datasource_type") == "file"
66 results[1].Overflow.Alert.Events[3].GetMeta("dovecot_login_result") == "auth_failed"
67 results[1].Overflow.Alert.Events[3].GetMeta("log_type") == "dovecot_logs"
68 results[1].Overflow.Alert.Events[3].GetMeta("machine") == "canyon"
69 results[1].Overflow.Alert.Events[3].GetMeta("source_ip") == "172.17.0.1"
70 results[1].Overflow.Alert.Events[3].GetMeta("timestamp")[4:] == "-10-12T15:46:33Z"
71 results[1].Overflow.Alert.GetScenario() == "crowdsecurity/dovecot-spam"
72 results[1].Overflow.Alert.Remediation == true
73 results[1].Overflow.Alert.GetEventsCount() == 4
74 "1.1.1.1" in results[2].Overflow.GetSources()
75 results[2].Overflow.Sources["1.1.1.1"].IP == "1.1.1.1"
76 results[2].Overflow.Sources["1.1.1.1"].Range == ""
77 results[2].Overflow.Sources["1.1.1.1"].GetScope() == "Ip"
78 results[2].Overflow.Sources["1.1.1.1"].GetValue() == "1.1.1.1"
79 results[2].Overflow.Alert.Events[0].GetMeta("datasource_path") == "dovecot-spam.log"
80 results[2].Overflow.Alert.Events[0].GetMeta("datasource_type") == "file"
81 results[2].Overflow.Alert.Events[0].GetMeta("dovecot_login_result") == "auth_failed"
82 results[2].Overflow.Alert.Events[0].GetMeta("log_type") == "dovecot_logs"
83 results[2].Overflow.Alert.Events[0].GetMeta("machine") == "canyon"
84 results[2].Overflow.Alert.Events[0].GetMeta("source_ip") == "1.1.1.1"
85 results[2].Overflow.Alert.Events[0].GetMeta("timestamp")[4:] == "-10-12T15:44:43Z"
86 results[2].Overflow.Alert.Events[1].GetMeta("datasource_path") == "dovecot-spam.log"
87 results[2].Overflow.Alert.Events[1].GetMeta("datasource_type") == "file"
88 results[2].Overflow.Alert.Events[1].GetMeta("dovecot_login_result") == "auth_failed"
89 results[2].Overflow.Alert.Events[1].GetMeta("log_type") == "dovecot_logs"
90 results[2].Overflow.Alert.Events[1].GetMeta("machine") == "canyon"
91 results[2].Overflow.Alert.Events[1].GetMeta("source_ip") == "1.1.1.1"
92 results[2].Overflow.Alert.Events[1].GetMeta("timestamp")[4:] == "-10-12T15:44:44Z"
93 results[2].Overflow.Alert.Events[2].GetMeta("datasource_path") == "dovecot-spam.log"
94 results[2].Overflow.Alert.Events[2].GetMeta("datasource_type") == "file"
95 results[2].Overflow.Alert.Events[2].GetMeta("dovecot_login_result") == "auth_failed"
96 results[2].Overflow.Alert.Events[2].GetMeta("log_type") == "dovecot_logs"
97 results[2].Overflow.Alert.Events[2].GetMeta("machine") == "canyon"
98 results[2].Overflow.Alert.Events[2].GetMeta("source_ip") == "1.1.1.1"
99 results[2].Overflow.Alert.Events[2].GetMeta("timestamp")[4:] == "-10-12T15:44:45Z"
100 results[2].Overflow.Alert.Events[3].GetMeta("datasource_path") == "dovecot-spam.log"
101 results[2].Overflow.Alert.Events[3].GetMeta("datasource_type") == "file"
102 results[2].Overflow.Alert.Events[3].GetMeta("dovecot_login_result") == "auth_failed"
103 results[2].Overflow.Alert.Events[3].GetMeta("log_type") == "dovecot_logs"
104 results[2].Overflow.Alert.Events[3].GetMeta("machine") == "canyon"
105 results[2].Overflow.Alert.Events[3].GetMeta("source_ip") == "1.1.1.1"
106 results[2].Overflow.Alert.Events[3].GetMeta("timestamp")[4:] == "-10-12T15:44:46Z"
107 results[2].Overflow.Alert.GetScenario() == "crowdsecurity/dovecot-spam"
108 results[2].Overflow.Alert.Remediation == true
109 results[2].Overflow.Alert.GetEventsCount() == 4