Skip to content

Commit 1a7c306

Browse files
authored
Update dependencies (#1032)
1 parent f4f753c commit 1a7c306

34 files changed

+373
-361
lines changed

core/common/utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
if hasattr(yeti_config, "tldextract"):
1616
if yeti_config.tldextract.extra_suffixes:
17-
tld_extract_dict[
18-
"extra_suffixes"
19-
] = yeti_config.tldextract.extra_suffixes.split(",")
17+
tld_extract_dict["extra_suffixes"] = (
18+
yeti_config.tldextract.extra_suffixes.split(",")
19+
)
2020
if yeti_config.tldextract.suffix_list_urls:
2121
tld_extract_dict["suffix_list_urls"] = yeti_config.tldextract.suffix_list_urls
2222

core/database_arango.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Class implementing a YetiConnector interface for ArangoDB."""
2+
23
import datetime
34
import json
45
import logging

core/schemas/observables/certificate.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ class Certificate(observable.Observable):
2222
fingerprint: the certificate fingerprint.
2323
"""
2424

25-
type: Literal[
25+
type: Literal[observable.ObservableType.certificate] = (
2626
observable.ObservableType.certificate
27-
] = observable.ObservableType.certificate
27+
)
2828
last_seen: datetime.datetime = Field(default_factory=now)
2929
first_seen: datetime.datetime = Field(default_factory=now)
3030
issuer: str | None = None

core/schemas/observables/command_line.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55

66
class CommandLine(observable.Observable):
7-
type: Literal[
7+
type: Literal[observable.ObservableType.command_line] = (
88
observable.ObservableType.command_line
9-
] = observable.ObservableType.command_line
9+
)
1010

1111

1212
observable.TYPE_MAPPING[observable.ObservableType.command_line] = CommandLine

core/schemas/observables/docker_image.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55

66
class DockerImage(observable.Observable):
7-
type: Literal[
7+
type: Literal[observable.ObservableType.docker_image] = (
88
observable.ObservableType.docker_image
9-
] = observable.ObservableType.docker_image
9+
)
1010

1111

1212
observable.TYPE_MAPPING[observable.ObservableType.docker_image] = DockerImage

core/schemas/observables/hostname.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55

66
class Hostname(observable.Observable):
7-
type: Literal[
7+
type: Literal[observable.ObservableType.hostname] = (
88
observable.ObservableType.hostname
9-
] = observable.ObservableType.hostname
9+
)
1010

1111

1212
observable.TYPE_MAPPING[observable.ObservableType.hostname] = Hostname

core/schemas/observables/mac_address.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55

66
class MacAddress(observable.Observable):
7-
type: Literal[
7+
type: Literal[observable.ObservableType.mac_address] = (
88
observable.ObservableType.mac_address
9-
] = observable.ObservableType.mac_address
9+
)
1010

1111

1212
observable.TYPE_MAPPING[observable.ObservableType.mac_address] = MacAddress

core/schemas/observables/named_pipe.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55

66
class NamedPipe(observable.Observable):
7-
type: Literal[
7+
type: Literal[observable.ObservableType.named_pipe] = (
88
observable.ObservableType.named_pipe
9-
] = observable.ObservableType.named_pipe
9+
)
1010

1111

1212
observable.TYPE_MAPPING[observable.ObservableType.named_pipe] = NamedPipe

core/schemas/observables/registry_key.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ class RegistryKey(observable.Observable):
2626
path_file: The filesystem path to the file that contains the registry key value.
2727
"""
2828

29-
type: Literal[
29+
type: Literal[observable.ObservableType.registry_key] = (
3030
observable.ObservableType.registry_key
31-
] = observable.ObservableType.registry_key
31+
)
3232
key: str
3333
data: bytes
3434
hive: RegistryHive

core/schemas/observables/user_account.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class UserAccount(observable.Observable):
1414
Value should to be in the form <ACCOUNT_TYPE>:<ACCOUNT_LOGIN>.
1515
"""
1616

17-
type: Literal[
17+
type: Literal[observable.ObservableType.user_account] = (
1818
observable.ObservableType.user_account
19-
] = observable.ObservableType.user_account
19+
)
2020
user_id: str | None = None
2121
credential: str | None = None
2222
account_login: str | None = None

core/schemas/observables/user_agent.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55

66
class UserAgent(observable.Observable):
7-
type: Literal[
7+
type: Literal[observable.ObservableType.user_agent] = (
88
observable.ObservableType.user_agent
9-
] = observable.ObservableType.user_agent
9+
)
1010

1111

1212
observable.TYPE_MAPPING[observable.ObservableType.user_agent] = UserAgent

plugins/feeds/public/abuseipdb.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@
99

1010

1111
class AbuseIPDB(task.FeedTask):
12-
_SOURCE: ClassVar[
13-
"str"
14-
] = "https://api.abuseipdb.com/api/v2/blacklist?&key=%s&plaintext&limit=10000"
12+
_SOURCE: ClassVar["str"] = (
13+
"https://api.abuseipdb.com/api/v2/blacklist?&key=%s&plaintext&limit=10000"
14+
)
1515
_defaults = {
1616
"frequency": timedelta(hours=5),
1717
"name": "AbuseIPDB",

plugins/feeds/public/azorult-tracker.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Azorult Tracker feeds"""
2+
23
import logging
34
from datetime import datetime, timedelta
45
from typing import ClassVar

plugins/feeds/public/cisa_kev.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ class CisaKEV(task.FeedTask):
4141
"source": "https://www.cisa.gov/known-exploited-vulnerabilities-catalog",
4242
}
4343

44-
CISA_SOURCE: ClassVar[
45-
"str"
46-
] = "https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"
47-
NVD_SOURCE: ClassVar[
48-
"str"
49-
] = "https://services.nvd.nist.gov/rest/json/cves/2.0?hasKev"
44+
CISA_SOURCE: ClassVar["str"] = (
45+
"https://www.cisa.gov/sites/default/files/feeds/known_exploited_vulnerabilities.json"
46+
)
47+
NVD_SOURCE: ClassVar["str"] = (
48+
"https://services.nvd.nist.gov/rest/json/cves/2.0?hasKev"
49+
)
5050

5151
def run(self):
5252
response = self._make_request(self.CISA_SOURCE, sort=False)

plugins/feeds/public/cisco_umbrella_top_domains.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ class CiscoUmbrellaTopDomains(task.FeedTask):
1414
"name": "CloudflareTopDomains",
1515
"description": "Import Cloudflare top domains",
1616
}
17-
_SOURCE: ClassVar[
18-
"str"
19-
] = "http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip"
17+
_SOURCE: ClassVar["str"] = (
18+
"http://s3-us-west-1.amazonaws.com/umbrella-static/top-1m.csv.zip"
19+
)
2020

2121
def run(self):
2222
top_domains = yeti_config.get("umbrella", "top_domains", 10000)

plugins/feeds/public/cruzit.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88

99

1010
class Cruzit(task.FeedTask):
11-
_SOURCE: ClassVar[
12-
"str"
13-
] = "https://iplists.firehol.org/files/cruzit_web_attacks.ipset"
11+
_SOURCE: ClassVar["str"] = (
12+
"https://iplists.firehol.org/files/cruzit_web_attacks.ipset"
13+
)
1414

1515
_defaults = {
1616
"frequency": timedelta(hours=1),

plugins/feeds/public/dataplane_dnsversion.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feed DNS Version IPs with ASN
2+
Feed DNS Version IPs with ASN
33
"""
4+
45
import logging
56
from datetime import timedelta
67
from typing import ClassVar

plugins/feeds/public/dataplane_proto41.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feed DataplaneProto41: IPs from DataplaneProto41
2+
Feed DataplaneProto41: IPs from DataplaneProto41
33
"""
4+
45
from datetime import timedelta
56
from typing import ClassVar
67

plugins/feeds/public/dataplane_sipinvite.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feed of SIP INVITE attacks from Dataplane IPs and their Autonomous Systems
2+
Feed of SIP INVITE attacks from Dataplane IPs and their Autonomous Systems
33
"""
4+
45
from datetime import timedelta
56
from typing import ClassVar
67

plugins/feeds/public/dataplane_sipquery.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feed of SIPs from Dataplane with IPs and ASNs
2+
Feed of SIPs from Dataplane with IPs and ASNs
33
"""
4+
45
from datetime import timedelta
56
from typing import ClassVar
67

plugins/feeds/public/dataplane_sipregistr.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feed of SIP registr with IPs and ASNs
2+
Feed of SIP registr with IPs and ASNs
33
"""
4+
45
import logging
56
from datetime import timedelta
67
from typing import ClassVar

plugins/feeds/public/dataplane_smtpdata.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feeds SMTP data from Dataplane with IPs and ASNs
2+
Feeds SMTP data from Dataplane with IPs and ASNs
33
"""
4+
45
from datetime import timedelta
56
from typing import ClassVar
67

plugins/feeds/public/dataplane_smtpgreet.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feed of SMTP greetings from dataplane with IPs and ASN
2+
Feed of SMTP greetings from dataplane with IPs and ASN
33
"""
4+
45
from datetime import timedelta
56
from typing import ClassVar
67

plugins/feeds/public/dataplane_sshclient.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feed of ssh client bruteforce of Dataplane with IPs and ASNs
2+
Feed of ssh client bruteforce of Dataplane with IPs and ASNs
33
"""
4+
45
from datetime import timedelta
56
from typing import ClassVar
67

plugins/feeds/public/dataplane_sshpwauth.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feed of Dataplane SSH bruteforce IPs and ASNs
2+
Feed of Dataplane SSH bruteforce IPs and ASNs
33
"""
4+
45
from datetime import timedelta
56
from typing import ClassVar
67

plugins/feeds/public/dataplane_telnetlogin.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feed of Dataplane SSH bruteforce IPs and ASNs
2+
Feed of Dataplane SSH bruteforce IPs and ASNs
33
"""
4+
45
from datetime import timedelta
56
from typing import ClassVar
67

plugins/feeds/public/dataplane_vnc.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
"""
2-
Feed of Dataplane SSH bruteforce IPs and ASNs
2+
Feed of Dataplane SSH bruteforce IPs and ASNs
33
"""
4+
45
from datetime import timedelta
56
from typing import ClassVar
67

plugins/feeds/public/miningpoolstats.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ class MiningPoolStats(task.FeedTask):
1919
}
2020

2121
_SOURCE: ClassVar["str"] = "https://miningpoolstats.stream"
22-
_USER_AGENT: ClassVar[
23-
"str"
24-
] = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
22+
_USER_AGENT: ClassVar["str"] = (
23+
"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
24+
)
2525

2626
def run(self):
2727
self._session = requests.Session()

plugins/feeds/public/phishing_database.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ class PhishingDatabase(task.FeedTask):
1818
"description": "PhishingDatabase is a community feed of phishing URLs which are updated every 24 hours.",
1919
}
2020

21-
_SOURCE: ClassVar[
22-
"str"
23-
] = "https://phishing.army/download/phishing_army_blocklist_extended.txt"
21+
_SOURCE: ClassVar["str"] = (
22+
"https://phishing.army/download/phishing_army_blocklist_extended.txt"
23+
)
2424

2525
def run(self):
2626
response = self._make_request(self._SOURCE)

plugins/feeds/public/rulezskbruteforceblocker.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ class RulezSKBruteforceBlocker(task.FeedTask):
1616
"description": "This feed contains daily list of IPs from rules.sk",
1717
}
1818

19-
_SOURCE: ClassVar[
20-
"str"
21-
] = "http://danger.rulez.sk/projects/bruteforceblocker/blist.php"
19+
_SOURCE: ClassVar["str"] = (
20+
"http://danger.rulez.sk/projects/bruteforceblocker/blist.php"
21+
)
2222

2323
def run(self):
2424
r = self._make_request(self._SOURCE, headers={"User-Agent": "yeti-project"})

plugins/feeds/public/threatview_c2.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ class ThreatviewC2(task.FeedTask):
1313
"description": "This feed contains Cobalt Strike C2 IPs and Hostnames",
1414
}
1515

16-
_SOURCE: ClassVar[
17-
"str"
18-
] = "https://threatview.io/Downloads/High-Confidence-CobaltstrikeC2_IP_feed.txt"
16+
_SOURCE: ClassVar["str"] = (
17+
"https://threatview.io/Downloads/High-Confidence-CobaltstrikeC2_IP_feed.txt"
18+
)
1919

2020
def run(self):
2121
response = self._make_request(self._SOURCE, sort=False)

0 commit comments

Comments
 (0)