Skip to content

Commit 3718b29

Browse files
authored
Advanced Regex - (SDK Automation prep) (#3276) (#3279)
1 parent 8bad5f2 commit 3718b29

File tree

6 files changed

+48
-39
lines changed

6 files changed

+48
-39
lines changed

plugins/advanced_regex/.CHECKSUM

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"spec": "6bee222090075470d4cf287e74857113",
3-
"manifest": "a4a60a936d84bf95984315779ecdf960",
4-
"setup": "a05182f1000be90d1e136294814df647",
2+
"spec": "9cc3daad10a3bdf81205688c90f4908f",
3+
"manifest": "0c6732a253c8ad369dc57aade1692b9f",
4+
"setup": "1e567e4cd92ea225c6277889a3affaa4",
55
"schemas": [
66
{
77
"identifier": "data_extraction/schema.py",
8-
"hash": "428193756350c4a3e660d57c649bab94"
8+
"hash": "1a2216f85950075d68066e4972f28c1e"
99
},
1010
{
1111
"identifier": "replace/schema.py",

plugins/advanced_regex/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.1.3
1+
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.2.5
22

33
LABEL organization=rapid7
44
LABEL sdk=python
@@ -12,7 +12,7 @@ RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
1212

1313
ADD . /python/src
1414

15-
RUN python setup.py build && python setup.py install
15+
RUN pip install .
1616

1717
# User to run plugin code. The two supported users are: root, nobody
1818
USER nobody

plugins/advanced_regex/bin/icon_advanced_regex

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ from sys import argv
66

77
Name = "Advanced Regex"
88
Vendor = "rapid7"
9-
Version = "1.0.4"
10-
Description = "Perform advanced regular expression operations on a string using Python regex"
9+
Version = "1.0.5"
10+
Description = "The Advanced Regex plugin is used to extract or manipulate targeted text using regular expressions operations on a string using Python specific regex"
1111

1212

1313
def main():

plugins/advanced_regex/help.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Description
22

3-
The Advanced Regex plugin is used to extract or manipulate targeted text using regular expressions operations on a string using Python specific regex.
3+
The Advanced Regex plugin is used to extract or manipulate targeted text using regular expressions operations on a string using Python specific regex
44

55
# Key Features
66

@@ -182,6 +182,7 @@ Example output:
182182

183183
# Version History
184184

185+
* 1.0.5 - Updated SDK to the latest version (6.2.5)
185186
* 1.0.4 - Initial updates for fedramp compliance | Updated SDK to the latest version
186187
* 1.0.3 - Update to make replace string non-required
187188
* 1.0.2 - Update to v4 Python plugin runtime | Add example inputs

plugins/advanced_regex/plugin.spec.yaml

+36-28
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@ extension: plugin
33
products: [insightconnect]
44
name: advanced_regex
55
title: Advanced Regex
6-
description: Perform advanced regular expression operations on a string using Python regex
7-
version: 1.0.4
6+
description: The Advanced Regex plugin is used to extract or manipulate targeted text
7+
using regular expressions operations on a string using Python specific regex
8+
version: 1.0.5
89
connection_version: 1
910
support: community
10-
supported_versions: ["2024-10-01"]
11+
supported_versions: ['2024-10-01']
1112
fedramp_ready: true
1213
vendor: rapid7
1314
status: []
1415
resources:
15-
source_url: https://github.com/rapid7/insightconnect-plugins/tree/master/plugins/advanced_regex
16+
source_url:
17+
https://github.com/rapid7/insightconnect-plugins/tree/master/plugins/advanced_regex
1618
license_url: https://github.com/rapid7/insightconnect-plugins/blob/master/LICENSE
1719
tags:
18-
- data manipulation
19-
- utility
20+
- data manipulation
21+
- utility
2022
hub_tags:
2123
use_cases: [data_utility]
2224
keywords: [data manipulation, utility]
@@ -25,22 +27,23 @@ enable_cache: true
2527
language: python
2628
sdk:
2729
type: slim
28-
version: 6.1.3
30+
version: 6.2.5
2931
user: nobody
3032
key_features:
31-
- Data extraction
32-
- Search and replace text
33-
- Split text
33+
- Data extraction
34+
- Search and replace text
35+
- Split text
3436
version_history:
35-
- "1.0.4 - Initial updates for fedramp compliance | Updated SDK to the latest version"
36-
- "1.0.3 - Update to make replace string non-required"
37-
- "1.0.2 - Update to v4 Python plugin runtime | Add example inputs"
38-
- "1.0.1 - New spec and help.md format for the Extension Library"
39-
- "1.0.0 - Initial plugin"
37+
- 1.0.5 - Updated SDK to the latest version (6.2.5)
38+
- 1.0.4 - Initial updates for fedramp compliance | Updated SDK to the latest version
39+
- 1.0.3 - Update to make replace string non-required
40+
- 1.0.2 - Update to v4 Python plugin runtime | Add example inputs
41+
- 1.0.1 - New spec and help.md format for the Extension Library
42+
- 1.0.0 - Initial plugin
4043
links:
41-
- "[Python Regex](https://docs.python.org/library/re.html)"
44+
- '[Python Regex](https://docs.python.org/library/re.html)'
4245
references:
43-
- "[Python Regex](https://docs.python.org/library/re.html)"
46+
- '[Python Regex](https://docs.python.org/library/re.html)'
4447
actions:
4548
data_extraction:
4649
title: Data Extraction
@@ -51,13 +54,14 @@ actions:
5154
description: Input string
5255
type: string
5356
required: true
54-
example: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sapien ex, lorems odales"
57+
example: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
58+
sapien ex, lorems odales
5559
in_regex:
5660
title: Regex
5761
description: Regex to use for data extraction
5862
type: string
5963
required: true
60-
example: "lorem"
64+
example: lorem
6165
ignorecase:
6266
title: Ignore Case
6367
description: Make regex non-case sensitive
@@ -90,7 +94,7 @@ actions:
9094
matches:
9195
title: Matches
9296
description: An array of string arrays matching the output of Python re.findall()
93-
type: "[][]string"
97+
type: '[][]string'
9498
required: true
9599
example: '[["lorem"]]'
96100
replace:
@@ -102,19 +106,20 @@ actions:
102106
description: Input string
103107
type: string
104108
required: true
105-
example: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sapien ex, lorems odales"
109+
example: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
110+
sapien ex, lorems odales
106111
replace_string:
107112
title: New String
108113
description: The string to replace matches with
109114
type: string
110115
required: false
111-
example: "REPLACED"
116+
example: REPLACED
112117
in_regex:
113118
title: Regex
114119
description: Regex to match
115120
type: string
116121
required: true
117-
example: "lorem"
122+
example: lorem
118123
max_replace:
119124
title: Max Replace
120125
description: Max occurrences to replace - if zero all will be replaced
@@ -156,7 +161,8 @@ actions:
156161
description: The result of the replace operation
157162
type: string
158163
required: true
159-
example: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sapien ex, REPLACEDs odales"
164+
example: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
165+
sapien ex, REPLACEDs odales
160166
split:
161167
title: Split by Regex
162168
description: Split a string into array using regex
@@ -166,13 +172,14 @@ actions:
166172
description: Input string
167173
type: string
168174
required: true
169-
example: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sapien ex, lorems odales sed"
175+
example: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
176+
sapien ex, lorems odales sed
170177
in_regex:
171178
title: Regex
172179
description: Regex to split string on matches
173180
type: string
174181
required: true
175-
example: "lorem"
182+
example: lorem
176183
max_split:
177184
title: Max Split
178185
description: Max splits - if non-zero last element is remainder of string
@@ -212,6 +219,7 @@ actions:
212219
result:
213220
title: Result Strings
214221
description: An array of the strings returned by the split operation
215-
type: "[]string"
222+
type: '[]string'
216223
required: true
217-
example: '["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam sapien ex, ", "s odales sed"]'
224+
example: '["Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam
225+
sapien ex, ", "s odales sed"]'

plugins/advanced_regex/setup.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44

55
setup(name="advanced_regex-rapid7-plugin",
6-
version="1.0.4",
7-
description="Perform advanced regular expression operations on a string using Python regex",
6+
version="1.0.5",
7+
description="The Advanced Regex plugin is used to extract or manipulate targeted text using regular expressions operations on a string using Python specific regex",
88
author="rapid7",
99
author_email="",
1010
url="",

0 commit comments

Comments
 (0)