Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gem security integration #2

Closed
wants to merge 63 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
ceac094
Initial commit of Gem integration
dorkauf Feb 18, 2024
aaa92db
Initial commit of Gem integration
dorkauf Feb 18, 2024
f4e10a7
wip
dorkauf Feb 22, 2024
4d2a5b5
wip
dorkauf Feb 22, 2024
104f780
Add incident fields
liormgem Feb 22, 2024
9299ce0
wip
dorkauf Feb 25, 2024
15f8b9e
wip
dorkauf Feb 26, 2024
1ed7cb7
Add webhook mapper
liormgem Feb 26, 2024
0360957
wip
dorkauf Feb 26, 2024
9590dc1
wip
dorkauf Feb 26, 2024
e5f24a6
wip
dorkauf Feb 26, 2024
581ef35
merge
liormgem Feb 26, 2024
abcb855
Add gem-list-threats
liormgem Feb 26, 2024
df3b3f8
Add gem-get-threat-details
liormgem Feb 26, 2024
13a19fe
Add gem-list-inventory-resources
liormgem Feb 26, 2024
d3557cd
Add gem-update-threat-status
liormgem Feb 26, 2024
31eae0b
Merge remote-tracking branch 'origin/gem_security_integration' into g…
liormgem Feb 26, 2024
00aacc3
Add pagination
liormgem Feb 28, 2024
4a49334
Add breakdown by ip and service
liormgem Feb 28, 2024
fb49e20
Add more commands and outputs
liormgem Feb 28, 2024
58f2c3b
Finish outputs
liormgem Feb 29, 2024
44274fd
Fix webhook mapper
liormgem Feb 29, 2024
04212e7
Add mappers
liormgem Feb 29, 2024
9362c90
Add post proccessing resolve script
liormgem Mar 3, 2024
6f32668
Docs
liormgem Mar 3, 2024
e90cbae
Add layout and doc fixs
liormgem Mar 4, 2024
b16a425
add run action
liormgem Mar 4, 2024
ac255a3
wip
dorkauf Mar 4, 2024
00593a2
wip
dorkauf Mar 4, 2024
15f5b6c
wip
dorkauf Mar 4, 2024
b08f64b
Add playbook
liormgem Mar 4, 2024
d54c6e6
read-only true
dorkauf Mar 4, 2024
58c482c
Fix script
liormgem Mar 4, 2024
11223db
Fix script
liormgem Mar 5, 2024
ab7f58f
Fetch incidents
liormgem Mar 6, 2024
ae38787
Add alert merger
liormgem Mar 7, 2024
cffa48b
Fix severity
liormgem Mar 7, 2024
4b748db
Update spec stuff
liormgem Mar 10, 2024
ed56edb
Update status update
liormgem Mar 11, 2024
ca7dc99
Added tests for list commands
liormgem Mar 12, 2024
d34e86e
Change Gem Verdict default
liormgem Mar 12, 2024
bac95f6
Add gem threat url
liormgem Mar 12, 2024
96b7c9b
format and first playbook
liormgem Mar 13, 2024
a23d2e9
Add timeline comment command and playbook
liormgem Mar 13, 2024
bdf9e4f
Add get alert details and validating playbook
liormgem Mar 14, 2024
a5dceff
Add slack user input
liormgem Mar 14, 2024
af5fff0
Finish slack refactoring
liormgem Mar 14, 2024
daa4e10
Gem handle root usage alert playbook
liormgem Mar 14, 2024
ece85d0
Add function docs
liormgem Mar 14, 2024
3c148c1
Add 3 tests
liormgem Mar 14, 2024
16c5280
generated readme
liormgem Mar 14, 2024
d68d214
formatting
liormgem Mar 17, 2024
04f2f2f
formatting
liormgem Mar 17, 2024
7267ebe
Fix docs
liormgem Mar 17, 2024
d7f6726
Playbooks pics~
liormgem Mar 17, 2024
50bfc99
Fix mypy error
liormgem Mar 17, 2024
21917e9
Add deps
liormgem Mar 17, 2024
d065bed
Fix layout validation
liormgem Mar 17, 2024
545937a
Fix stuff and add test
liormgem Mar 18, 2024
2e16f77
Fix comment
liormgem Mar 19, 2024
30394af
Fix docs
liormgem Mar 19, 2024
8a8d22e
Fix
liormgem Mar 19, 2024
35d610b
Fix CR
liormgem Mar 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file added Packs/Gem/.pack-ignore
Empty file.
Empty file added Packs/Gem/.secrets-ignore
Empty file.
Binary file added Packs/Gem/Author_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions Packs/Gem/Classifiers/classifier-GemAlert.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"id": "Gem Classifier",
"name": "Gem Classifier",
"type": "classification",
"defaultIncidentType": "Gem Alert",
"description": "Classifies Gem Alerts.",
"fromVersion": "6.10.0",
"keyTypeMap": {},
"transformer": {
"complex": null,
"simple": ""
},
"version": -1,
"feed": false,
"propagationLabels": [
"all"
]
}
123 changes: 123 additions & 0 deletions Packs/Gem/Classifiers/classifier-mapper-incoming-Gem-webhook.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"feed": false,
"fromVersion": "6.10.0",
"mapping": {
"Gem Alert": {
"dontMapEventToLabels": false,
"internalMapping": {
"Gem Account ID": {
"simple": "account.name"
},
"Gem Account Name": {
"simple": "account.display_name"
},
"Gem Account Provider": {
"simple": "account.cloud_provider"
},
"Gem Alert ID": {
"simple": "event.alert_id"
},
"Gem Alert Source": {
"simple": "event.alert_source"
},
"occurred": {
"simple": "event_datetime"
},
"Description": {
"simple": "description"
},
"Gem Events Count": {
"simple": "event.events_total_count"
},
"Gem Url": {
"complex": {
"accessor": "threat_id",
"filters": [],
"root": "event",
"transformers": [
{
"args": {
"prefix": {
"isContext": false,
"value": {
"simple": "https://app.gem.security/threats/"
}
},
"suffix": {
"isContext": false
}
},
"operator": "concat"
}
]
}
},
"Gem Main Entity ID": {
"simple": "event.main_entity.id"
},
"Gem Main Entity Name": {
"simple": "event.main_entity.name"
},
"Gem Main Entity Region": {
"simple": "event.main_entity.metadata.region"
},
"Gem Main Entity Type": {
"simple": "event.main_entity.type"
},
"Gem Threat ID": {
"simple": "event.threat_id"
},
"Gem Title": {
"simple": "title"
},
"Gem TTP ID": {
"simple": "event.ttp_id"
},
"name": {
"simple": "title"
},
"severity": {
"complex": {
"filters": [],
"root": "severity",
"transformers": [
{
"args": {
"input_values": {
"isContext": false,
"value": {
"simple": "1,2,3,4,5,6,7,8,9,10"
}
},
"mapped_values": {
"isContext": false,
"value": {
"simple": "1,1,1,2,2,2,2,3,3,3"
}
}
},
"operator": "MapValuesTransformer"
}
]
}
},
"Gem Severity": {
"simple": "severity"
}
}
},
"dbot_classification_incident_type_all": {
"dontMapEventToLabels": false,
"internalMapping": {
"occurred": {
"simple": "event_datetime"
}
}
}
},
"id": "Gem Mapper Webhook",
"name": "Gem Mapper Webhook",
"type": "mapping-incoming",
"description": "Maps incoming Gem Alert fields when received via webhook.",
"version": -1
}
123 changes: 123 additions & 0 deletions Packs/Gem/Classifiers/classifier-mapper-incoming-Gem.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
{
"id": "Gem Mapper",
"name": "Gem Mapper",
"type": "mapping-incoming",
"description": "Maps incoming Gem Alert fields.",
"fromVersion": "6.10.0",
"defaultIncidentType": "Gem Alert",
"mapping": {
"Gem Alert": {
"dontMapEventToLabels": false,
"internalMapping": {
"Description": {
"simple": "description"
},
"Gem Account ID": {
"simple": "account.name"
},
"Gem Account Name": {
"simple": "account.display_name"
},
"Gem Account Provider": {
"simple": "account.cloud_provider"
},
"Gem Alert ID": {
"simple": "metadata.alert_id"
},
"Gem Alert Source": {
"simple": "metadata.alert_source"
},
"Gem Events Count": {
"simple": "metadata.events_total_count"
},
"Gem Main Entity ID": {
"simple": "metadata.main_entity.id"
},
"Gem Main Entity Name": {
"simple": "metadata.main_entity.name"
},
"Gem Main Entity Region": {
"simple": "metadata.main_entity.metadata.region"
},
"Gem Main Entity Type": {
"simple": "metadata.main_entity.type"
},
"Gem Severity": {
"simple": "severity"
},
"Gem TTP ID": {
"simple": "metadata.ttp_id"
},
"Gem Threat ID": {
"simple": "metadata.threat_id"
},
"Gem Title": {
"simple": "title"
},
"Gem Url": {
"complex": {
"accessor": "threat_id",
"filters": [],
"root": "metadata",
"transformers": [
{
"args": {
"prefix": {
"isContext": false,
"value": {
"simple": "https://app.gem.security/threats/"
}
},
"suffix": {
"isContext": false
}
},
"operator": "concat"
}
]
}
},
"name": {
"simple": "title"
},
"occurred": {
"simple": "event_datetime"
},
"severity": {
"complex": {
"filters": [],
"root": "severity",
"transformers": [
{
"args": {
"input_values": {
"isContext": false,
"value": {
"simple": "1,2,3,4,5,6,7,8,9,10"
}
},
"mapped_values": {
"isContext": false,
"value": {
"simple": "1,1,1,2,2,2,2,3,3,3"
}
}
},
"operator": "MapValuesTransformer"
}
]
}
}
}
},
"dbot_classification_incident_type_all": {
"dontMapEventToLabels": false,
"internalMapping": {
"occurred": {
"simple": "event_datetime"
}
}
}
},
"version": -1
}
30 changes: 30 additions & 0 deletions Packs/Gem/IncidentFields/incidentfield-Gem_Account_ID.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"associatedToAll": false,
"associatedTypes": [
"Gem Alert"
],
"caseInsensitive": true,
"cliName": "gemaccountid",
"closeForm": true,
"content": true,
"editForm": true,
"group": 0,
"hidden": false,
"id": "incident_gemaccountid",
"isReadOnly": true,
"locked": false,
"name": "Gem Account ID",
"neverSetAsRequired": false,
"openEnded": false,
"ownerOnly": false,
"required": false,
"sla": 0,
"system": false,
"threshold": 72,
"type": "shortText",
"unmapped": false,
"unsearchable": false,
"useAsKpi": false,
"version": -1,
"fromVersion": "6.10.0"
}
30 changes: 30 additions & 0 deletions Packs/Gem/IncidentFields/incidentfield-Gem_Account_Name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"associatedToAll": false,
"associatedTypes": [
"Gem Alert"
],
"caseInsensitive": true,
"cliName": "gemaccountname",
"closeForm": true,
"content": true,
"editForm": true,
"group": 0,
"hidden": false,
"id": "incident_gemaccountname",
"isReadOnly": true,
"locked": false,
"name": "Gem Account Name",
"neverSetAsRequired": false,
"openEnded": false,
"ownerOnly": false,
"required": false,
"sla": 0,
"system": false,
"threshold": 72,
"type": "shortText",
"unmapped": false,
"unsearchable": false,
"useAsKpi": false,
"version": -1,
"fromVersion": "6.10.0"
}
30 changes: 30 additions & 0 deletions Packs/Gem/IncidentFields/incidentfield-Gem_Account_Provider.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"associatedToAll": false,
"associatedTypes": [
"Gem Alert"
],
"caseInsensitive": true,
"cliName": "gemaccountprovider",
"closeForm": true,
"content": true,
"editForm": true,
"group": 0,
"hidden": false,
"id": "incident_gemaccountprovider",
"isReadOnly": true,
"locked": false,
"name": "Gem Account Provider",
"neverSetAsRequired": false,
"openEnded": false,
"ownerOnly": false,
"required": false,
"sla": 0,
"system": false,
"threshold": 72,
"type": "shortText",
"unmapped": false,
"unsearchable": false,
"useAsKpi": false,
"version": -1,
"fromVersion": "6.10.0"
}
30 changes: 30 additions & 0 deletions Packs/Gem/IncidentFields/incidentfield-Gem_Alert_ID.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"associatedToAll": false,
"associatedTypes": [
"Gem Alert"
],
"caseInsensitive": true,
"cliName": "gemalertid",
"closeForm": true,
"content": true,
"editForm": true,
"group": 0,
"hidden": false,
"id": "incident_gemalertid",
"isReadOnly": true,
"locked": false,
"name": "Gem Alert ID",
"neverSetAsRequired": false,
"openEnded": false,
"ownerOnly": false,
"required": false,
"sla": 0,
"system": false,
"threshold": 72,
"type": "shortText",
"unmapped": false,
"unsearchable": false,
"useAsKpi": false,
"version": -1,
"fromVersion": "6.10.0"
}
Loading
Loading