Skip to content

Commit

Permalink
Automox - Fix unit test & PluginValidator checks (#2094)
Browse files Browse the repository at this point in the history
* Update unit test imports

* Remove redundant unit test

* Update helpmd actions header and links

* Move triggers section below actions

* Help.md save point

* Helpmd refresh

* Insight tooling refresh minus schemas

* Help md violations corrected

* Update checksum and helpmd

* Please be the last of the errors

* Violations fixed

* Update output name

* Title validator fixed

* Update checksum

* Update titles
  • Loading branch information
cmcnally-r7 authored Nov 1, 2023
1 parent a3bb64f commit d47bf5a
Show file tree
Hide file tree
Showing 44 changed files with 1,229 additions and 924 deletions.
8 changes: 4 additions & 4 deletions plugins/automox/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"spec": "44a6dd12631d663c562f99b9d60d90c6",
"manifest": "396c2cf6f1b72004065cd3d9b4cddd24",
"setup": "23fa3840aa940ced79bbee21e7ed4ebd",
"spec": "84465fc424dd87682adc6d0da7f322a9",
"manifest": "94f36a373309335d3662554011095836",
"setup": "791ef98d183f0b13d81b774b3de1a398",
"schemas": [
{
"identifier": "create_group/schema.py",
Expand Down Expand Up @@ -37,7 +37,7 @@
},
{
"identifier": "get_vulnerability_sync_action_set/schema.py",
"hash": "8f10053a4d8feaf624367ef9c3470bd6"
"hash": "818d5308aca1e2a9c99393d07a084b73"
},
{
"identifier": "list_devices/schema.py",
Expand Down
22 changes: 8 additions & 14 deletions plugins/automox/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-38-slim-plugin:5

LABEL organization=rapid7
LABEL organization=automox
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_automox"]
ENTRYPOINT ["/usr/local/bin/icon_automox"]
78 changes: 39 additions & 39 deletions plugins/automox/bin/icon_automox
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/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
Expand All @@ -23,7 +23,7 @@ def main():
monkey.patch_all()

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

class ICONAutomox(insightconnect_plugin_runtime.Plugin):
def __init__(self):
Expand All @@ -35,49 +35,49 @@ def main():
connection=connection.Connection()
)
self.add_trigger(triggers.GetEvents())

self.add_action(actions.CreateGroup())

self.add_action(actions.DeleteDevice())

self.add_action(actions.DeleteGroup())

self.add_action(actions.DeleteVulnerabilitySyncActionSet())

self.add_action(actions.ExecuteVulnerabilitySyncActions())


self.add_action(actions.ListOrganizations())

self.add_action(actions.ListOrganizationUsers())

self.add_action(actions.ListPolicies())

self.add_action(actions.ListDevices())

self.add_action(actions.GetDeviceByHostname())

self.add_action(actions.GetDeviceByIp())


self.add_action(actions.UpdateDevice())

self.add_action(actions.DeleteDevice())

self.add_action(actions.GetDeviceSoftware())

self.add_action(actions.GetVulnerabilitySyncActionSet())

self.add_action(actions.ListDevices())

self.add_action(actions.ListGroups())

self.add_action(actions.ListOrganizationUsers())

self.add_action(actions.ListOrganizations())

self.add_action(actions.ListPolicies())

self.add_action(actions.ListVulnerabilitySyncActionSetIssues())

self.add_action(actions.ListVulnerabilitySyncActionSetSolutions())

self.add_action(actions.ListVulnerabilitySyncActionSets())


self.add_action(actions.RunCommand())

self.add_action(actions.UpdateDevice())


self.add_action(actions.ListGroups())

self.add_action(actions.CreateGroup())

self.add_action(actions.UpdateGroup())


self.add_action(actions.DeleteGroup())

self.add_action(actions.UploadVulnerabilitySyncFile())


self.add_action(actions.GetVulnerabilitySyncActionSet())

self.add_action(actions.ListVulnerabilitySyncActionSets())

self.add_action(actions.ListVulnerabilitySyncActionSetIssues())

self.add_action(actions.ListVulnerabilitySyncActionSetSolutions())

self.add_action(actions.ExecuteVulnerabilitySyncActions())

self.add_action(actions.DeleteVulnerabilitySyncActionSet())


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

0 comments on commit d47bf5a

Please sign in to comment.