Skip to content

Commit

Permalink
snyk and sdk fortinet-6.0.2 (#2944)
Browse files Browse the repository at this point in the history
  • Loading branch information
rmurray-r7 authored Nov 8, 2024
1 parent 5b52d0b commit 86d6b0f
Show file tree
Hide file tree
Showing 35 changed files with 1,204 additions and 1,277 deletions.
22 changes: 11 additions & 11 deletions plugins/fortinet_fortigate/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
{
"spec": "d24f81ed56c52f17bb3eaf07ca7f4f79",
"manifest": "25c2ee95755bf96816468d521256a469",
"setup": "38a16e1c46b82672a3a0f4b6f40c26b9",
"spec": "27d7f1a365e02b0311237032e6396b0b",
"manifest": "40e65a3c6bcb847f1c136069b7e50a01",
"setup": "4078c3897f4562c755670a227625f9f8",
"schemas": [
{
"identifier": "add_address_object_to_address_group/schema.py",
"hash": "bebd651b0ebab6f2e25a1472ed6a74ab"
"hash": "4963414c7e7298cfa5d4b3696da7c804"
},
{
"identifier": "check_if_address_in_group/schema.py",
"hash": "1b47586ad5c5197abb5d34be7afa57f6"
"hash": "421a3bebeaeea383b98dc533bbc62a68"
},
{
"identifier": "create_address_object/schema.py",
"hash": "265b5032f2139d4fda1f48388ed0a5b7"
"hash": "862fed20ff97fb02e63902276c0f1bcf"
},
{
"identifier": "delete_address_object/schema.py",
"hash": "45de2cda78fc457f6e12862fc53240bc"
"hash": "41694d38b30179728dc5e8b91934483c"
},
{
"identifier": "get_address_objects/schema.py",
"hash": "342ee2ebc9925bf446a527fac33ff48e"
"hash": "a502beccb2bad443fe10f1326ee44967"
},
{
"identifier": "get_policies/schema.py",
"hash": "b6945addabea61c40d0944393e2161ed"
"hash": "1088d5eb4ae40e908ebe3a935a67b5b6"
},
{
"identifier": "remove_address_object_from_group/schema.py",
"hash": "93f51e8615e6b0017b0c01969ceb6824"
"hash": "5c47eb579deb5f7d14828aa544cca6cc"
},
{
"identifier": "connection/schema.py",
"hash": "3fc0f99f218178ceb7285b718026097c"
"hash": "3dd5b76bd1d218980d2b07f55851e44b"
}
]
}
17 changes: 5 additions & 12 deletions plugins/fortinet_fortigate/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
FROM rapid7/insightconnect-python-3-38-slim-plugin:4
# 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.2.0

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
# needed to run SSL Verify
USER nobody

ENTRYPOINT ["/usr/local/bin/icon_fortinet_fortigate"]
26 changes: 13 additions & 13 deletions plugins/fortinet_fortigate/bin/icon_fortinet_fortigate
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 = "Fortinet FortiGate"
Vendor = "rapid7"
Version = "6.0.1"
Version = "6.0.2"
Description = "FortiGate Next Generation Firewalls (NGFWs) enable security-driven networking and consolidate industry-leading security capabilities such as intrusion prevention system (IPS), web filtering, secure sockets layer (SSL) inspection, and automated threat protection"


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

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

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

self.add_action(actions.CheckIfAddressInGroup())


self.add_action(actions.GetPolicies())

self.add_action(actions.GetAddressObjects())

self.add_action(actions.CreateAddressObject())

self.add_action(actions.DeleteAddressObject())

self.add_action(actions.GetAddressObjects())

self.add_action(actions.GetPolicies())


self.add_action(actions.AddAddressObjectToAddressGroup())

self.add_action(actions.RemoveAddressObjectFromGroup())


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

0 comments on commit 86d6b0f

Please sign in to comment.