insightconnect-plugin-runtime 6.3.8__py3-none-any.whl → 6.3.9__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.
- insightconnect_plugin_runtime/plugin.py +21 -3
- insightconnect_plugin_runtime/telemetry.py +12 -6
- {insightconnect_plugin_runtime-6.3.8.dist-info → insightconnect_plugin_runtime-6.3.9.dist-info}/METADATA +10 -9
- {insightconnect_plugin_runtime-6.3.8.dist-info → insightconnect_plugin_runtime-6.3.9.dist-info}/RECORD +6 -6
- {insightconnect_plugin_runtime-6.3.8.dist-info → insightconnect_plugin_runtime-6.3.9.dist-info}/WHEEL +0 -0
- {insightconnect_plugin_runtime-6.3.8.dist-info → insightconnect_plugin_runtime-6.3.9.dist-info}/top_level.txt +0 -0
|
@@ -564,8 +564,17 @@ class Plugin(object):
|
|
|
564
564
|
# connection.test is called, as there is no message returned along side it,
|
|
565
565
|
# and the code above then sees this and reads the "message" from the io buffer as normal
|
|
566
566
|
if hasattr(connection, "test_task") and connection_test_type == "test_task":
|
|
567
|
+
# Get the test_task function from the connection
|
|
567
568
|
func = connection.test_task
|
|
568
|
-
|
|
569
|
+
|
|
570
|
+
# Inspect the function to see if it requires args
|
|
571
|
+
arguments = inspect.signature(func).parameters
|
|
572
|
+
|
|
573
|
+
# If the function has parameters, we pass the task name
|
|
574
|
+
if len(arguments) > 0 and "task" in message_body:
|
|
575
|
+
output, log = func(message_body["task"])
|
|
576
|
+
else:
|
|
577
|
+
output, log = func()
|
|
569
578
|
return output, log
|
|
570
579
|
elif hasattr(connection, "test"):
|
|
571
580
|
func = connection.test
|
|
@@ -650,8 +659,17 @@ class Plugin(object):
|
|
|
650
659
|
# Check if connection test func available. If so - use it (preferred). Else fallback to action/trigger test
|
|
651
660
|
if hasattr(step.connection, "test"):
|
|
652
661
|
if hasattr(step.connection, "test_task") and connection_test_type == "test_task":
|
|
653
|
-
|
|
654
|
-
|
|
662
|
+
# Get the test_task function from the connection
|
|
663
|
+
func = connection.test_task
|
|
664
|
+
|
|
665
|
+
# Inspect the function to see if it requires args
|
|
666
|
+
arguments = inspect.signature(func).parameters
|
|
667
|
+
|
|
668
|
+
# If the function has parameters, we pass the task name
|
|
669
|
+
if len(arguments) > 0 and "task" in message_body:
|
|
670
|
+
output, log = func(message_body["task"])
|
|
671
|
+
else:
|
|
672
|
+
output, log = func()
|
|
655
673
|
return output, log
|
|
656
674
|
else:
|
|
657
675
|
func = step.connection.test
|
|
@@ -154,10 +154,16 @@ def monitor_task_delay(
|
|
|
154
154
|
|
|
155
155
|
# Parse and normalize the state time value
|
|
156
156
|
try:
|
|
157
|
-
# First, try to parse the epoch timestamp
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
157
|
+
# First, try to parse the epoch timestamp in seconds
|
|
158
|
+
try:
|
|
159
|
+
normalized_state_time = datetime.fromtimestamp(
|
|
160
|
+
float(current_state_time)
|
|
161
|
+
)
|
|
162
|
+
except ValueError:
|
|
163
|
+
# If it fails, assume it's in milliseconds and convert accordingly
|
|
164
|
+
normalized_state_time = datetime.fromtimestamp(
|
|
165
|
+
float(current_state_time) / 1000.0
|
|
166
|
+
)
|
|
161
167
|
except (ValueError, TypeError):
|
|
162
168
|
# If parsing fails, parse as a string
|
|
163
169
|
normalized_state_time = parse(str(current_state_time))
|
|
@@ -181,8 +187,8 @@ def monitor_task_delay(
|
|
|
181
187
|
)
|
|
182
188
|
break
|
|
183
189
|
except Exception as error:
|
|
184
|
-
self.logger.
|
|
185
|
-
f"An
|
|
190
|
+
self.logger.error(
|
|
191
|
+
f"An exception occurred while checking task delay. The exception was: {error}"
|
|
186
192
|
)
|
|
187
193
|
|
|
188
194
|
# Return task output
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: insightconnect-plugin-runtime
|
|
3
|
-
Version: 6.3.
|
|
3
|
+
Version: 6.3.9
|
|
4
4
|
Summary: InsightConnect Plugin Runtime
|
|
5
5
|
Home-page: https://github.com/rapid7/komand-plugin-sdk-python
|
|
6
6
|
Author: Rapid7 Integrations Alliance
|
|
@@ -15,7 +15,7 @@ Description-Content-Type: text/markdown
|
|
|
15
15
|
Requires-Dist: requests==2.32.4
|
|
16
16
|
Requires-Dist: python_jsonschema_objects==0.5.2
|
|
17
17
|
Requires-Dist: jsonschema==4.22.0
|
|
18
|
-
Requires-Dist: certifi==2025.
|
|
18
|
+
Requires-Dist: certifi==2025.8.3
|
|
19
19
|
Requires-Dist: Flask==3.1.1
|
|
20
20
|
Requires-Dist: gunicorn==23.0.0
|
|
21
21
|
Requires-Dist: greenlet==3.2.3
|
|
@@ -28,10 +28,10 @@ Requires-Dist: structlog==25.4.0
|
|
|
28
28
|
Requires-Dist: python-json-logger==2.0.7
|
|
29
29
|
Requires-Dist: Jinja2==3.1.6
|
|
30
30
|
Requires-Dist: python-dateutil==2.9.0.post0
|
|
31
|
-
Requires-Dist: opentelemetry-sdk==1.
|
|
32
|
-
Requires-Dist: opentelemetry-instrumentation-flask==0.
|
|
33
|
-
Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.
|
|
34
|
-
Requires-Dist: opentelemetry-instrumentation-requests==0.
|
|
31
|
+
Requires-Dist: opentelemetry-sdk==1.36.0
|
|
32
|
+
Requires-Dist: opentelemetry-instrumentation-flask==0.57b0
|
|
33
|
+
Requires-Dist: opentelemetry-exporter-otlp-proto-http==1.36.0
|
|
34
|
+
Requires-Dist: opentelemetry-instrumentation-requests==0.57b0
|
|
35
35
|
Requires-Dist: urllib3==2.5.0
|
|
36
36
|
Dynamic: author
|
|
37
37
|
Dynamic: author-email
|
|
@@ -63,10 +63,10 @@ to get started.
|
|
|
63
63
|
|
|
64
64
|
## Development of the InsightConnect Plugin Runtime
|
|
65
65
|
|
|
66
|
-
The Python Runtime codebase is built to support Python 3.11.
|
|
66
|
+
The Python Runtime codebase is built to support Python 3.11.13 as of version 6.2.3. The following dependencies will need
|
|
67
67
|
to be installed when developing or testing the Plugin Runtime:
|
|
68
68
|
|
|
69
|
-
- Python 3.11.
|
|
69
|
+
- Python 3.11.13
|
|
70
70
|
- Docker
|
|
71
71
|
- make
|
|
72
72
|
- tox
|
|
@@ -199,7 +199,7 @@ Running a specific test file:
|
|
|
199
199
|
|
|
200
200
|
| | Plugin | Slim Plugin |
|
|
201
201
|
|:------------------|:-------:|:-----------:|
|
|
202
|
-
| Python Version | 3.11.
|
|
202
|
+
| Python Version | 3.11.13 | 3.11.13 |
|
|
203
203
|
| OS | Alpine | Bullseye |
|
|
204
204
|
| Package installer | apk | apt |
|
|
205
205
|
| Shell | /bin/sh | /bin/bash |
|
|
@@ -226,6 +226,7 @@ contributed. Black is installed as a test dependency and the hook can be initial
|
|
|
226
226
|
after cloning this repository.
|
|
227
227
|
|
|
228
228
|
## Changelog
|
|
229
|
+
* 6.3.9 - Fixed `monitor_task_delay` decorator handling of millisecond epoch timestamps | Allow `test_task` connection method to accept task name parameter | Updated base images to Python 3.11.13
|
|
229
230
|
* 6.3.8 - Update exception string representation methods to remove newline characters
|
|
230
231
|
* 6.3.7 - Addressed vulnerability in 'urllib3' (removed from `requirements.txt` as it's a dependency of `botocore`)
|
|
231
232
|
* 6.3.6 - Added required dependency to plugin runtime
|
|
@@ -6,12 +6,12 @@ insightconnect_plugin_runtime/dispatcher.py,sha256=ru7njnyyWE1-oD-VbZJ-Z8tELwvDf
|
|
|
6
6
|
insightconnect_plugin_runtime/exceptions.py,sha256=LeZR2H_seHIUALLwnKyH5W7PX3VNa-lOTxJ0vZJra8I,8068
|
|
7
7
|
insightconnect_plugin_runtime/helper.py,sha256=xGiskPd4vHr_k7BNEb3_7gPxm8sB85A7_5N31S-0RE4,33994
|
|
8
8
|
insightconnect_plugin_runtime/metrics.py,sha256=hf_Aoufip_s4k4o8Gtzz90ymZthkaT2e5sXh5B4LcF0,3186
|
|
9
|
-
insightconnect_plugin_runtime/plugin.py,sha256=
|
|
9
|
+
insightconnect_plugin_runtime/plugin.py,sha256=5CNxVAmiAwdEXviBU-_oA3_Ud03PYO_fs-ph9x_2yO0,27286
|
|
10
10
|
insightconnect_plugin_runtime/schema.py,sha256=6MVw5hqGATU1VLgwfOWfPsP3hy1OnsugCTsgX8sknes,521
|
|
11
11
|
insightconnect_plugin_runtime/server.py,sha256=DHooHBQa1M2z7aETTWK6u9B2jChi8vONzqK4n_c94f4,13138
|
|
12
12
|
insightconnect_plugin_runtime/step.py,sha256=KdERg-789-s99IEKN61DR08naz-YPxyinPT0C_T81C4,855
|
|
13
13
|
insightconnect_plugin_runtime/task.py,sha256=d-H1EAzVnmSdDEJtXyIK5JySprxpF9cetVoFGtWlHrg,123
|
|
14
|
-
insightconnect_plugin_runtime/telemetry.py,sha256=
|
|
14
|
+
insightconnect_plugin_runtime/telemetry.py,sha256=gS5dxwcIbuCgCMZkInlZP3DKNxiy8x9UruTkngxGaRg,7960
|
|
15
15
|
insightconnect_plugin_runtime/trigger.py,sha256=Zq3cy68N3QxAGbNZKCID6CZF05Zi7YD2sdy_qbedUY8,874
|
|
16
16
|
insightconnect_plugin_runtime/util.py,sha256=DMspk1DQ5oOUnKi2foX2N-Qo-cxhJWETYQCaVjHX8Qo,9804
|
|
17
17
|
insightconnect_plugin_runtime/variables.py,sha256=7FjJGnU7KUR7m9o-_tRq7Q3KiaB1Pp0Apj1NGgOwrJk,3056
|
|
@@ -79,7 +79,7 @@ tests/unit/test_server_spec.py,sha256=je97BaktgK0Fiz3AwFPkcmHzYtOJJNqJV_Fw5hrvqX
|
|
|
79
79
|
tests/unit/test_trigger.py,sha256=E53mAUoVyponWu_4IQZ0IC1gQ9lakBnTn_9vKN2IZfg,1692
|
|
80
80
|
tests/unit/test_variables.py,sha256=OUEOqGYZA3Nd5oKk5GVY3hcrWKHpZpxysBJcO_v5gzs,291
|
|
81
81
|
tests/unit/utils.py,sha256=hcY0A2H_DMgCDXUTvDtCXMdMvRjLQgTaGcTpATb8YG0,2236
|
|
82
|
-
insightconnect_plugin_runtime-6.3.
|
|
83
|
-
insightconnect_plugin_runtime-6.3.
|
|
84
|
-
insightconnect_plugin_runtime-6.3.
|
|
85
|
-
insightconnect_plugin_runtime-6.3.
|
|
82
|
+
insightconnect_plugin_runtime-6.3.9.dist-info/METADATA,sha256=LtSegJnVZ9LvrZagoLTGUTN6xBDgSHNH2wzVM2l_Y8Q,17200
|
|
83
|
+
insightconnect_plugin_runtime-6.3.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
84
|
+
insightconnect_plugin_runtime-6.3.9.dist-info/top_level.txt,sha256=AJtyJOpiFzHxsbHUICTcUKXyrGQ3tZxhrEHsPjJBvEA,36
|
|
85
|
+
insightconnect_plugin_runtime-6.3.9.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|