insightconnect-plugin-runtime 6.1.4__tar.gz → 6.2.1__tar.gz

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.
Files changed (91) hide show
  1. {insightconnect_plugin_runtime-6.1.4/insightconnect_plugin_runtime.egg-info → insightconnect_plugin_runtime-6.2.1}/PKG-INFO +9 -7
  2. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/README.md +6 -4
  3. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/helper.py +22 -20
  4. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1/insightconnect_plugin_runtime.egg-info}/PKG-INFO +9 -7
  5. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime.egg-info/requires.txt +2 -2
  6. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/setup.py +3 -3
  7. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/MANIFEST.in +0 -0
  8. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect-plugin-swagger.json +0 -0
  9. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/__init__.py +0 -0
  10. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/action.py +0 -0
  11. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/api/__init__.py +0 -0
  12. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/api/endpoints.py +0 -0
  13. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/api/schemas.py +0 -0
  14. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/cli.py +0 -0
  15. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/clients/__init__.py +0 -0
  16. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/clients/aws_client.py +0 -0
  17. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/clients/oauth.py +0 -0
  18. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/connection.py +0 -0
  19. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/data/input_message_schema.json +0 -0
  20. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/data/output_message_schema.json +0 -0
  21. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/dispatcher.py +0 -0
  22. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/exceptions.py +0 -0
  23. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/metrics.py +0 -0
  24. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/plugin.py +0 -0
  25. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/schema.py +0 -0
  26. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/server.py +0 -0
  27. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/step.py +0 -0
  28. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/task.py +0 -0
  29. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/trigger.py +0 -0
  30. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/util.py +0 -0
  31. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime/variables.py +0 -0
  32. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime.egg-info/SOURCES.txt +0 -0
  33. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime.egg-info/dependency_links.txt +0 -0
  34. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/insightconnect_plugin_runtime.egg-info/top_level.txt +0 -0
  35. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/setup.cfg +0 -0
  36. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/__init__.py +0 -0
  37. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/__init__.py +0 -0
  38. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/__init__.py +0 -0
  39. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/__init__.py +0 -0
  40. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/__init__.py +0 -0
  41. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/__init__.py +0 -0
  42. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/hello/__init__.py +0 -0
  43. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/hello/action.py +0 -0
  44. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/hello/schema.py +0 -0
  45. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/return_bad_json/__init__.py +0 -0
  46. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/return_bad_json/action.py +0 -0
  47. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/return_bad_json/schema.py +0 -0
  48. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/throw_exception/__init__.py +0 -0
  49. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/throw_exception/action.py +0 -0
  50. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/actions/throw_exception/schema.py +0 -0
  51. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/connection/__init__.py +0 -0
  52. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/connection/connection.py +0 -0
  53. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/connection/schema.py +0 -0
  54. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/__init__.py +0 -0
  55. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/monitor_events/__init__.py +0 -0
  56. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/monitor_events/schema.py +0 -0
  57. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/tasks/monitor_events/task.py +0 -0
  58. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/__init__.py +0 -0
  59. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/hello_trigger/__init__.py +0 -0
  60. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/hello_trigger/schema.py +0 -0
  61. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/hello_trigger/trigger.py +0 -0
  62. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/return_bad_json_trigger/__init__.py +0 -0
  63. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/return_bad_json_trigger/schema.py +0 -0
  64. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/return_bad_json_trigger/trigger.py +0 -0
  65. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/throw_exception_trigger/__init__.py +0 -0
  66. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/throw_exception_trigger/schema.py +0 -0
  67. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/triggers/throw_exception_trigger/trigger.py +0 -0
  68. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/komand_hello_world/util/__init__.py +0 -0
  69. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/hello_world/setup.py +0 -0
  70. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/tests/__init__.py +0 -0
  71. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/tests/conftest.py +0 -0
  72. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/tests/test_cli.py +0 -0
  73. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/tests/test_hello_world.py +0 -0
  74. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/plugin/hello_world/tests/test_server.py +0 -0
  75. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/__init__.py +0 -0
  76. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_action.py +0 -0
  77. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_api.py +0 -0
  78. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_aws_action.py +0 -0
  79. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_custom_encoder.py +0 -0
  80. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_endpoints.py +0 -0
  81. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_exceptions.py +0 -0
  82. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_helpers.py +0 -0
  83. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_metrics.py +0 -0
  84. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_oauth.py +0 -0
  85. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_plugin.py +0 -0
  86. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_schema.py +0 -0
  87. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_server_cloud_plugins.py +0 -0
  88. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_server_spec.py +0 -0
  89. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_trigger.py +0 -0
  90. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/test_variables.py +0 -0
  91. {insightconnect_plugin_runtime-6.1.4 → insightconnect_plugin_runtime-6.2.1}/tests/unit/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: insightconnect-plugin-runtime
3
- Version: 6.1.4
3
+ Version: 6.2.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
@@ -18,8 +18,8 @@ Requires-Dist: jsonschema==4.21.1
18
18
  Requires-Dist: certifi==2024.07.04
19
19
  Requires-Dist: Flask==3.0.2
20
20
  Requires-Dist: gunicorn==22.0.0
21
- Requires-Dist: greenlet==3.0.3
22
- Requires-Dist: gevent==24.2.1
21
+ Requires-Dist: greenlet==3.1.1
22
+ Requires-Dist: gevent==24.10.1
23
23
  Requires-Dist: marshmallow==3.21.0
24
24
  Requires-Dist: apispec==6.5.0
25
25
  Requires-Dist: apispec-webframeworks==1.0.0
@@ -48,10 +48,10 @@ to get started.
48
48
 
49
49
  ## Development of the InsightConnect Plugin Runtime
50
50
 
51
- The Python Runtime codebase is built to support Python 3.9.18 as of version 5.3.0. The following dependencies will need
51
+ The Python Runtime codebase is built to support Python 3.11.10 as of version 6.2.0. The following dependencies will need
52
52
  to be installed when developing or testing the Plugin Runtime:
53
53
 
54
- - Python 3.9.18
54
+ - Python 3.11.10
55
55
  - Docker
56
56
  - make
57
57
  - tox
@@ -184,11 +184,11 @@ Running a specific test file:
184
184
 
185
185
  | | Plugin | Slim Plugin |
186
186
  |:------------------|:-------:|:-----------:|
187
- | Python Version | 3.9.18 | 3.9.18 |
187
+ | Python Version | 3.11.10 | 3.11.10 |
188
188
  | OS | Alpine | Bullseye |
189
189
  | Package installer | apk | apt |
190
190
  | Shell | /bin/sh | /bin/bash |
191
- | Image Size | ~350MB | ~180MB |
191
+ | Image Size | ~370MB | ~230MB |
192
192
 
193
193
  Note that for the plugin image, we run `apk update` and `apk add ..` which leads to a longer build time.
194
194
 
@@ -211,6 +211,8 @@ 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
+ * 6.2.1 - Fix instances where logging would lead to duplicate entries being output
215
+ * 6.2.0 - Update base images to pull Python 3.11.10 | changed the pep-8 check in tox to `pycodestyle`
214
216
  * 6.1.4 - Address vulnerabilities within local development requirements.txt and vulnerabilities in slim image.
215
217
  * 6.1.3 - Addressing failing Python Slim package (bump packages).
216
218
  * 6.1.2 - Removing the call to mask_output_data for task code.
@@ -19,10 +19,10 @@ to get started.
19
19
 
20
20
  ## Development of the InsightConnect Plugin Runtime
21
21
 
22
- The Python Runtime codebase is built to support Python 3.9.18 as of version 5.3.0. The following dependencies will need
22
+ The Python Runtime codebase is built to support Python 3.11.10 as of version 6.2.0. The following dependencies will need
23
23
  to be installed when developing or testing the Plugin Runtime:
24
24
 
25
- - Python 3.9.18
25
+ - Python 3.11.10
26
26
  - Docker
27
27
  - make
28
28
  - tox
@@ -155,11 +155,11 @@ Running a specific test file:
155
155
 
156
156
  | | Plugin | Slim Plugin |
157
157
  |:------------------|:-------:|:-----------:|
158
- | Python Version | 3.9.18 | 3.9.18 |
158
+ | Python Version | 3.11.10 | 3.11.10 |
159
159
  | OS | Alpine | Bullseye |
160
160
  | Package installer | apk | apt |
161
161
  | Shell | /bin/sh | /bin/bash |
162
- | Image Size | ~350MB | ~180MB |
162
+ | Image Size | ~370MB | ~230MB |
163
163
 
164
164
  Note that for the plugin image, we run `apk update` and `apk add ..` which leads to a longer build time.
165
165
 
@@ -182,6 +182,8 @@ contributed. Black is installed as a test dependency and the hook can be initial
182
182
  after cloning this repository.
183
183
 
184
184
  ## Changelog
185
+ * 6.2.1 - Fix instances where logging would lead to duplicate entries being output
186
+ * 6.2.0 - Update base images to pull Python 3.11.10 | changed the pep-8 check in tox to `pycodestyle`
185
187
  * 6.1.4 - Address vulnerabilities within local development requirements.txt and vulnerabilities in slim image.
186
188
  * 6.1.3 - Addressing failing Python Slim package (bump packages).
187
189
  * 6.1.2 - Removing the call to mask_output_data for task code.
@@ -30,6 +30,8 @@ ENCODE_TYPE = "utf-8"
30
30
 
31
31
  DEFAULTS_HOURS_AGO = 24
32
32
 
33
+ logger = logging.getLogger()
34
+
33
35
 
34
36
  def hash_sha1(log: Dict) -> str:
35
37
  """
@@ -65,7 +67,7 @@ def compare_and_dedupe_hashes(
65
67
  if hash_ not in previous_logs_hashes:
66
68
  new_logs_hashes.append(hash_)
67
69
  logs_to_return.append(log)
68
- logging.info(
70
+ logger.info(
69
71
  f"Original number of logs:{len(new_logs)}. Number of logs after de-duplication:{len(logs_to_return)}"
70
72
  )
71
73
  return logs_to_return, new_logs_hashes
@@ -75,10 +77,10 @@ def make_request(
75
77
  _request: requests.Request,
76
78
  timeout: int = 60,
77
79
  verify: bool = True,
78
- cert: Union[str, Tuple]=None,
80
+ cert: Union[str, Tuple] = None,
79
81
  stream: bool = False,
80
82
  allow_redirects: bool = True,
81
- exception_custom_configs: Dict[int, Exception]={},
83
+ exception_custom_configs: Dict[int, Exception] = {},
82
84
  exception_data_location: str = None,
83
85
  allowed_status_codes: List[str] = [],
84
86
  ) -> Tuple[requests.Response, Dict]:
@@ -156,7 +158,7 @@ def extract_json(response: requests.Response) -> Dict:
156
158
 
157
159
 
158
160
  def request_error_handling(
159
- custom_configs: Dict[int, Exception]={},
161
+ custom_configs: Dict[int, Exception] = {},
160
162
  exception_data_location: str = None,
161
163
  allowed_status_codes: List[str] = [],
162
164
  ) -> Union[Any, None]:
@@ -204,7 +206,7 @@ def request_error_handling(
204
206
 
205
207
  def response_handler(
206
208
  response: requests.Response,
207
- custom_configs: Dict[int, Exception]={},
209
+ custom_configs: Dict[int, Exception] = {},
208
210
  data_location: str = None,
209
211
  allowed_status_codes: List[str] = [],
210
212
  ) -> None:
@@ -246,7 +248,7 @@ def response_handler(
246
248
  }
247
249
  status_code_preset = status_code_presets.get(status_code)
248
250
  exception = PluginException(preset=PluginException.Preset.UNKNOWN, data=data)
249
- logging.info(f"Request to {response.url} failed. Status code: {status_code}")
251
+ logger.info(f"Request to {response.url} failed. Status code: {status_code}")
250
252
  if status_code in custom_configs.keys():
251
253
  exception = custom_configs.get(status_code)
252
254
  if hasattr(exception, "data") and data is not None:
@@ -304,7 +306,7 @@ def extract_value(begin, key, end, s):
304
306
 
305
307
  Example: The following will use pull out the /bin/bash from the string s
306
308
  s = '\nShell: /bin/bash\n'
307
- shell = get_value(r'\s', 'Shell', r':\s(.*)\s', s)
309
+ shell = get_value(r'\\s', 'Shell', r':\\s(.*)\\s', s)
308
310
 
309
311
  This function works well when you have a list of keys to iterate through where the pattern is the same.
310
312
  """
@@ -561,7 +563,7 @@ def rate_limiting(
561
563
  error.cause
562
564
  == PluginException.causes[PluginException.Preset.RATE_LIMIT]
563
565
  ):
564
- logging.info(
566
+ logger.info(
565
567
  f"Rate limiting error occurred. Retrying in {delay:.1f} seconds ({attempts_counter}/{max_tries})"
566
568
  )
567
569
  retry = True
@@ -603,12 +605,12 @@ def check_hashes(src, checksum):
603
605
  if type(src) is str:
604
606
  hashes = get_hashes_string(src)
605
607
  else:
606
- logging.error("CheckHashes: Argument must be a string")
608
+ logger.error("CheckHashes: Argument must be a string")
607
609
  raise Exception("CheckHashes")
608
610
  for alg in hashes:
609
611
  if hashes[alg] == checksum:
610
612
  return True
611
- logging.info("CheckHashes: No checksum match")
613
+ logger.info("CheckHashes: No checksum match")
612
614
  return False
613
615
 
614
616
 
@@ -620,9 +622,9 @@ def check_cachefile(cache_file):
620
622
  cache_file = cache_dir + "/" + cache_file
621
623
  if os.path.isdir(cache_dir):
622
624
  if os.path.isfile(cache_file):
623
- logging.info("CheckCacheFile: File %s exists", cache_file)
625
+ logger.info("CheckCacheFile: File %s exists", cache_file)
624
626
  return True
625
- logging.info("CheckCacheFile: File %s did not exist", cache_file)
627
+ logger.info("CheckCacheFile: File %s did not exist", cache_file)
626
628
  return False
627
629
 
628
630
 
@@ -638,9 +640,9 @@ def open_file(file_path):
638
640
  return f
639
641
  return None
640
642
  else:
641
- logging.info("OpenFile: File %s is not a file or does not exist ", filename)
643
+ logger.info("OpenFile: File %s is not a file or does not exist ", filename)
642
644
  else:
643
- logging.error(
645
+ logger.error(
644
646
  "OpenFile: Directory %s is not a directory or does not exist", dirname
645
647
  )
646
648
 
@@ -654,13 +656,13 @@ def open_cachefile(cache_file, append=False):
654
656
  if os.path.isdir(cache_dir):
655
657
  if os.path.isfile(cache_file):
656
658
  f = open(cache_file, "a+" if append else "r+")
657
- logging.info("OpenCacheFile: %s exists, returning it", cache_file)
659
+ logger.info("OpenCacheFile: %s exists, returning it", cache_file)
658
660
  else:
659
661
  if not os.path.isdir(os.path.dirname(cache_file)):
660
662
  os.makedirs(os.path.dirname(cache_file))
661
663
  f = open(cache_file, "w+") # Open once to create the cache file
662
664
  f.close()
663
- logging.info("OpenCacheFile: %s created", cache_file)
665
+ logger.info("OpenCacheFile: %s created", cache_file)
664
666
  f = open(cache_file, "a+" if append else "r+")
665
667
  return f
666
668
  logging.error("OpenCacheFile: %s directory or does not exist", cache_dir)
@@ -676,7 +678,7 @@ def remove_cachefile(cache_file):
676
678
  if os.path.isfile(cache_file):
677
679
  os.remove(cache_file)
678
680
  return True
679
- logging.info("RemoveCacheFile: Cache file %s did not exist", cache_file)
681
+ logger.info("RemoveCacheFile: Cache file %s did not exist", cache_file)
680
682
  return False
681
683
 
682
684
 
@@ -695,9 +697,9 @@ def lock_cache(lock_file):
695
697
  os.makedirs(os.path.dirname(lock_file))
696
698
  f = open(lock_file, "w")
697
699
  f.close()
698
- logging.info("Cache lock %s created", lock_file)
700
+ logger.info("Cache lock %s created", lock_file)
699
701
  return True
700
- logging.info("Cache lock %s failed, lock not created", lock_file)
702
+ logger.info("Cache lock %s failed, lock not created", lock_file)
701
703
  return False
702
704
 
703
705
 
@@ -716,7 +718,7 @@ def unlock_cache(lock_file, wait_time):
716
718
  time.sleep(wait_time)
717
719
  os.remove(lock_file)
718
720
  return True
719
- logging.info("Cache unlock %s failed, lock not released", lock_file)
721
+ logger.info("Cache unlock %s failed, lock not released", lock_file)
720
722
  return False
721
723
 
722
724
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: insightconnect-plugin-runtime
3
- Version: 6.1.4
3
+ Version: 6.2.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
@@ -18,8 +18,8 @@ Requires-Dist: jsonschema==4.21.1
18
18
  Requires-Dist: certifi==2024.07.04
19
19
  Requires-Dist: Flask==3.0.2
20
20
  Requires-Dist: gunicorn==22.0.0
21
- Requires-Dist: greenlet==3.0.3
22
- Requires-Dist: gevent==24.2.1
21
+ Requires-Dist: greenlet==3.1.1
22
+ Requires-Dist: gevent==24.10.1
23
23
  Requires-Dist: marshmallow==3.21.0
24
24
  Requires-Dist: apispec==6.5.0
25
25
  Requires-Dist: apispec-webframeworks==1.0.0
@@ -48,10 +48,10 @@ to get started.
48
48
 
49
49
  ## Development of the InsightConnect Plugin Runtime
50
50
 
51
- The Python Runtime codebase is built to support Python 3.9.18 as of version 5.3.0. The following dependencies will need
51
+ The Python Runtime codebase is built to support Python 3.11.10 as of version 6.2.0. The following dependencies will need
52
52
  to be installed when developing or testing the Plugin Runtime:
53
53
 
54
- - Python 3.9.18
54
+ - Python 3.11.10
55
55
  - Docker
56
56
  - make
57
57
  - tox
@@ -184,11 +184,11 @@ Running a specific test file:
184
184
 
185
185
  | | Plugin | Slim Plugin |
186
186
  |:------------------|:-------:|:-----------:|
187
- | Python Version | 3.9.18 | 3.9.18 |
187
+ | Python Version | 3.11.10 | 3.11.10 |
188
188
  | OS | Alpine | Bullseye |
189
189
  | Package installer | apk | apt |
190
190
  | Shell | /bin/sh | /bin/bash |
191
- | Image Size | ~350MB | ~180MB |
191
+ | Image Size | ~370MB | ~230MB |
192
192
 
193
193
  Note that for the plugin image, we run `apk update` and `apk add ..` which leads to a longer build time.
194
194
 
@@ -211,6 +211,8 @@ 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
+ * 6.2.1 - Fix instances where logging would lead to duplicate entries being output
215
+ * 6.2.0 - Update base images to pull Python 3.11.10 | changed the pep-8 check in tox to `pycodestyle`
214
216
  * 6.1.4 - Address vulnerabilities within local development requirements.txt and vulnerabilities in slim image.
215
217
  * 6.1.3 - Addressing failing Python Slim package (bump packages).
216
218
  * 6.1.2 - Removing the call to mask_output_data for task code.
@@ -4,8 +4,8 @@ jsonschema==4.21.1
4
4
  certifi==2024.07.04
5
5
  Flask==3.0.2
6
6
  gunicorn==22.0.0
7
- greenlet==3.0.3
8
- gevent==24.2.1
7
+ greenlet==3.1.1
8
+ gevent==24.10.1
9
9
  marshmallow==3.21.0
10
10
  apispec==6.5.0
11
11
  apispec-webframeworks==1.0.0
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
5
5
 
6
6
  setup(
7
7
  name="insightconnect-plugin-runtime",
8
- version="6.1.4",
8
+ version="6.2.1",
9
9
  description="InsightConnect Plugin Runtime",
10
10
  long_description=long_description,
11
11
  long_description_content_type="text/markdown",
@@ -20,8 +20,8 @@ setup(
20
20
  "certifi==2024.07.04",
21
21
  "Flask==3.0.2",
22
22
  "gunicorn==22.0.0",
23
- "greenlet==3.0.3",
24
- "gevent==24.2.1",
23
+ "greenlet==3.1.1",
24
+ "gevent==24.10.1",
25
25
  "marshmallow==3.21.0",
26
26
  "apispec==6.5.0",
27
27
  "apispec-webframeworks==1.0.0",