fix: webserver crash when RiskIQ is not reachable. Bump deps.

pull/471/head
Raphaël Vinot 2022-07-24 20:57:16 +02:00
parent 05b9e551e4
commit f953629539
3 changed files with 25 additions and 18 deletions

View File

@ -46,6 +46,10 @@ class RiskIQ():
self.logger.warning(f'RiskIQ not available, {details["message"]}')
self.logger.warning(f'RiskIQ not available: {e}')
return
except Exception as e:
self.available = False
self.logger.warning(f'RiskIQ not available: {e}')
return
self.client_dns = DnsRequest(username=config.get('user'), api_key=config.get('apikey'), exception_class=RiskIQError)
self.client_whois = WhoisRequest(username=config.get('user'), api_key=config.get('apikey'), exception_class=RiskIQError)

35
poetry.lock generated
View File

@ -457,7 +457,7 @@ testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-
[[package]]
name = "importlib-resources"
version = "5.8.0"
version = "5.9.0"
description = "Read resources from Python packages"
category = "main"
optional = false
@ -467,8 +467,8 @@ python-versions = ">=3.7"
zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""}
[package.extras]
docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"]
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"]
docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"]
testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"]
[[package]]
name = "ipython"
@ -913,14 +913,14 @@ python-versions = ">=3.7"
[[package]]
name = "pysanejs"
version = "2.0"
version = "2.0.1"
description = "Python client for SaneJS"
category = "main"
optional = false
python-versions = ">=3.8,<4.0"
[package.dependencies]
requests = ">=2.26.0,<3.0.0"
requests = ">=2.28.1,<3.0.0"
[[package]]
name = "pytaxonomies"
@ -1192,7 +1192,7 @@ python-versions = "*"
[[package]]
name = "types-redis"
version = "4.3.10"
version = "4.3.11"
description = "Typing stubs for redis"
category = "dev"
optional = false
@ -1330,12 +1330,15 @@ python-versions = ">=3.7"
[[package]]
name = "werkzeug"
version = "2.1.2"
version = "2.2.0"
description = "The comprehensive WSGI web application library."
category = "main"
optional = false
python-versions = ">=3.7"
[package.dependencies]
MarkupSafe = ">=2.1.1"
[package.extras]
watchdog = ["watchdog"]
@ -1391,7 +1394,7 @@ misp = ["python-magic", "pydeep2"]
[metadata]
lock-version = "1.1"
python-versions = ">=3.8,<3.11"
content-hash = "a7400fa80a80b3fcacc50c4dbeb7bf09589987a3e3999d48a93e643856f24c18"
content-hash = "692019b923b26e1df5c638248ed7b5011aa10825ed89d4f9e5ff082cdad1024b"
[metadata.files]
aiohttp = [
@ -1808,8 +1811,8 @@ importlib-metadata = [
{file = "importlib_metadata-4.12.0.tar.gz", hash = "sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670"},
]
importlib-resources = [
{file = "importlib_resources-5.8.0-py3-none-any.whl", hash = "sha256:7952325ffd516c05a8ad0858c74dff2c3343f136fe66a6002b2623dd1d43f223"},
{file = "importlib_resources-5.8.0.tar.gz", hash = "sha256:568c9f16cb204f9decc8d6d24a572eeea27dacbb4cee9e6b03a8025736769751"},
{file = "importlib_resources-5.9.0-py3-none-any.whl", hash = "sha256:f78a8df21a79bcc30cfd400bdc38f314333de7c0fb619763f6b9dabab8268bb7"},
{file = "importlib_resources-5.9.0.tar.gz", hash = "sha256:5481e97fb45af8dcf2f798952625591c58fe599d0735d86b10f54de086a61681"},
]
ipython = [
{file = "ipython-8.4.0-py3-none-any.whl", hash = "sha256:7ca74052a38fa25fe9bedf52da0be7d3fdd2fb027c3b778ea78dfe8c212937d1"},
@ -2249,8 +2252,8 @@ pyrsistent = [
{file = "pyrsistent-0.18.1.tar.gz", hash = "sha256:d4d61f8b993a7255ba714df3aca52700f8125289f84f704cf80916517c46eb96"},
]
pysanejs = [
{file = "pysanejs-2.0-py3-none-any.whl", hash = "sha256:a14e402e1e2efa79fc9cbd17d67fb2c0bc346ebc38995c1fd94cce3bc4316c7b"},
{file = "pysanejs-2.0.tar.gz", hash = "sha256:68655cd4605536625e4b61c7b86206efff952c9cd5366fd088ad553c2e50fc4a"},
{file = "pysanejs-2.0.1-py3-none-any.whl", hash = "sha256:1eb2143e649682776b8ede2ffe667ed92c1f45d4d3507d59c9be1edf82711192"},
{file = "pysanejs-2.0.1.tar.gz", hash = "sha256:2a5068592214d1415d047d52e79314dd092df40b2ee6c996ea124189072e97be"},
]
pytaxonomies = [
{file = "pytaxonomies-1.5.0-py3-none-any.whl", hash = "sha256:435d49045bca8e819898140bb306563c9a89ef4375f1e9c33fe6435c558d1336"},
@ -2422,8 +2425,8 @@ types-python-dateutil = [
{file = "types_python_dateutil-2.8.19-py3-none-any.whl", hash = "sha256:6284df1e4783d8fc6e587f0317a81333856b872a6669a282f8a325342bce7fa8"},
]
types-redis = [
{file = "types-redis-4.3.10.tar.gz", hash = "sha256:3bac2a7ffb62c1623c7d1bf9642eafd4f13792895739c666f1e4ac218ad77789"},
{file = "types_redis-4.3.10-py3-none-any.whl", hash = "sha256:0f4497cb918346b0872ac38aa56a96ca1b0c5769fce9f5d654b21ce143c0d92b"},
{file = "types-redis-4.3.11.tar.gz", hash = "sha256:83e5633f216c729fb39c5d3f71dd3b0080c651f75b5d4128733878512409c744"},
{file = "types_redis-4.3.11-py3-none-any.whl", hash = "sha256:ba4612407a758353aa4fe5e1e4b804126e1160dbd6797840223958b1b5dda34d"},
]
types-requests = [
{file = "types-requests-2.28.3.tar.gz", hash = "sha256:fb9ea69311766967f9e91861211ec7449f6484025b766ea709689c0dbb29d7ba"},
@ -2518,8 +2521,8 @@ websockets = [
{file = "websockets-10.1.tar.gz", hash = "sha256:181d2b25de5a437b36aefedaf006ecb6fa3aa1328ec0236cdde15f32f9d3ff6d"},
]
werkzeug = [
{file = "Werkzeug-2.1.2-py3-none-any.whl", hash = "sha256:72a4b735692dd3135217911cbeaa1be5fa3f62bffb8745c5215420a03dc55255"},
{file = "Werkzeug-2.1.2.tar.gz", hash = "sha256:1ce08e8093ed67d638d63879fd1ba3735817f7a80de3674d293f5984f25fb6e6"},
{file = "Werkzeug-2.2.0-py3-none-any.whl", hash = "sha256:81806f8a5b35e6cb1b39a6f28dabf0e123f069c8596119a1a9a43838870016cd"},
{file = "Werkzeug-2.2.0.tar.gz", hash = "sha256:fe8bcdcef40275ed915fc734c2527a39d705b57a716d4f09e790296abbd16a7f"},
]
wrapt = [
{file = "wrapt-1.14.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:1b376b3f4896e7930f1f772ac4b064ac12598d1c38d04907e696cc4d794b43d3"},

View File

@ -46,7 +46,7 @@ bootstrap-flask = "^2.0.2"
defang = "^0.5.3"
vt-py = "^0.14.0"
pyeupi = "^1.1"
pysanejs = "^2.0"
pysanejs = "^2.0.1"
pylookyloo = "^1.13.0"
dnspython = "^2.2.1"
pytaxonomies = "^1.5.0"
@ -73,7 +73,7 @@ misp = ['python-magic', 'pydeep2']
[tool.poetry.dev-dependencies]
mypy = "^0.971"
ipython = "^8.4.0"
types-redis = "^4.3.10"
types-redis = "^4.3.11"
types-requests = "^2.28.3"
types-Flask = "^1.1.6"
types-pkg-resources = "^0.1.3"