Skip to content

Commit

Permalink
[PLGN-279] Rapid7 InsightVM Cloud (#2144)
Browse files Browse the repository at this point in the history
* Fix vuln_search malware_kits output

* Fix Dockerfile remove unused lines in vuln search

* Fix Dockerfile remove unused lines in vuln search spec | regen

* Update help.md black action.

* Update help.md example

* Refresh

* Add tasks init

* Fix help.md examples

* Fix unit tests

* Fix unit tests

* Fix unit tests

* Update help.md examples

* Update help.md examples

* Update unit tests to validate schema
  • Loading branch information
ablakley-r7 committed Nov 29, 2023
1 parent 1fc279c commit e0d555d
Show file tree
Hide file tree
Showing 30 changed files with 1,101 additions and 1,773 deletions.
20 changes: 10 additions & 10 deletions plugins/rapid7_insightvm_cloud/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
{
"spec": "e1f237bade1b5d382fac05a02cb3a45a",
"manifest": "bc89426afbe122ee3ad2b05e51de0602",
"setup": "1e99ccbf1717b1b3e8ff39002604d078",
"spec": "6898a8d3dcf35326c62bafd1839a3e31",
"manifest": "9b38d02526a7afbb04657bcaccec85e2",
"setup": "553502e1e832fa699fdc97d3d133ae51",
"schemas": [
{
"identifier": "asset_search/schema.py",
"hash": "b211d020317e7b641dc0a3e3fdf8fcac"
"hash": "67a13b58197e8ce0461e74e751c9a016"
},
{
"identifier": "get_asset/schema.py",
"hash": "5b22eee46330010e6643ed9d53e3e9ba"
"hash": "3a86f822596b87d396b2fa504e881f68"
},
{
"identifier": "get_scan/schema.py",
"hash": "2548da3a6866369f0c42dc04fe8594d4"
"hash": "39fab23452ba6ce5c51f0cce26c60d86"
},
{
"identifier": "start_scan/schema.py",
"hash": "716d68a738614777d6af43175502ea33"
"hash": "2714095eb5fef0071a4cc6104d18386f"
},
{
"identifier": "stop_scan/schema.py",
"hash": "67e09984958f9e98d6dfc4656b997ea0"
"hash": "4f9c72e4ae4e52709a21ba45c38b8c08"
},
{
"identifier": "vuln_search/schema.py",
"hash": "204bae762b488e566690c42a1b66836a"
"hash": "c9d9fc5a0879166c61079cf7071a73a9"
},
{
"identifier": "connection/schema.py",
"hash": "7bb85d81e314b1c547f165d7d00951cf"
"hash": "0a852d930eae09a49c541fb998107f69"
}
]
}
20 changes: 7 additions & 13 deletions plugins/rapid7_insightvm_cloud/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,20 @@
FROM rapid7/insightconnect-python-3-38-slim-plugin:4
# Refer to the following documentation for available SDK parent images: https://komand.github.io/python/sdk.html#version
FROM rapid7/insightconnect-python-3-plugin:5

LABEL organization=rapid7
LABEL sdk=python

# Add any custom package dependencies here
# NOTE: Add pip packages to requirements.txt

# End package dependencies

# Add source code
WORKDIR /python/src

ADD ./plugin.spec.yaml /plugin.spec.yaml
ADD . /python/src
ADD ./requirements.txt /python/src/requirements.txt

# Install pip dependencies
RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

# Install plugin
RUN python setup.py build && python setup.py install
ADD . /python/src

RUN python setup.py build && python setup.py install

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

ENTRYPOINT ["/usr/local/bin/icon_rapid7_insightvm_cloud"]
ENTRYPOINT ["/usr/local/bin/icon_rapid7_insightvm_cloud"]
22 changes: 11 additions & 11 deletions plugins/rapid7_insightvm_cloud/bin/icon_rapid7_insightvm_cloud
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python
# GENERATED BY KOMAND SDK - DO NOT EDIT
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
import os
import json
from sys import argv

Name = "Rapid7 InsightVM Cloud"
Vendor = "rapid7"
Version = "4.0.0"
Version = "5.0.0"
Description = "InsightVM is a powerful vulnerability management tool which finds, prioritizes, and remediates vulnerabilities. This plugin uses the InsightVM Cloud Integrations API to view assets and start scans"


Expand All @@ -23,7 +23,7 @@ def main():
monkey.patch_all()

import insightconnect_plugin_runtime
from icon_rapid7_insightvm_cloud import connection, actions, triggers
from icon_rapid7_insightvm_cloud import connection, actions, triggers, tasks

class ICONRapid7InsightvmCloud(insightconnect_plugin_runtime.Plugin):
def __init__(self):
Expand All @@ -34,18 +34,18 @@ def main():
description=Description,
connection=connection.Connection()
)
self.add_action(actions.StartScan())

self.add_action(actions.GetScan())

self.add_action(actions.AssetSearch())

self.add_action(actions.GetAsset())

self.add_action(actions.GetScan())

self.add_action(actions.StartScan())


self.add_action(actions.StopScan())

self.add_action(actions.VulnSearch())


"""Run plugin"""
cli = insightconnect_plugin_runtime.CLI(ICONRapid7InsightvmCloud())
Expand Down
Loading

0 comments on commit e0d555d

Please sign in to comment.