Skip to content

Commit

Permalink
[SOAR-16875] - Palo Alto Pan OS - Addressing SNYK vulnerabilities in …
Browse files Browse the repository at this point in the history
…gunicorn and validators (#2575)

* SOAR-16875-Addressing SNYK vulnerabilities in gunicorn and validators

* SOAR-16875-Addressing SNYK vulnerabilities in gunicorn and validators
  • Loading branch information
rbowden-r7 authored Jun 10, 2024
1 parent b4f6853 commit 2c97b77
Show file tree
Hide file tree
Showing 88 changed files with 1,708 additions and 1,553 deletions.
44 changes: 22 additions & 22 deletions plugins/palo_alto_pan_os/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,83 +1,83 @@
{
"spec": "e1b38b29297a038da1ec6b91b26b22bf",
"manifest": "35ba8c4507362531688b4473d663a298",
"setup": "d8d4d47822a6d5f01f5b285f1a795f5a",
"spec": "7306d1c21890dd515eea59c2b1b44a71",
"manifest": "2f13e2a24ce4e7ff30e39976a212f368",
"setup": "858a422c6d6f7123c68a02a0a32ed2c5",
"schemas": [
{
"identifier": "add_address_object_to_group/schema.py",
"hash": "f04b5691ff3b451c24d058692b076e54"
"hash": "ec7393f6595e5a011dbf7b94cfee6c4e"
},
{
"identifier": "add_external_dynamic_list/schema.py",
"hash": "a9f2f9f1444b23d9a0649d193b6eb1dd"
"hash": "e87b41f1908270001572547de3a0df94"
},
{
"identifier": "add_to_policy/schema.py",
"hash": "4483d8ffabb95a26c55e5d1be3658894"
"hash": "c88aca2ce8d15fc4551d99780ef8d445"
},
{
"identifier": "check_if_address_object_in_group/schema.py",
"hash": "1d9f2617e050cf7bbe71652527f0ef56"
"hash": "36485b20e58c4f5cf57e99f182d356a0"
},
{
"identifier": "commit/schema.py",
"hash": "68db1afee25c447bab35de6ad60c28f5"
"hash": "a35fa2960cb7e9481142151a2823ae37"
},
{
"identifier": "delete/schema.py",
"hash": "9157a5100b6b8dfa7459003519139b1b"
"hash": "1ffc49835e225ce23da5e06c5c9fe996"
},
{
"identifier": "edit/schema.py",
"hash": "5eebc7d2538eeab8a4ec279eb811f6aa"
"hash": "722e3ac204c560a03f3ec560170e0d46"
},
{
"identifier": "get/schema.py",
"hash": "8e72d2a850eeb6226a0926dec9f719e3"
"hash": "59181dffc3730168836cc4a036e70807"
},
{
"identifier": "get_addresses_from_group/schema.py",
"hash": "6349926650f1a7a6281a1938583eb1d1"
"hash": "346f99eda10cd67fd9ec3e21357866ba"
},
{
"identifier": "get_policy/schema.py",
"hash": "facdbb609079baa0462182afdd87208c"
"hash": "4a07866a54d3ab39c3d45516c03dc91d"
},
{
"identifier": "op/schema.py",
"hash": "1495b1797c7075f9d2ee056391c3db06"
"hash": "31a5d702435c8329964ec99700704624"
},
{
"identifier": "remove_address_object_from_group/schema.py",
"hash": "99eed1c3a9ddb8df79db35d8eeec3571"
"hash": "726f6ea8f38c6aa037f8bb6de27597b2"
},
{
"identifier": "remove_from_policy/schema.py",
"hash": "0b7ec5946614455ae6618f15ef71fa16"
"hash": "6520848a115b8177acd85a33de44a80f"
},
{
"identifier": "retrieve_logs/schema.py",
"hash": "94976fbfdc277dcf06a7c0a2def688b5"
"hash": "ff18e0d432afc33a58efc106644716fe"
},
{
"identifier": "set/schema.py",
"hash": "f5c2b91e5261a499d4482d762cd46452"
"hash": "da5b3ae7314fbb7528f0b12a4a7e2f5f"
},
{
"identifier": "set_address_object/schema.py",
"hash": "b724f581a980b19b9fe067e243b37927"
"hash": "6dc0733af28a83033b8fd1a2d4adac52"
},
{
"identifier": "set_security_policy_rule/schema.py",
"hash": "bebf88bdbfb89c5b821389c9428d9209"
"hash": "6a4919a1b8841316768015e3e7aaca65"
},
{
"identifier": "show/schema.py",
"hash": "a36dde81a2264fc3739366fdd801a2ea"
"hash": "f881156e3d988da227a0ab47f5e6c64c"
},
{
"identifier": "connection/schema.py",
"hash": "8e3dc8ac74f55325b4be7b0172a91ec5"
"hash": "39500737e1002462efc1db2b83a1b52a"
}
]
}
19 changes: 6 additions & 13 deletions plugins/palo_alto_pan_os/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
FROM komand/python-3-37-plugin:3
# 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-plugin:5.4.9

LABEL organization=rapid7
LABEL sdk=python
LABEL type=plugin

# 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
USER root
USER nobody

ENTRYPOINT ["/usr/local/bin/komand_palo_alto_pan_os"]
76 changes: 38 additions & 38 deletions plugins/palo_alto_pan_os/bin/komand_palo_alto_pan_os
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 = "Palo Alto Firewall"
Vendor = "rapid7"
Version = "6.1.4"
Description = "Manage Palo Alto Networks firewall devices"
Version = "6.1.5"
Description = "[PAN-OS](https://www.paloaltonetworks.com/documentation/80/pan-os) is the software that runs all Palo Alto Networks next-generation firewalls. This plugin utilizes the [PAN-OS API](https://www.paloaltonetworks.com/documentation/80/pan-os/xml-api) to provide programmatic management of the Palo Alto Firewall appliance(s). It supports managing firewalls individually or centralized via [Panorama](https://www.paloaltonetworks.com/network-security/panorama)"


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

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

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

self.add_action(actions.AddExternalDynamicList())

self.add_action(actions.AddToPolicy())

self.add_action(actions.CheckIfAddressObjectInGroup())

self.add_action(actions.Commit())

self.add_action(actions.SetSecurityPolicyRule())

self.add_action(actions.Show())

self.add_action(actions.Get())

self.add_action(actions.Delete())


self.add_action(actions.Set())

self.add_action(actions.Edit())

self.add_action(actions.Get())

self.add_action(actions.GetAddressesFromGroup())

self.add_action(actions.GetPolicy())


self.add_action(actions.Commit())

self.add_action(actions.Op())

self.add_action(actions.RemoveAddressObjectFromGroup())

self.add_action(actions.RemoveFromPolicy())


self.add_action(actions.RetrieveLogs())

self.add_action(actions.Set())


self.add_action(actions.AddToPolicy())

self.add_action(actions.RemoveFromPolicy())

self.add_action(actions.AddExternalDynamicList())

self.add_action(actions.SetAddressObject())

self.add_action(actions.SetSecurityPolicyRule())

self.add_action(actions.Show())


self.add_action(actions.GetPolicy())

self.add_action(actions.CheckIfAddressObjectInGroup())

self.add_action(actions.RemoveAddressObjectFromGroup())

self.add_action(actions.AddAddressObjectToGroup())

self.add_action(actions.GetAddressesFromGroup())


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


Expand Down
Loading

0 comments on commit 2c97b77

Please sign in to comment.