Skip to content

Devo_v2 initial version with enhanced functionality - #5233

Merged
yaakovi merged 8 commits into
contrib/devods_devo-v2from
unknown repository
Jan 22, 2020
Merged

Devo_v2 initial version with enhanced functionality#5233
yaakovi merged 8 commits into
contrib/devods_devo-v2from
unknown repository

Conversation

@ansfan

@ansfan ansfan commented Dec 23, 2019

Copy link
Copy Markdown
Contributor

Features now include fetching alerts, running multi-table queries, writing back to Devo tables. Please refer to README.md for all features. Refer to previous PR in related issues as

Status

Ready

Related Issues

#4419

Description

A new and updated Devo_v2 integration with enhanced functionality. Uses our new APIs and offers automated incident creation of alerts generated in Devo.

Screenshots

image
image

Required version of Demisto

5.0.0+

Does it break backward compatibility?

  • No

Must have

  • Tests
  • Documentation (with link to it)
  • Code Review

Dependencies

Mention the dependencies of the entity you changed as given from the precommit hooks in checkboxes, and tick after tested them.

Additional changes

Completely new integration

Technical writer review

Mention and link to the files that require a technical writer review.

…lude fetching alerts, running multi-table queries, writing back to Devo tables. Please refer to README.md for all features.
@lgtm-com

lgtm-com Bot commented Dec 23, 2019

Copy link
Copy Markdown

This pull request introduces 2 alerts when merging 54b778e into 8973733 - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@content-bot content-bot added the Contribution Thank you! Contributions are always welcome! label Dec 23, 2019
@content-bot
content-bot changed the base branch from master to contrib/devods_devo-v2 December 23, 2019 01:10
@content-bot

Copy link
Copy Markdown
Contributor

Thank you for your contribution. Your generosity and caring are unrivaled! Rest assured - our content wizard @yaakovi will very shortly look over your proposed changes.

@content-bot

Copy link
Copy Markdown
Contributor

The CircleCI check from your latest pushed commit was unsuccessful. @ansfan take a look at the build by clicking this link.


Failed Build Steps

  • Verify Base Branch for Contribution

Try and address the listed CircleCI build step failures at your earliest convenience. This will greatly expedite the process of getting your proposed changes merged into master. Happy coding and may the force be with you.

@yaakovi yaakovi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we schedule a short session for demo?
please contact me on Slack in "Demisto DFIR"

Comment thread Integrations/Devo_v2/Devo_v2.yml Outdated
Comment thread Integrations/Devo_v2/Devo_v2.yml Outdated
Comment thread Integrations/Devo_v2/Devo_v2.yml Outdated
Comment on lines +68 to +74
- name: from
required: true
description: Start datetime for specified query. Unix timestamp in seconds expected
(Decimal milliseconds okay)
- name: to
description: End datetime for specified query. Unix timestamp in seconds expected
(Decimal milliseconds okay)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should also support time frame: "X days", "X hours", etc...
in many cases the user would like to query the SIEM for event from the last hours/days.
once you add this option, you can use parse_date_range to convert that format to a datetime object/timestamp.
for more information about the function, see the ScriptHelper or CommonServerPython

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines +79 to +81
- contextPath: Devo.QueryResults
description: List of dictionary of results
type: unknown

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does the returned object has a constant structure? if so, declare the specific keys as outputs

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The structure will be wholly dependent on the query that the user gives and the tables that they are querying.

Comment thread Integrations/Devo_v2/Devo_v2.yml Outdated
Comment thread Integrations/Devo_v2/Devo_v2.yml Outdated
Comment thread Integrations/Devo_v2/Devo_v2.yml
- name: tableName
required: true
description: Table name to write to
- name: records

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is that a json object?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No tableName is just a string

Comment thread Integrations/Devo_v2/Devo_v2.py Outdated
Comment thread Integrations/Devo_v2/Devo_v2.py Outdated
@yaakovi

yaakovi commented Jan 7, 2020

Copy link
Copy Markdown
Contributor

additional points from the demo:

  • switch json parameter to "long text"
  • error handling for test button, add a proper error message:
    • invalid json for writer (if json.loads fails)
    • wrong credentials (couldn't login)
    • in case of fetch-incident, try using the given query

Devo_v2.yml:
    - Moved proxy to end of list
    - Changed the types of the JSON filters to long test.
Devo_v2.py:
    - Renamed check_credentials to check_configuration and supported more config value checks when using test
    - Added in get_time_range to support multiple datetime formats.
    - Added in functionality to ignore insecure connections if setting is toggled.
    - Wraped socket logic in try/finally block
    - Return actual contents that are written instead of length of written contents.
Devo_v2_description:
    - Additional integration configuration documentation along with expected values. Also links to Devo Docs.
README.md:
    - Additional information on newly supported date formats as well as enhanced documentation to Devo.
Devo_v2_test.py:
    - Fixed test for check_configuration.
    - Added in test for get_time_range.
@lgtm-com

lgtm-com Bot commented Jan 10, 2020

Copy link
Copy Markdown

This pull request introduces 2 alerts when merging 302ac28 into 8973733 - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@yaakovi yaakovi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work on the check_configuration function

Comment thread Integrations/Devo_v2/Devo_v2.yml Outdated
Comment on lines +54 to +55
- display: Allow insecure Devo endpoint connection
name: allow_insecure

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use our convention here:

- display: Trust any certificate (not secure)
  name: insecure

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

… true -> false and no default value so that insecure logic works correctly
@lgtm-com

lgtm-com Bot commented Jan 14, 2020

Copy link
Copy Markdown

This pull request introduces 2 alerts when merging f8edbd5 into 8973733 - view on LGTM.com

new alerts:

  • 2 for Unused local variable

@yaakovi

yaakovi commented Jan 15, 2020

Copy link
Copy Markdown
Contributor

hi @kirbles19 ,
please go over the PR files, it's a new integration.

@kirbles19

Copy link
Copy Markdown
Contributor

@yaakovi Done.

@yaakovi
yaakovi merged commit 08033f1 into demisto:contrib/devods_devo-v2 Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Contribution Thank you! Contributions are always welcome! docs-approved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants