Skip to content

Commit

Permalink
[SOAR-18019] Hybrid Analysis - Snyk & SDK Bump (#2901) (#2907)
Browse files Browse the repository at this point in the history
* snyk and sdk - hybrid_analysis

* Fixing unit tests

* possible path fix?

* help.md and space in requirements.txt

* json format
  • Loading branch information
rmurray-r7 authored Oct 28, 2024
1 parent 702f67a commit 3cea3b9
Show file tree
Hide file tree
Showing 24 changed files with 1,211 additions and 2,506 deletions.
16 changes: 8 additions & 8 deletions plugins/hybrid_analysis/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
{
"spec": "d7364a3ad4abbc7d723d2ef90599c4a6",
"manifest": "8005f921518aa9daeb890a7e49a9bb92",
"setup": "2d1c26dd9826a6a236fe3775345fd250",
"spec": "c569504135834cc0dfdf19930c76550d",
"manifest": "1238c8c2cf312650c481e886ecfc30fd",
"setup": "790a6a359b4a3c6147fc83fd01e6306a",
"schemas": [
{
"identifier": "lookup_hash/schema.py",
"hash": "dd3fdd0f5b4d1040e1b2697a63025e3e"
"hash": "3036ef62fa2397ca8bb2d115d1ba73f2"
},
{
"identifier": "lookup_terms/schema.py",
"hash": "1467514fbeafb9315a5c56528ca7597c"
"hash": "7bc9fa12e5743a5c4894390245565fd0"
},
{
"identifier": "report/schema.py",
"hash": "0348a4071f240dd0297be5a48bd48bd3"
"hash": "4e77e4c779ecb009ee438a90e10682e4"
},
{
"identifier": "submit/schema.py",
"hash": "3aaddba2cb02ad7d374a220200931e5f"
"hash": "6914955945cb644d1b86e873f7b62d9a"
},
{
"identifier": "connection/schema.py",
"hash": "b96f4b05bd8d995241cae66da176dec7"
"hash": "2743198e97cabc24ee44e4e000dd4c3c"
}
]
}
24 changes: 8 additions & 16 deletions plugins/hybrid_analysis/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +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
#
# Update the tag to a full semver version
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.1.4

# 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

# User to run plugin code. The two supported users are: root, nobody
USER nobody

ENTRYPOINT ["/usr/local/bin/icon_hybrid_analysis"]
ENTRYPOINT ["/usr/local/bin/icon_hybrid_analysis"]
16 changes: 8 additions & 8 deletions plugins/hybrid_analysis/bin/icon_hybrid_analysis
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 = "Hybrid Analysis"
Vendor = "rapid7"
Version = "3.0.0"
Version = "3.0.1"
Description = "Lookup file hashes to determine if they are malicious"


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

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

class ICONHybridAnalysis(insightconnect_plugin_runtime.Plugin):
def __init__(self):
Expand All @@ -35,13 +35,13 @@ def main():
connection=connection.Connection()
)
self.add_action(actions.LookupHash())

self.add_action(actions.LookupTerms())

self.add_action(actions.Report())


self.add_action(actions.Submit())


self.add_action(actions.Report())


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

0 comments on commit 3cea3b9

Please sign in to comment.