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

Added ability to start Splunk queries as a job/async #300

Closed
wants to merge 657 commits into from

Conversation

d3vzer0
Copy link
Contributor

@d3vzer0 d3vzer0 commented Jan 26, 2022

The default 'oneshot' method is a blocking HTTP call which may often result in a timeout from various proxies. This change runs the query as a 'job' and polls the status until the job is completed (with a progress bar). The results are fetched after the while loop. The original oneshot query can still be used by specifying oneshot=True, ex. splunk_provider.Alerts.list_all_alerts(oneshot=True)

ianhelle and others added 30 commits September 22, 2021 10:01
Added check to nbinit.py to check and print status of Azure CLI login (if AzureCLI is installed)
Changed azure_ml_tools.py to print out the installed rather than required version of MSTICPy
Added unit test for check_cli_credentials in test_azure_auth_core.py
Updated version to 1.4.4
entity.py:
- removed edges from properties property - so comparisons don't take into account edge differences
- added edges to str/repr
- fixed possible None reference in description_str
- fixed mypy warnings in to_networkx
- renamed ent_camel to camelcase_property_names
Added shortname property to RegistryHive enum in entity_enums.py
Fixed missing closing parenthesis in repr of entity_graph Edge
Change .format to use f-string in network_connection.py
Updated name_str property to be more unique (added PID) in process.py
Updated description_str and name_str properties to be more unique in registry_key.py
Updated description_str and name_str properties to be more unique in registry_value.py
Removed redundant AdditionalProperties initializer in incident.py (this is done in Entity init)
Fixed detecting process with a parent in security_base.py (previously was based on comparison of entities, which does not work if the 2 entities have different edge sets.
entity_graph_tools.py:
- renamed _check_type_create to _add_incident_or_alert (more descriptive of what it does)
- reworking plot methods a little - adding timeline param to choose whether you want a timeline. Added kwargs passthrough of params to the plot_entitygraph function.
mp_pandas_plot.py:
- renamed inc_graph to incident_graph
- added kwargs and docstring info
test_security_alert.py - a bit of tidying
test_entity_graph.py:
- typos, sorted imports, fixed #nodes in test cases for new name_str entity properties
- fixed failing test_node_remove test case
- added test_df_plot function for mp_pandas_plot accessor.
…ormance on AML (microsoft#212)

* Implemented lazy loading of tabs to try to improve performance on AML

By default it only instantiates and loads the first tab - others are loaded on demand as tabs are clicked

* Added some UI labels to indicate that things are loading.

Making entities json-serializable (hitch-hiker on this PR)

* Needed to create a JSONEncoder class for entities to work with json.dumps

```python
json.dumps(entity, cls=entities.Entity.JSONEncoder)

* Updating version to 1.4.5
Move SOC entities to base datamodel folder
Remove un-needed code in azure_data and azure_sentinel
Updated tests
Removed mp_incident_graph accessors in favour of mp_plot ones
@ianhelle ianhelle linked an issue Feb 1, 2022 that may be closed by this pull request
@d3vzer0
Copy link
Contributor Author

d3vzer0 commented Feb 3, 2022

@petebryan Got most of the issues resolved, need one addition to fix the unit test :) I'll push the final version tomorrow

@petebryan
Copy link
Contributor

Due to an issue we had to reset the main branch so I've recreated your PR here #337

I've also added in elements to the unit tests to process async queries.

@petebryan petebryan closed this Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Additional queries for Splunk provider