Skip to content

Commit bebf9d4

Browse files
rbowden-r7igorski-r7
authored andcommitted
[PLGN-660] - Cylance Protect - Updating sdk and requirements, adding unit tests (#2227)
* PLGN-660 - Updating sdk and requirements, adding unit tests * PLGN-660 - Updating sdk and requirements, adding unit tests * PLGN-660 - Updating sdk and requirements, adding unit tests * PLGN-660 - Updating sdk and requirements, adding unit tests
1 parent bd53813 commit bebf9d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2114
-1277
lines changed

plugins/cylance_protect/.CHECKSUM

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
11
{
2-
"spec": "ed3aa020c67848efe4fa1c0efb8080de",
3-
"manifest": "035fce5acb000dea5e17db278f227e8c",
4-
"setup": "fc89fa50ef6688b7a7b4314ed6317499",
2+
"spec": "c25181c1f0419647152b7fe3cf70d00c",
3+
"manifest": "17d10447d7ceac56e9b081f8a63467cd",
4+
"setup": "8be114c0f4f76215211fbbcb6f11333d",
55
"schemas": [
66
{
77
"identifier": "blacklist/schema.py",
8-
"hash": "3815b3ec59bf44113390edeb1e46d929"
8+
"hash": "7954b936be97fec6b84b24ac6541a0fc"
99
},
1010
{
1111
"identifier": "delete_asset/schema.py",
12-
"hash": "5d45a577f9601fa87ef3447e48dc3611"
12+
"hash": "625669d9e52a3fbbfac7ae2f24f92b04"
1313
},
1414
{
1515
"identifier": "get_agent_details/schema.py",
16-
"hash": "af42365d39f72bdd2d48709b28367255"
16+
"hash": "a837300f1ec9a4bbd65a5e6570fc7f98"
1717
},
1818
{
1919
"identifier": "quarantine/schema.py",
20-
"hash": "9d575fe6af1b20f93719c46dc7e41bf4"
20+
"hash": "7e941a673a1cf8ed78eb2ff29b6d819b"
2121
},
2222
{
2323
"identifier": "search_agents/schema.py",
24-
"hash": "8cfac83a4cf94f44e99346e4c4d824cf"
24+
"hash": "691a4f1c114cdc0bb947f74a6d84f8cf"
2525
},
2626
{
2727
"identifier": "search_threat_agents/schema.py",
28-
"hash": "8c07566de4cdf43e2f9062588b0a433e"
28+
"hash": "6edc17d6e955b8ab2290389dda2bdfac"
2929
},
3030
{
3131
"identifier": "search_threats/schema.py",
32-
"hash": "93b93ef42a01a531b877ed20e0c6bc18"
32+
"hash": "e8f1be199163d950020a902b4eb61a71"
3333
},
3434
{
3535
"identifier": "update_agent/schema.py",
36-
"hash": "22d843c38f93872f10ae4582f53695e8"
36+
"hash": "b17040b9852ed8de2ad5fc4fd235d5eb"
3737
},
3838
{
3939
"identifier": "update_agent_threat/schema.py",
40-
"hash": "12b9ed88ab2a1fc36191cae0609f51fa"
40+
"hash": "f02aadf6b6f8790d69a968c5d56442fd"
4141
},
4242
{
4343
"identifier": "connection/schema.py",
44-
"hash": "7e21c6307043d0f723cedd7679449627"
44+
"hash": "c1c00527e6141f5bb2faffd4124d09e2"
4545
}
4646
]
4747
}

plugins/cylance_protect/Dockerfile

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
1-
FROM rapid7/insightconnect-python-3-38-plugin:4
2-
# Refer to the following documentation for available SDK parent images: https://docs.rapid7.com/insightconnect/sdk-guide/#sdk-guide
1+
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-plugin:latest
32

43
LABEL organization=rapid7
54
LABEL sdk=python
65

7-
# Add any custom package dependencies here
8-
# NOTE: Add pip packages to requirements.txt
9-
10-
# End package dependencies
11-
12-
# Add source code
136
WORKDIR /python/src
7+
148
ADD ./plugin.spec.yaml /plugin.spec.yaml
15-
ADD . /python/src
9+
ADD ./requirements.txt /python/src/requirements.txt
1610

17-
# Install pip dependencies
1811
RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
1912

20-
# Install plugin
21-
RUN python setup.py build && python setup.py install
13+
ADD . /python/src
14+
15+
RUN python setup.py build && python setup.py install
2216

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

plugins/cylance_protect/bin/icon_cylance_protect

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
#!/usr/bin/env python
2-
# GENERATED BY KOMAND SDK - DO NOT EDIT
2+
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
33
import os
44
import json
55
from sys import argv
66

77
Name = "BlackBerry CylancePROTECT"
88
Vendor = "rapid7"
9-
Version = "1.5.1"
10-
Description = "Automate detection and response operations using CylancePROTECT"
9+
Version = "1.5.2"
10+
Description = "The [BlackBerry CylancePROTECT](https://www.cylance.com/en-us/platform/products/cylance-protect.html) plugin allows you to automate response operations for CylancePROTECT and CylanceOPTICS"
1111

1212

1313
def main():
@@ -23,7 +23,7 @@ def main():
2323
monkey.patch_all()
2424

2525
import insightconnect_plugin_runtime
26-
from icon_cylance_protect import connection, actions, triggers
26+
from icon_cylance_protect import connection, actions, triggers, tasks
2727

2828
class ICONCylanceProtect(insightconnect_plugin_runtime.Plugin):
2929
def __init__(self):
@@ -34,24 +34,24 @@ def main():
3434
description=Description,
3535
connection=connection.Connection()
3636
)
37-
self.add_action(actions.Blacklist())
38-
39-
self.add_action(actions.DeleteAsset())
40-
4137
self.add_action(actions.GetAgentDetails())
42-
38+
39+
self.add_action(actions.Blacklist())
40+
4341
self.add_action(actions.Quarantine())
44-
42+
4543
self.add_action(actions.SearchAgents())
46-
47-
self.add_action(actions.SearchThreatAgents())
48-
44+
4945
self.add_action(actions.SearchThreats())
50-
51-
self.add_action(actions.UpdateAgent())
52-
46+
47+
self.add_action(actions.SearchThreatAgents())
48+
5349
self.add_action(actions.UpdateAgentThreat())
54-
50+
51+
self.add_action(actions.UpdateAgent())
52+
53+
self.add_action(actions.DeleteAsset())
54+
5555

5656
"""Run plugin"""
5757
cli = insightconnect_plugin_runtime.CLI(ICONCylanceProtect())

0 commit comments

Comments
 (0)