-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated plugin to be obsolete. Refreshed tooling and added fixes to a…
…llow to build (#2142) Co-authored-by: Dympna Laverty <dympna_laverty@rapid7.com>
- Loading branch information
1 parent
622cb72
commit c2311e7
Showing
18 changed files
with
126 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
{ | ||
"spec": "7872d925ba11186fc48138dee9f05245", | ||
"manifest": "845e4f2955fb67f8eb4a8045680f0bac", | ||
"setup": "a276832be6eb9991560201e47c145025", | ||
"spec": "0729ce0ec87040ae098e6aeab004f228", | ||
"manifest": "7fde712a855eb529eac037c730976cf7", | ||
"setup": "dd9566830af69fe24c64eb00847fb566", | ||
"schemas": [ | ||
{ | ||
"identifier": "search/schema.py", | ||
"hash": "9b4c2095f84c8443b55ecf30ab803dd0" | ||
"hash": "d9cec16375a73c3ea5457a288d4ab36d" | ||
}, | ||
{ | ||
"identifier": "connection/schema.py", | ||
"hash": "cb60c2b5b62fafb9634d667a8ad96277" | ||
"hash": "bd524b567f9638ba1c6f7e0c9e45ff2e" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,20 @@ | ||
FROM komand/python-pypy3-plugin:2 | ||
# 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 | ||
|
||
# Add any custom package dependencies here | ||
# NOTE: Add pip packages to requirements.txt | ||
RUN git clone https://github.com/komand/truffleHog.git && cd truffleHog/ && \ | ||
pip install --user -r requirements.txt && \ | ||
pip install --user truffleHog | ||
|
||
# End package dependencies | ||
|
||
# Add source code | ||
FROM rapid7/insightconnect-python-3-38-plugin:4 | ||
|
||
LABEL organization=rapid7 | ||
LABEL sdk=python | ||
|
||
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/komand_trufflehog"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
# GENERATED BY KOMAND SDK - DO NOT EDIT | ||
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT | ||
|
||
from .search.action import Search | ||
|
2 changes: 1 addition & 1 deletion
2
plugins/trufflehog/komand_trufflehog/actions/search/__init__.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# GENERATED BY KOMAND SDK - DO NOT EDIT | ||
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT | ||
from .action import Search |
7 changes: 5 additions & 2 deletions
7
plugins/trufflehog/komand_trufflehog/actions/search/action.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
# GENERATED BY KOMAND SDK - DO NOT EDIT | ||
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT | ||
from .connection import Connection |
6 changes: 2 additions & 4 deletions
6
plugins/trufflehog/komand_trufflehog/connection/connection.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
# GENERATED BY KOMAND SDK - DO NOT EDIT | ||
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# List third-party dependencies here, separated by newlines. | ||
# All dependencies must be version-pinned, eg. requests==1.2.0 | ||
# See: https://pip.pypa.io/en/stable/user_guide/#requirements-files | ||
truffleHog==2.0.97 | ||
truffleHog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
# GENERATED BY KOMAND SDK - DO NOT EDIT | ||
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT | ||
from setuptools import setup, find_packages | ||
|
||
|
||
setup(name="trufflehog-rapid7-plugin", | ||
version="1.1.3", | ||
version="1.1.4", | ||
description="Search through git repositories for high entropy strings and secrets, digging deep into commit history", | ||
author="rapid7", | ||
author_email="", | ||
url="", | ||
packages=find_packages(), | ||
install_requires=['komand'], # Add third-party dependencies to requirements.txt, not here! | ||
install_requires=['insightconnect-plugin-runtime'], # Add third-party dependencies to requirements.txt, not here! | ||
scripts=['bin/komand_trufflehog'] | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import sys | ||
import os | ||
sys.path.append(os.path.abspath('../')) | ||
|
||
from unittest import TestCase | ||
from komand_trufflehog.connection.connection import Connection | ||
from komand_trufflehog.actions.search import Search | ||
import json | ||
import logging | ||
|
||
|
||
class TestSearch(TestCase): | ||
def test_search(self): | ||
""" | ||
DO NOT USE PRODUCTION/SENSITIVE DATA FOR UNIT TESTS | ||
TODO: Implement test cases here | ||
""" | ||
|
||
self.fail("Unimplemented Test Case") |