Skip to content

Commit

Permalink
String - 16974 - Initial updates for fedramp compliance | Updated SDK…
Browse files Browse the repository at this point in the history
… to the latest version (#2768) (#2773)
  • Loading branch information
igorski-r7 authored Sep 9, 2024
1 parent 53aba14 commit fea5eba
Show file tree
Hide file tree
Showing 45 changed files with 753 additions and 347 deletions.
24 changes: 12 additions & 12 deletions plugins/string/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,43 +1,43 @@
{
"spec": "67b1aec16d3984c4cfe263d856f22561",
"manifest": "828f222889a88dd9686e97b8327a6d0f",
"setup": "a84d0255a4806c28f6d62d612e0f3cc0",
"spec": "2d872dd50b19daa898791255146106af",
"manifest": "922ea555f44944378c4f1b096747bd0c",
"setup": "c44b119f9f8f9981c367bc04a6dc9234",
"schemas": [
{
"identifier": "length/schema.py",
"hash": "0de363a97e185c91b95b3d4e01fbb075"
"hash": "3e1148fc9cc7384ff04e76f77b57434d"
},
{
"identifier": "lower/schema.py",
"hash": "84b256cc45c2bfe5fc9a8be4d1bfd85e"
"hash": "4b202dd01733d13bf70235e901acef6a"
},
{
"identifier": "replace/schema.py",
"hash": "00cb6cb4d33ef74048856c84537ef1d2"
"hash": "0354be994d37d1129247095f398deff5"
},
{
"identifier": "set_encoding/schema.py",
"hash": "ae4eb9807851a18300e147253f3ad913"
"hash": "6f954cf5a4c9274affebb8d9c6102949"
},
{
"identifier": "split_to_list/schema.py",
"hash": "58448f50d317761aa3dd5cb7ec30a622"
"hash": "31618e2e31399771514d12a8f191f7dd"
},
{
"identifier": "split_to_object/schema.py",
"hash": "95314b1484fe6cfb1cbc307d19afede4"
"hash": "d39a4841d4f5601bc93f5a28ae286eeb"
},
{
"identifier": "trim/schema.py",
"hash": "658fcd5acc1e51653618a0b97b0e4850"
"hash": "fcef89843d1448a481f7cc6b96a6d11d"
},
{
"identifier": "upper/schema.py",
"hash": "5b01e824ada701bcfbe19ce2557af1de"
"hash": "75c74ad6056ac287d31024cdaa36ff32"
},
{
"identifier": "connection/schema.py",
"hash": "da5382221ca2a33a2f854e17b068d502"
"hash": "bd524b567f9638ba1c6f7e0c9e45ff2e"
}
]
}
23 changes: 8 additions & 15 deletions plugins/string/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
FROM rapid7/insightconnect-python-3-38-plugin:4
# The three supported python parent images are:
# - komand/python-2-plugin
# - komand/python-3-plugin
# - komand/python-pypy3-plugin
#
LABEL organization=komand
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.1.0

# 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/komand_string"]
30 changes: 15 additions & 15 deletions plugins/string/bin/komand_string
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 = "String Operations"
Vendor = "rapid7"
Version = "1.4.0"
Version = "1.4.1"
Description = "The String plugin provides common programmatic string operations"


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

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

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

self.add_action(actions.Lower())

self.add_action(actions.Replace())

self.add_action(actions.SetEncoding())

self.add_action(actions.SplitToList())

self.add_action(actions.SplitToObject())

self.add_action(actions.Trim())


self.add_action(actions.Upper())


self.add_action(actions.Lower())

self.add_action(actions.Trim())

self.add_action(actions.Length())

self.add_action(actions.Replace())


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

0 comments on commit fea5eba

Please sign in to comment.