Skip to content

Commit

Permalink
snyk and sdk - trendmicro
Browse files Browse the repository at this point in the history
  • Loading branch information
rmurray-r7 committed Nov 1, 2024
1 parent 1e9cf68 commit 07911f6
Show file tree
Hide file tree
Showing 30 changed files with 333 additions and 279 deletions.
18 changes: 9 additions & 9 deletions plugins/trendmicro_deepsecurity/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
{
"spec": "87df02f543c20dbd826f7b2f50c1a40a",
"manifest": "a2b7ef210c31ec64898d6dbeba7c56fe",
"setup": "f8c03ed81b7496550e9ac4b44ca81bbc",
"spec": "c24b11137bc6c86ba10296dd19d2a409",
"manifest": "a87fb2d79f552a29d4b6d6e698fa52eb",
"setup": "139cf33ec232a2888bb62b92b08ed651",
"schemas": [
{
"identifier": "deploy_rules/schema.py",
"hash": "8674123f170310085c72627eb16cb103"
"hash": "ac52aeab22921a006441d8cd14819b7b"
},
{
"identifier": "get_rule_details/schema.py",
"hash": "0eb15d3e0354f05e7d24fa53a5c48888"
"hash": "12022e88fc85aa2aa0ba67c553ba3728"
},
{
"identifier": "list_rules/schema.py",
"hash": "234d239b2226033398e195fe476e255b"
"hash": "ec8407791e5814ec61d60b2e3129b7d3"
},
{
"identifier": "search_computers/schema.py",
"hash": "dbbbb50f7f5c3fe3fb2a5ad1bff0558b"
"hash": "1c12b4aac599e5d8cb1f3382a17e5282"
},
{
"identifier": "search_rules/schema.py",
"hash": "cadb6a7fecb480b49bab55a55f48382f"
"hash": "701bc13aee0460e1579ee0dba473f94f"
},
{
"identifier": "connection/schema.py",
"hash": "39722fd7c5ae424e3941b7a534a713df"
"hash": "c9dca0c588f6c8129395f5db3f96fa28"
}
]
}
16 changes: 5 additions & 11 deletions plugins/trendmicro_deepsecurity/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
FROM komand/python-3-37-slim-plugin
# Refer to the following documentation for available SDK parent images: https://docs.rapid7.com/insightconnect/sdk-guide/#sdk-guide
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.1.4

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

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

# User to run plugin code. The two supported users are: root, nobody
Expand Down
26 changes: 13 additions & 13 deletions plugins/trendmicro_deepsecurity/bin/icon_trendmicro_deepsecurity
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 = "Trend Micro Deep Security"
Vendor = "rapid7"
Version = "2.2.2"
Version = "2.2.3"
Description = "Utilize the Deep Security IPS engine to protect against vulnerabilities without installing a patch (virtual patching)"


Expand All @@ -22,10 +22,10 @@ def main():
from gevent import monkey
monkey.patch_all()

import komand
from icon_trendmicro_deepsecurity import connection, actions, triggers
import insightconnect_plugin_runtime
from icon_trendmicro_deepsecurity import connection, actions, triggers, tasks

class ICONTrendmicroDeepsecurity(komand.Plugin):
class ICONTrendmicroDeepsecurity(insightconnect_plugin_runtime.Plugin):
def __init__(self):
super(self.__class__, self).__init__(
name=Name,
Expand All @@ -34,19 +34,19 @@ def main():
description=Description,
connection=connection.Connection()
)
self.add_action(actions.SearchRules())

self.add_action(actions.DeployRules())

self.add_action(actions.GetRuleDetails())


self.add_action(actions.ListRules())


self.add_action(actions.GetRuleDetails())

self.add_action(actions.SearchComputers())

self.add_action(actions.SearchRules())



"""Run plugin"""
cli = komand.CLI(ICONTrendmicroDeepsecurity())
cli = insightconnect_plugin_runtime.CLI(ICONTrendmicroDeepsecurity())
cli.run()


Expand Down
Loading

0 comments on commit 07911f6

Please sign in to comment.