Skip to content

Commit

Permalink
[SOAR- 17553] Insight App Sec | Bug fix for Scans and Vulnerabilities (
Browse files Browse the repository at this point in the history
…#2718)

* Fix broken URLs | Refresh with new tooling

* updated spec

* SCA fixed

* Update help.md

* Fix hopefully

* Update unit tests

* Fix unit tests
  • Loading branch information
cmcnally-r7 authored Aug 22, 2024
1 parent f6e1673 commit 3dd7e41
Show file tree
Hide file tree
Showing 71 changed files with 1,949 additions and 2,693 deletions.
46 changes: 23 additions & 23 deletions plugins/rapid7_insightappsec/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,87 +1,87 @@
{
"spec": "214b23f3f37c247348552be7dcbebddb",
"manifest": "1d3ef3b3a8735fb1ac35cd50a921dc02",
"setup": "6a9faeecd04bdc47bc54bc4e25756566",
"spec": "117d80079bb0b2b65c8233f20fbcabec",
"manifest": "c2f2809f964a894b6e44f6fd276c2b10",
"setup": "3d332c675220f6ffb50100a67e610fd5",
"schemas": [
{
"identifier": "create_scan_config/schema.py",
"hash": "bff6210bd1f501117604026154878f92"
"hash": "823b651e8b669ed833eeaf2614bdcf0e"
},
{
"identifier": "create_schedule/schema.py",
"hash": "aa7b4a691537c4e44598c1cf9455af10"
"hash": "e3f82ca1aac786acd410433f7f9e719e"
},
{
"identifier": "delete_scan/schema.py",
"hash": "b6914b123a56e2e54ee34d07c925ea68"
"hash": "446a5bcbebc929cdb83e31452ae32533"
},
{
"identifier": "delete_scan_config/schema.py",
"hash": "38106f54187149985be206e200b134e6"
"hash": "8f62daab284362a4108c5b010a599c04"
},
{
"identifier": "get_scan/schema.py",
"hash": "cc63ece75a67fe3f263f48c74d0779cb"
"hash": "9d6c620e5fa33b262828da73318b2288"
},
{
"identifier": "get_scan_config/schema.py",
"hash": "deebc78a0cd65962a2fea054f50c8922"
"hash": "1ef840fb088d3d45fafc50403413b217"
},
{
"identifier": "get_scan_configs/schema.py",
"hash": "2d4b98fa82f1a71421217811648f4888"
"hash": "fcc22b92ee88aa989b60bfb75fe960ee"
},
{
"identifier": "get_scan_engine_events/schema.py",
"hash": "5a74bda6379ca5d411c61b8c60aa35af"
"hash": "c70e7301d9190000c6f90c194af92095"
},
{
"identifier": "get_scan_execution_details/schema.py",
"hash": "0c285f7e2f94fdc52051d900c06ae6ac"
"hash": "c33df73fafacc7c39fbf556a4e88469e"
},
{
"identifier": "get_scan_platform_events/schema.py",
"hash": "da46f7b44c375d40559be2bd45a2a8b5"
"hash": "efa9b9a98de8511b0c1378b79491f67a"
},
{
"identifier": "get_scans/schema.py",
"hash": "0f4014ab76a6728415a815b6089545a7"
"hash": "8834bd31bb1db2968db76894a31d6de8"
},
{
"identifier": "get_vulnerabilities/schema.py",
"hash": "752bb1c45dbcd9d79b611e5b414ea94a"
"hash": "8ef9cd4db22bcff99378ba050e74f5b1"
},
{
"identifier": "get_vulnerability/schema.py",
"hash": "e41a11335e5af5719465bc137df2a463"
"hash": "93671153c378bde70dcb44371eed144e"
},
{
"identifier": "get_vulnerability_discoveries/schema.py",
"hash": "afc63b036befd5295c7eb774cdcb315a"
"hash": "6b7c2b7c19ed01b129e01d1da1ba6712"
},
{
"identifier": "get_vulnerability_discovery/schema.py",
"hash": "7277e815e1dde56e04719e2160abbb12"
"hash": "23ed9ba1306a12724c132e3ea9e67caf"
},
{
"identifier": "submit_scan/schema.py",
"hash": "8d174b9d2d66349d0aacdbd9e63a8877"
"hash": "3540115be0217bb46aa629e3a05c2f03"
},
{
"identifier": "submit_scan_action/schema.py",
"hash": "fd29ebf9f7b897ee2bee30c007e29f03"
"hash": "5b36a8dd02fc04023cf046e092ccc1bc"
},
{
"identifier": "update_scan_config/schema.py",
"hash": "99c468ef85a5d89cb95f91d45e271fdc"
"hash": "02c057a10bc44a3d667632b6eb1a4313"
},
{
"identifier": "connection/schema.py",
"hash": "a4794b162d6017771ccbaed1fc7af80c"
"hash": "da2a314d80baf6cfd606476b253b1100"
},
{
"identifier": "new_vulnerabilities/schema.py",
"hash": "d502b76869c8fe836cc117c6a132d3f4"
"hash": "93cc293ef2e6433cde53b9f3558487e5"
}
]
}
27 changes: 11 additions & 16 deletions plugins/rapid7_insightappsec/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,20 @@
FROM rapid7/insightconnect-python-3-38-slim-plugin:4
# The three supported python parent images are:
# - komand/python-2-plugin
# - komand/python-3-plugin
# - komand/python-pypy3-plugin
#
LABEL organization=komand
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.1.0

# Add any custom package dependencies here
# NOTE: Add pip packages to requirements.txt
LABEL organization=rapid7
LABEL sdk=python

# 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
ADD . /python/src

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

ENTRYPOINT ["/usr/local/bin/komand_rapid7_insightappsec"]
# User to run plugin code. The two supported users are: root, nobody
USER nobody

ENTRYPOINT ["/usr/local/bin/komand_rapid7_insightappsec"]
66 changes: 33 additions & 33 deletions plugins/rapid7_insightappsec/bin/komand_rapid7_insightappsec
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
#!/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 InsightAppSec"
Vendor = "rapid7"
Version = "1.2.0"
Description = "This plugin allows for the creation, configuration, and starting of scans. The plugin can also retrieve scan results and logging related to the execution of the scan"
Version = "1.2.1"
Description = "DAST capabilities and InsightConnects automation prowess can help you simplify your SDLC Process with this scan management plugin. The need for automation becomes paramount in the fast moving landscape of modern web scanning and automating you web app scanning with this plugin can save you loads of time to allow you to focus on remediating issues to get your app into product faster!"


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

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

class ICONRapid7Insightappsec(insightconnect_plugin_runtime.Plugin):
def __init__(self):
Expand All @@ -35,43 +35,43 @@ def main():
connection=connection.Connection()
)
self.add_trigger(triggers.NewVulnerabilities())

self.add_action(actions.CreateScanConfig())

self.add_action(actions.CreateSchedule())

self.add_action(actions.DeleteScan())

self.add_action(actions.DeleteScanConfig())

self.add_action(actions.GetScan())


self.add_action(actions.GetScanConfig())


self.add_action(actions.UpdateScanConfig())

self.add_action(actions.DeleteScanConfig())

self.add_action(actions.GetScanConfigs())


self.add_action(actions.SubmitScan())

self.add_action(actions.GetScan())

self.add_action(actions.GetScans())

self.add_action(actions.DeleteScan())

self.add_action(actions.SubmitScanAction())

self.add_action(actions.GetScanEngineEvents())

self.add_action(actions.GetScanExecutionDetails())

self.add_action(actions.GetScanPlatformEvents())

self.add_action(actions.GetScans())

self.add_action(actions.GetVulnerabilities())


self.add_action(actions.GetVulnerability())

self.add_action(actions.GetVulnerabilityDiscoveries())


self.add_action(actions.GetVulnerabilities())

self.add_action(actions.CreateSchedule())

self.add_action(actions.GetVulnerabilityDiscovery())

self.add_action(actions.SubmitScan())

self.add_action(actions.SubmitScanAction())

self.add_action(actions.UpdateScanConfig())


self.add_action(actions.GetVulnerabilityDiscoveries())


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

0 comments on commit 3dd7e41

Please sign in to comment.