Skip to content

Commit ab33927

Browse files
authored
Subnet - (SDK Automation prep) (#3273) (#3274)
* Subnet - (SDK Automation prep) * Fix HelpValidator
1 parent 8dc1c84 commit ab33927

File tree

8 files changed

+47
-41
lines changed

8 files changed

+47
-41
lines changed

plugins/subnet/.CHECKSUM

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
2-
"spec": "f73e684f15095a178d94c8fe8845adcc",
3-
"manifest": "de8e1fab8541c0af02f166138f01c74f",
4-
"setup": "488c85f865c046294bb203623a68c8db",
2+
"spec": "ac704038478670ceb0369abbe42aa4cf",
3+
"manifest": "c41546592ab30b9f259d6b056f484bfb",
4+
"setup": "08117154aef8ff2e244100b046854e91",
55
"schemas": [
66
{
77
"identifier": "calculate/schema.py",
8-
"hash": "379cf1d7ae32806000cbad209eba9e40"
8+
"hash": "a17426ab91580ae07df6b6a5f45637bf"
99
},
1010
{
1111
"identifier": "check_address_in_subnet/schema.py",
12-
"hash": "d52a07aad372013e2f755cd785f85140"
12+
"hash": "19a1dabe7fa1a9ff3abe613089169ffa"
1313
},
1414
{
1515
"identifier": "connection/schema.py",

plugins/subnet/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/subnet/bin/komand_subnet

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ from sys import argv
66

77
Name = "Subnet"
88
Vendor = "rapid7"
9-
Version = "2.0.1"
9+
Version = "2.0.2"
1010
Description = "The Subnet plugin takes input as a network in CIDR notation and returns useful information, such as the number of hosts, the ID, host address range, and broadcast address"
1111

1212

plugins/subnet/help.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The Subnet plugin takes input as a network in CIDR notation and returns useful i
2727

2828
#### Calculate
2929

30-
This action is used to return subnet information for IP and Netmask
30+
This action is used to return Subnet information for IP and Netmask
3131

3232
##### Input
3333

@@ -79,14 +79,14 @@ Example output:
7979

8080
#### Check Address in Subnet
8181

82-
This action is used to determine if the provided IP address is in the subnet
82+
This action is used to determine if the provided IP address is in the Subnet
8383

8484
##### Input
8585

8686
|Name|Type|Default|Required|Description|Enum|Example|Placeholder|Tooltip|
8787
| :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- | :--- |
8888
|ip_address|string|None|True|The IP address|None|198.51.100.100|None|None|
89-
|subnet|string|None|True|The subnet in CIDR notation or Netmask|None|198.51.100.0/24|None|None|
89+
|subnet|string|None|True|The Subnet in CIDR notation or Netmask|None|198.51.100.0/24|None|None|
9090

9191
Example input:
9292

@@ -123,10 +123,11 @@ Example output:
123123

124124
## Troubleshooting
125125

126-
The number of hosts per network does not include the ID and broadcast address. However, the number of network does include the all-ones and all-zeros network.
126+
* The number of hosts per network does not include the ID and broadcast address. However, the number of network does include the all-ones and all-zeros network.
127127

128128
# Version History
129129

130+
* 2.0.2 - Updated SDK to the latest version (6.2.5)
130131
* 2.0.1 - Initial updates for fedramp compliance | Updated SDK to the latest version
131132
* 2.0.0 - Add new action Check Address in Subnet | Code refactor
132133
* 1.0.2 - New spec and help.md format for the Extension Library

plugins/subnet/komand_subnet/actions/calculate/schema.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
class Component:
7-
DESCRIPTION = "Return subnet information for IP and Netmask"
7+
DESCRIPTION = "Return Subnet information for IP and Netmask"
88

99

1010
class Input:

plugins/subnet/komand_subnet/actions/check_address_in_subnet/schema.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55

66
class Component:
7-
DESCRIPTION = "Determine if the provided IP address is in the subnet"
7+
DESCRIPTION = "Determine if the provided IP address is in the Subnet"
88

99

1010
class Input:
@@ -31,7 +31,7 @@ class CheckAddressInSubnetInput(insightconnect_plugin_runtime.Input):
3131
"subnet": {
3232
"type": "string",
3333
"title": "Subnet",
34-
"description": "The subnet in CIDR notation or Netmask",
34+
"description": "The Subnet in CIDR notation or Netmask",
3535
"order": 2
3636
}
3737
},

plugins/subnet/plugin.spec.yaml

+30-25
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,57 @@ extension: plugin
33
products: [insightconnect]
44
name: subnet
55
title: Subnet
6-
description: The Subnet plugin takes input as a network in CIDR notation and returns useful information, such as the number of hosts, the ID, host address range, and broadcast address
7-
version: 2.0.1
6+
description: The Subnet plugin takes input as a network in CIDR notation and returns
7+
useful information, such as the number of hosts, the ID, host address range, and
8+
broadcast address
9+
version: 2.0.2
810
connection_version: 2
911
fedramp_ready: true
1012
vendor: rapid7
1113
support: community
12-
supported_versions: ["2024-10-09"]
14+
supported_versions: ['2024-10-09']
1315
status: []
1416
resources:
1517
source_url: https://github.com/rapid7/insightconnect-plugins/tree/master/plugins/subnet
1618
license_url: https://github.com/rapid7/insightconnect-plugins/blob/master/LICENSE
1719
tags:
18-
- subnet
19-
- ip
20-
- netmask
21-
- network
22-
- utilities
20+
- subnet
21+
- ip
22+
- netmask
23+
- network
24+
- utilities
2325
hub_tags:
2426
use_cases: [data_utility, threat_detection_and_response]
2527
keywords: [subnet, ip_address]
2628
features: []
2729
sdk:
2830
type: slim
29-
version: 6.1.3
31+
version: 6.2.5
3032
user: nobody
3133
key_features:
32-
- "Returns network information about CIDR"
33-
troubleshooting: The number of hosts per network does not include the ID and broadcast address. However, the number of network does include the all-ones and all-zeros network.
34+
- Returns network information about CIDR
35+
troubleshooting:
36+
- The number of hosts per network does not include the ID and broadcast address. However,
37+
the number of network does include the all-ones and all-zeros network.
3438
version_history:
35-
- "2.0.1 - Initial updates for fedramp compliance | Updated SDK to the latest version"
36-
- "2.0.0 - Add new action Check Address in Subnet | Code refactor"
37-
- "1.0.2 - New spec and help.md format for the Extension Library"
38-
- "1.0.1 - Add `utilities` plugin tag for Marketplace searchability"
39-
- "1.0.0 - Update to v2 Python plugin architecture | Support web server mode"
40-
- "0.1.1 - SSL bug fix in SDK"
41-
- "0.1.0 - Initial plugin"
39+
- 2.0.2 - Updated SDK to the latest version (6.2.5)
40+
- 2.0.1 - Initial updates for fedramp compliance | Updated SDK to the latest version
41+
- 2.0.0 - Add new action Check Address in Subnet | Code refactor
42+
- 1.0.2 - New spec and help.md format for the Extension Library
43+
- 1.0.1 - Add `utilities` plugin tag for Marketplace searchability
44+
- 1.0.0 - Update to v2 Python plugin architecture | Support web server mode
45+
- 0.1.1 - SSL bug fix in SDK
46+
- 0.1.0 - Initial plugin
4247
links:
43-
- "[Subnetwork](https://en.wikipedia.org/wiki/Subnetwork)"
44-
- "[Python IPCalc](https://github.com/tehmaze/ipcalc)"
48+
- '[Subnetwork](https://en.wikipedia.org/wiki/Subnetwork)'
49+
- '[Python IPCalc](https://github.com/tehmaze/ipcalc)'
4550
references:
46-
- "[Subnetwork](https://en.wikipedia.org/wiki/Subnetwork)"
47-
- "[Python IPCalc](https://github.com/tehmaze/ipcalc)"
51+
- '[Subnetwork](https://en.wikipedia.org/wiki/Subnetwork)'
52+
- '[Python IPCalc](https://github.com/tehmaze/ipcalc)'
4853
actions:
4954
calculate:
5055
title: Calculate
51-
description: Return subnet information for IP and Netmask
56+
description: Return Subnet information for IP and Netmask
5257
input:
5358
cidr:
5459
title: Network
@@ -125,7 +130,7 @@ actions:
125130
example: 192.168.1.255
126131
check_address_in_subnet:
127132
title: Check Address in Subnet
128-
description: Determine if the provided IP address is in the subnet
133+
description: Determine if the provided IP address is in the Subnet
129134
input:
130135
ip_address:
131136
title: IP Address
@@ -135,7 +140,7 @@ actions:
135140
example: 198.51.100.100
136141
subnet:
137142
title: Subnet
138-
description: The subnet in CIDR notation or Netmask
143+
description: The Subnet in CIDR notation or Netmask
139144
type: string
140145
required: true
141146
example: 198.51.100.0/24

plugins/subnet/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44

55
setup(name="subnet-rapid7-plugin",
6-
version="2.0.1",
6+
version="2.0.2",
77
description="The Subnet plugin takes input as a network in CIDR notation and returns useful information, such as the number of hosts, the ID, host address range, and broadcast address",
88
author="rapid7",
99
author_email="",

0 commit comments

Comments
 (0)