insightconnect-plugin-runtime 5.5.0__py3-none-any.whl → 5.5.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,7 +10,7 @@ import subprocess
10
10
  import time
11
11
  from datetime import datetime, timedelta
12
12
  from io import IOBase
13
- from typing import Any, Callable, Dict, List, Union
13
+ from typing import Any, Callable, Dict, List, Union, Tuple
14
14
  from urllib import request
15
15
  from hashlib import sha1
16
16
  from json import JSONDecodeError
@@ -47,7 +47,7 @@ def hash_sha1(log: dict) -> str:
47
47
 
48
48
  def compare_and_dedupe_hashes(
49
49
  previous_logs_hashes: list, new_logs: list
50
- ) -> tuple[list, list]:
50
+ ) -> Tuple[list, list]:
51
51
  """
52
52
  Iterate through two lists of values, hashing each. Compare hash value to a list of existing hash values.
53
53
  If the hash exists, return both it and the value in separate lists once iterated.
@@ -56,7 +56,7 @@ def compare_and_dedupe_hashes(
56
56
  :param new_logs: New values to hash and compare to existing list of hashes.
57
57
  :type list:
58
58
  :return: Hex digest of hash.
59
- :rtype: tuple[list, list]
59
+ :rtype: Tuple[list, list]
60
60
  """
61
61
  new_logs_hashes = []
62
62
  logs_to_return = []
@@ -75,13 +75,13 @@ def make_request(
75
75
  _request: requests.Request,
76
76
  timeout: int = 60,
77
77
  verify: bool = True,
78
- cert: Union[str, tuple]=None,
78
+ cert: Union[str, Tuple]=None,
79
79
  stream: bool = False,
80
80
  allow_redirects: bool = True,
81
81
  exception_custom_configs: Dict[int, Exception]={},
82
82
  exception_data_location: str = None,
83
83
  allowed_status_codes: list[str] = [],
84
- ) -> tuple[requests.Response, dict]:
84
+ ) -> Tuple[requests.Response, dict]:
85
85
  """
86
86
  Makes a HTTP request while checking for RequestErrors and JSONDecodeErrors
87
87
  Returns the request response and the response JSON if required.
@@ -105,7 +105,7 @@ def make_request(
105
105
  :type list[str]:
106
106
 
107
107
  :return: The request response and the response JSON.
108
- :rtype: tuple[Response, dict]
108
+ :rtype: Tuple[Response, dict]
109
109
  """
110
110
  try:
111
111
  with requests.Session() as session:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: insightconnect-plugin-runtime
3
- Version: 5.5.0
3
+ Version: 5.5.1
4
4
  Summary: InsightConnect Plugin Runtime
5
5
  Home-page: https://github.com/rapid7/komand-plugin-sdk-python
6
6
  Author: Rapid7 Integrations Alliance
@@ -211,6 +211,7 @@ contributed. Black is installed as a test dependency and the hook can be initial
211
211
  after cloning this repository.
212
212
 
213
213
  ## Changelog
214
+ * 5.5.1 - Address bug with typing for type `Tuple` in Python 3.8
214
215
  * 5.5.0 - Updated helper class to add `make_request`, `response_handler`, `extract_json`, and `request_error_handling` for HTTP requests, and `hash_sha1` and `compare_and_dedupe_hashes` to provide support for hash comparisons | Add `METHOD_NOT_ALLOWED`, `CONFLICT`, `REDIRECT_ERROR`, and `CONNECTION_ERROR` to PluginException presets
215
216
  * 5.4.9 - Updated aws_client to clean assume role json object to remove any none or empty string values.
216
217
  * 5.4.8 - Address vulnerabilities within `gunicorn` and `idna` python packages.
@@ -4,7 +4,7 @@ insightconnect_plugin_runtime/cli.py,sha256=Pb-Janu-XfRlSXxPHh30OIquljWptrhhS51C
4
4
  insightconnect_plugin_runtime/connection.py,sha256=4bHHV2B0UFGsAtvLu1fiYQRwx7fissUakHPUyjLQO0E,2340
5
5
  insightconnect_plugin_runtime/dispatcher.py,sha256=ru7njnyyWE1-oD-VbZJ-Z8tELwvDf69rM7Iezs4rbnw,1774
6
6
  insightconnect_plugin_runtime/exceptions.py,sha256=7aYNoGgmV6SugHAQqeQYm1zo2LZm0vgXEGqHmYD7NCo,8260
7
- insightconnect_plugin_runtime/helper.py,sha256=cCxVL3TEVQyjEvrZPGcqqZ3q370vEAMx8hOq9MpW3Eg,31148
7
+ insightconnect_plugin_runtime/helper.py,sha256=EXPqe-2tG7Er_vOwEzQCPmGpBgauNbUIU0G_R-tWKgk,31155
8
8
  insightconnect_plugin_runtime/metrics.py,sha256=hf_Aoufip_s4k4o8Gtzz90ymZthkaT2e5sXh5B4LcF0,3186
9
9
  insightconnect_plugin_runtime/plugin.py,sha256=9k01QqEh78OTs0pMRfnwZcRr-vFe7iyAtLz_QBa23e4,24127
10
10
  insightconnect_plugin_runtime/schema.py,sha256=jTNc6KAMqFpaDVWrAYhkVC6e8I63P3X7uVlJkAr1hiY,583
@@ -78,7 +78,7 @@ tests/unit/test_server_spec.py,sha256=je97BaktgK0Fiz3AwFPkcmHzYtOJJNqJV_Fw5hrvqX
78
78
  tests/unit/test_trigger.py,sha256=E53mAUoVyponWu_4IQZ0IC1gQ9lakBnTn_9vKN2IZfg,1692
79
79
  tests/unit/test_variables.py,sha256=OUEOqGYZA3Nd5oKk5GVY3hcrWKHpZpxysBJcO_v5gzs,291
80
80
  tests/unit/utils.py,sha256=VooVmfpIgxmglNdtmT32AkEDFxHxyRHLK8RsCWjjYRY,2153
81
- insightconnect_plugin_runtime-5.5.0.dist-info/METADATA,sha256=AFFm410ie9V5wl8qyvB-IIwIoJpVzz9HMp9iMWuBoE8,13507
82
- insightconnect_plugin_runtime-5.5.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
83
- insightconnect_plugin_runtime-5.5.0.dist-info/top_level.txt,sha256=AJtyJOpiFzHxsbHUICTcUKXyrGQ3tZxhrEHsPjJBvEA,36
84
- insightconnect_plugin_runtime-5.5.0.dist-info/RECORD,,
81
+ insightconnect_plugin_runtime-5.5.1.dist-info/METADATA,sha256=-BI5OWO_Kg7Im2iXx12G2otyOjy_Noob-MUAF4ZGjLg,13572
82
+ insightconnect_plugin_runtime-5.5.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
83
+ insightconnect_plugin_runtime-5.5.1.dist-info/top_level.txt,sha256=AJtyJOpiFzHxsbHUICTcUKXyrGQ3tZxhrEHsPjJBvEA,36
84
+ insightconnect_plugin_runtime-5.5.1.dist-info/RECORD,,