Skip to content

Commit 42b24c6

Browse files
bradchiappettaDympna Laverty
authored and
Dympna Laverty
committed
[GreyNoise] Updates + New Actions + New Trigger (#2916)
* update spec * updates * validation fixes * updates * updates * formatting * clean up * add vuln action * add timeline lookup * add similar_lookup * help sum * add trigger * trigger fixes * trigger fixes * linting * updates * updates * unit tests and fixes * fix trigger output * fix trigger * review feedback * update all action outputs * fix typos * update examples * example updates
1 parent 8ef54f4 commit 42b24c6

Some content is hidden

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

65 files changed

+4187
-696
lines changed

plugins/greynoise/.CHECKSUM

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,51 @@
11
{
2-
"spec": "21e4aba5536e29ebde5b6b0d33c7d1f1",
3-
"manifest": "0fbfe5119cf508fcbf30641105ae188d",
4-
"setup": "71be7f1ce465bc3700098c8ea7a8bb13",
2+
"spec": "e8f3a3060f1800fcad0ffc216c09d193",
3+
"manifest": "9d3f4a959fda3eb80588c86648597b40",
4+
"setup": "7d0148b4efc7745f17003a77e9e73c55",
55
"schemas": [
66
{
77
"identifier": "community_lookup/schema.py",
8-
"hash": "c11ee6039e822efc804b17753c6fbbe1"
8+
"hash": "37abd579045b68430ce584170968a270"
99
},
1010
{
1111
"identifier": "context_lookup/schema.py",
12-
"hash": "27aed1cfd2a85f49bc317dce7d19aae4"
12+
"hash": "df5822cc975eef45019e516ddb00d1e7"
1313
},
1414
{
1515
"identifier": "get_tag_details/schema.py",
16-
"hash": "9823f81c29046f34aa441ed58db094fb"
16+
"hash": "805cc2db6612fc9b0ee438bbb58b231c"
1717
},
1818
{
1919
"identifier": "gnql_query/schema.py",
20-
"hash": "65c08f73e888728d2f812254efd3c15d"
20+
"hash": "4c9874ce15384fdfafab25591d39d900"
2121
},
2222
{
2323
"identifier": "quick_lookup/schema.py",
24-
"hash": "0e7fc3a38329b5137a280b87982619b8"
24+
"hash": "a0b8045428133eca9d2ac6cc2ffe4a7a"
2525
},
2626
{
2727
"identifier": "riot_lookup/schema.py",
28-
"hash": "9e8d337328f1cc2c1900d25932e8ffa5"
28+
"hash": "0ee1bf7d6db7ee88dfd7f105bfb50ea6"
29+
},
30+
{
31+
"identifier": "similar_lookup/schema.py",
32+
"hash": "f8c96c19c59fd30ef806bf36c47bad7b"
33+
},
34+
{
35+
"identifier": "timeline_lookup/schema.py",
36+
"hash": "71963f3bf33ac17d5a46c2b017f8e9a8"
37+
},
38+
{
39+
"identifier": "vulnerability_lookup/schema.py",
40+
"hash": "d2e8b45236448f806ce8aa4eadeec367"
2941
},
3042
{
3143
"identifier": "connection/schema.py",
32-
"hash": "f7e83e2e638bbb1f4a198c8ee93a7e05"
44+
"hash": "f7a3e43e3b17d8e2059b6499b67e7e5a"
45+
},
46+
{
47+
"identifier": "monitor_ips_in_greynoise/schema.py",
48+
"hash": "bb05b2a9d9ef8add550c7149ddf7c2d2"
3349
}
3450
]
3551
}

plugins/greynoise/Dockerfile

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,20 @@
1-
FROM rapid7/insightconnect-python-3-38-slim-plugin:4
2-
# Refer to the following documentation for available SDK parent images: https://komand.github.io/python/sdk.html#version
1+
FROM --platform=linux/amd64 rapid7/insightconnect-python-3-slim-plugin:6.2.0
32

4-
LABEL organization=rapid7
3+
LABEL organization=greynoise
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
13+
ADD . /python/src
14+
2115
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
2519

26-
ENTRYPOINT ["/usr/local/bin/icon_greynoise"]
20+
ENTRYPOINT ["/usr/local/bin/icon_greynoise"]

plugins/greynoise/bin/icon_greynoise

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
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 = "GreyNoise"
88
Vendor = "greynoise"
9-
Version = "1.0.0"
9+
Version = "2.0.0"
1010
Description = "GreyNoise helps analysts recognize events not worth their attention. Indicators in GreyNoise are likely associated with opportunistic internet scanning or common business services, not targeted threats. This context helps analysts focus on what matters most"
1111

1212

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

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

2828
class ICONGreynoise(insightconnect_plugin_runtime.Plugin):
2929
def __init__(self):
@@ -34,18 +34,26 @@ def main():
3434
description=Description,
3535
connection=connection.Connection()
3636
)
37-
self.add_action(actions.CommunityLookup())
38-
37+
self.add_trigger(triggers.MonitorIpsInGreynoise())
38+
3939
self.add_action(actions.ContextLookup())
40-
40+
41+
self.add_action(actions.RiotLookup())
42+
43+
self.add_action(actions.QuickLookup())
44+
4145
self.add_action(actions.GetTagDetails())
42-
46+
4347
self.add_action(actions.GnqlQuery())
44-
45-
self.add_action(actions.QuickLookup())
46-
47-
self.add_action(actions.RiotLookup())
48-
48+
49+
self.add_action(actions.CommunityLookup())
50+
51+
self.add_action(actions.VulnerabilityLookup())
52+
53+
self.add_action(actions.TimelineLookup())
54+
55+
self.add_action(actions.SimilarLookup())
56+
4957

5058
"""Run plugin"""
5159
cli = insightconnect_plugin_runtime.CLI(ICONGreynoise())

0 commit comments

Comments
 (0)