-
Notifications
You must be signed in to change notification settings - Fork 385
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
Feature/mail incident status #921
Merged
dadokkio
merged 4 commits into
TheHive-Project:develop
from
mkcorpc:feature/MailIncidentStatus
Feb 3, 2021
Merged
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -0,0 +1,98 @@ | ||
{ | ||
"name": "MailIncidentStatus", | ||
"version": "1.0", | ||
"author": "Manuel Krucker", | ||
"url": "https://github.com/TheHive-Project/Cortex-Analyzers", | ||
"license": "AGPL-V3", | ||
"description": "Mail a detailed status information of an incident case. The mail is sent to recipients specified by tags prefixed with 'mail='. The responder respects tlp definitions. For tlp:amber mail addresse and for tlp:green mail domains must be pre-defined in the configuration. For tlp:red sending mails is denied. The responser also uses thehive4py to collect information about the status of the tasks of the incidents.", | ||
"dataTypeList": ["thehive:case"], | ||
"command": "MailIncidentStatus/mailincidentstatus.py", | ||
"baseConfig": "MailIncidentStatus", | ||
"configurationItems": [ | ||
{ | ||
"name": "from", | ||
"description": "email address from which the mail is send", | ||
"type": "string", | ||
"multi": false, | ||
"required": true | ||
}, | ||
{ | ||
"name": "smtp_host", | ||
"description": "SMTP server used to send mail", | ||
"type": "string", | ||
"multi": false, | ||
"required": true, | ||
"defaultValue": "localhost" | ||
}, | ||
{ | ||
"name": "smtp_port", | ||
"description": "SMTP server port", | ||
"type": "number", | ||
"multi": false, | ||
"required": true, | ||
"defaultValue": 25 | ||
}, | ||
{ | ||
"name": "smtp_user", | ||
"description": "SMTP server user", | ||
"type": "string", | ||
"multi": false, | ||
"required": false, | ||
"defaultValue": "user" | ||
}, | ||
{ | ||
"name": "smtp_pwd", | ||
"description": "SMTP server password", | ||
"type": "string", | ||
"multi": false, | ||
"required": false, | ||
"defaultValue": "pwd" | ||
}, | ||
{ | ||
"name": "mail_subject_prefix", | ||
"description": "Prefix of the mail subject", | ||
"type": "string", | ||
"multi": false, | ||
"required": false, | ||
"defaultValue": "Incident Case Notification: " | ||
}, | ||
{ | ||
"name": "mail_html_style_tag_content", | ||
"description": "The css content of the style tag for the HTML mail body. Define table, th, hd, .first, and .second elements.", | ||
"type": "string", | ||
"multi": false, | ||
"required": false, | ||
"defaultValue": "table { border: 1px solid black; border-collapse: collapse; text-align: left; vertical-align: top; th { border: 1px solid black; border-collapse: collapse; text-align: left;} td { border: 1px solid black; border-collapse: collapse; text-align: left;} .first { width: 150px; min-width: 150px; max-width: 150px; background-color: #ffe8d4; } .second { background-color: #d7d9f2;}" | ||
}, | ||
{ | ||
"name": "tlp_amber_mail_addresses", | ||
"description": "Mail addresses which are allowed to receive tlp:amber classified incidents", | ||
"type": "string", | ||
"multi": true, | ||
"required": false, | ||
"defaultValue": "Incident Case Notification: " | ||
}, | ||
{ | ||
"name": "tlp_green_mail_domains", | ||
"description": "Mail domains which are allowed to receive tlp:green classified incidents", | ||
"type": "string", | ||
"multi": true, | ||
"required": false, | ||
"defaultValue": "Incident Case Notification: " | ||
}, | ||
{ | ||
"name": "thehive_url", | ||
"description": "URL pointing to your TheHive installation, e.g. 'http://127.0.0.1:9000'", | ||
"type": "string", | ||
"multi": false, | ||
"required": true | ||
}, | ||
{ | ||
"name": "thehive_apikey", | ||
"description": "TheHive API key which is used get tasks and other elements of the incident", | ||
"type": "string", | ||
"multi": false, | ||
"required": true | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should be ["Incident Case Notification: "] or better ["[email protected]"]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No fully correct. It should be a comma separated string, e.g. "[email protected]" or "[email protected],[email protected]".
Sorry it is my first pull request. Do I need to resolve the conversation right now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have reviewer status so it's just a comment
I tried your plugin on thehive4 and it displays a list of separate character instead of a string
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont know what your a meaning with 'separate characters'. Do you speak about an configuration option?
The following mail is sent by the plugin:

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it looks like this from the settings page
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm ntcong error and suggestion.

First line is with his fix
"defaultValue": ["Incident Case Notification:"]
second whith standard code "
defaultValue": "Incident Case Notification: "
but probably is easier to just remove defaultValue since is not so useful.