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

updates to latest #2

Merged
merged 26 commits into from
Jul 27, 2023
Merged

updates to latest #2

merged 26 commits into from
Jul 27, 2023

Commits on Apr 21, 2023

  1. Bump httpx from 0.23.3 to 0.24.0 (#655)

    Bumps [httpx](https://github.com/encode/httpx) from 0.23.3 to 0.24.0.
    - [Release notes](https://github.com/encode/httpx/releases)
    - [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md)
    - [Commits](encode/httpx@0.23.3...0.24.0)
    
    ---
    updated-dependencies:
    - dependency-name: httpx
      dependency-type: direct:production
      update-type: version-update:semver-minor
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
    dependabot[bot] and ianhelle authored Apr 21, 2023
    Configuration menu
    Copy the full SHA
    c0fad01 View commit details
    Browse the repository at this point in the history

Commits on May 10, 2023

  1. Sentinel and Kusto new providers (#656)

    * Initial code for az_monitor_driver.py
    
    Added provider_settings.py for global proxy config
    Add settings.py as a facade module for common setttings functions
    Added lazy_import function and generic functions for implementing dynamic __getattr__ and __dir__ functions for __init__ modules
    Added ability to create (partial) WorkspaceConfig from connection string.
    Moved MpConfigEdit and MpConfigFile to dynamic imports in config/__init__.py
    Changed MSSentinel import in ce_azure_sentinel.py to be imported on demand
    Extended _execute_query to extract and supply timespan parameters to driver query functions
    Removed deprecated imports or nbtools and sectools from nbinit.py
    Importing get_config to msticpy/__init__.py
    
    * Removing use of multiple workspace IDs from az_monitor_driver
    
    * Adding workaround protection for process tree NA values for Bokeh 3.0
    
    Moving bokeh 3.0 requirements back to 2.4.3 for compat with panel.
    
    * Initial code for azure_monitor_driver
    
    * Refactoring methods from QueryProvider into mixin classes
    
    * Azure kusto driver based on azure-data-kusto
    
    * Azure Kusto driver and Azure monitor updates:
    
    - Adding to DataEnvironments and drivers/__init__.py
    Adding raw Kusto response test data
    
    * Finished unit tests for test_azure_monitor_driver.py / azure_monitor_driver.py
    
    Implemented driver properties dictionary and use of DriverProps class to normalize naming in multiple drivers.
    Added code to allow driver to override environment name for reading queries.
    
    * Added documentation and fixed unit tests.
    
    Updated config documentation
    Fixed keyring_client.py test for valid backend
    Merged several global settings (proxies, http timeout) into "msticpy" section of config
    Added settings editor support for msticpy global settings in ce_msticpy.py
    Some Mypy fixes in file_browser.py
    Removed some commented-out code from query_source.py
    Added filtering for queries to query_source.py and data_providers.py - this allows individual kusto providers
    to show only queries that are relevant for the connected cluster. Additional test files and unit tests to support this.
    Added consistent support for proxy settings and timeout in azure_kusto_driver.py and azure_monitor_driver.py
    Updated setup.py, requirements-all.txt and conda-reqs.txt to add azure-kusto-data and azure-monitor-query packages.
    Added alternative to custom_mp_config test utility. This patches get_config calls in specified modules - more complex to set up but does not rely on a lock file, so allows more unit tests to run in parallel.
    
    * Fix for sentinel and azurekusto test failures
    
    * Fixing test and lint failures
    
    * Fixing settings source for test_sentinel_core.py
    
    Change folder name for test_azure_monitor_driver.py (not sure why but seems to have an effect on linux)
    
    * isort fixes in polling_detection.py
    
    pylint check name change in azure_auth_core.py
    adding validate_config to settings.py
    added ability to get workspace using case-insensitive ws name, ID or key name in wsconfig.py
    removed some debugging lines from sentinel_utils.py
    suppressed pylint error in data_providers.py
    fixed field initializer in query_template.py
    adding more logging to azure_monitor_driver.py
    adding more logging to azure_kusto_driver.py
    removing matplotlib import in nbinit, simplifying config loading code if config is already loaded.
    Moving matplotlib to extra in requirements.txt, setup.py
    Black re-format of test_periodogram_polling_detector.py
    Added tests for WorkspaceConfig to test_wsconfig.py
    Fixed test_azure_monitor_driver.py to use consistent settings.
    Fixed test_nbinit.py to avoid using default loaded settings.
    
    * Fix for 0.14.0 of statsmodels
    ianhelle authored May 10, 2023
    Configuration menu
    Copy the full SHA
    b248797 View commit details
    Browse the repository at this point in the history
  2. Fix a critical bug of Splunk results reader, lack of pagination (#657)

    * fix a critical bug of splunk result reader
    
    * typo pagenate -> paginate
    
    * Refactored code and reformatted long lines.
    
    Updated failing tests for new code.
    
    ---------
    
    Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
    Tatsuya-hasegawa and ianhelle authored May 10, 2023
    Configuration menu
    Copy the full SHA
    62cfaa5 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2023

  1. Update azure_kusto_driver.py (#664)

    Ensure that the driver is loaded so that queries can be executed.
    FlorianBracq authored May 12, 2023
    Configuration menu
    Copy the full SHA
    eb08fdb View commit details
    Browse the repository at this point in the history

Commits on May 16, 2023

  1. Fix RTD Search - update conf.py

    Add sphinx jquery extension
    ianhelle authored May 16, 2023
    Configuration menu
    Copy the full SHA
    dec94ec View commit details
    Browse the repository at this point in the history
  2. Update requirements.txt

    Add sphinxcontrib-jquery to RTD requirements
    ianhelle authored May 16, 2023
    Configuration menu
    Copy the full SHA
    0625d3e View commit details
    Browse the repository at this point in the history
  3. Update conf.py

    Fixing typo in RTD conf.py
    ianhelle authored May 16, 2023
    Configuration menu
    Copy the full SHA
    91251b8 View commit details
    Browse the repository at this point in the history

Commits on May 19, 2023

  1. Ianhelle/mp extensibility 2023 02 09 (#632)

    * second stage adding extension
    
    Co-authored-by: Ian Hellen <Ian.Hellen@microsoft.com>
    
    * Working plugin code with tests.
    
    Still needs documentation
    
    * Fixing some mypy typing annotation errors
    
    * - Added documentation for PluginFramework
    
    - Added new document on createing TI providers - WritingTIAndContextProviders
    - Added docs for Development section in RTD
    - Adding ExtendingMsticpy section to RTD
      - moved sections for Queries, PivotFunctions, Creating data providers to this section
    - Have changed the internal _REQUIRED_PARAMS to use the same strings as in config and other places:
      - bulk edit of this http_provider, servicenow, alienvault_otx, greynoise, ibm_xforce, open_page_rank, virustotal
    Added ImportException trapping for mp_plugins.py
    Removing dev notebook - MSTICPyExtensions.ipynb
    
    * Moving some updates from Main into new extending/Queries.rst document
    
    * A couple of additions to docs - clarity and grammar
    
    * Test break due to merge
    
    * Addressing comments from Florian and Ryan's reviews.
    
    * Fixing issue with unit_test_lib not properly isolating temporary settings changes
    
    * Fixing bug in mp_plugins handling plugin paths
    
    * Adding locking around pivot data providers loader to fix config file for pivot tests.
    
    Changing test_nbinit.py to avoid using config locking and just use monkeypatch.setenv
    
    * Cleaned up ambiguity between DataEnvironment and environment_name in data_providers.py
    
    Removing unneeded comments in test_nbinit.py
    
    * Fixed error referencing "driver" variable in data_providers.py
    
    * Adding enviroment property for backward compatibility
    
    ---------
    
    Co-authored-by: Ian Hellen <Ian.Hellen@microsoft.com>
    ianhelle and Ian Hellen authored May 19, 2023
    Configuration menu
    Copy the full SHA
    cb59747 View commit details
    Browse the repository at this point in the history
  2. Format of cluster name has changed in new KustoClient. Fixing test ca…

    …ses to allow for old and new format. (#667)
    
    Build-breaking in test cases - no change to production code.
    ianhelle authored May 19, 2023
    Configuration menu
    Copy the full SHA
    bbfbc98 View commit details
    Browse the repository at this point in the history

Commits on May 22, 2023

  1. Write Sentinel queries to YAML for Github Browser (#491)

    * add code to write yaml files
    
    * PR comment changes
    
    * replace requests with httpx
    
    * remove separate download
    
    * add docs and parameter types
    
    * remove unnecessary comment
    
    * add tests and headers
    
    * Remove old code file
    
    * rename files
    
    * remove unused imports
    
    * black reformatting
    
    * isort imports
    
    * pylint adjustments
    
    * update yaml loader for bandit checks
    
    * try with no prospector in requirements-dev.txt
    
    * test changes
    
    * fix pytest errors
    
    * test github pytest print
    
    * test pytest again
    
    * test pytest with file path changes
    
    * test if directories are being listed out in pytest
    
    * see what files are in the github runner
    
    * check directory contents again
    
    * list data available in testdata
    
    * see contents of test data folder
    
    * fix typo
    
    * try different base_dir_test_folder
    
    * check yaml_files
    
    * test _import_sentinel_query output
    
    * change split for _import_sentinel_query
    
    * test import_sentinel_query
    
    * see yaml file order
    
    * check sample query in list instead of equal
    
    * fix typo
    
    * sort lists for equivalence in organize test
    
    * try sort again
    
    * test with no datetime.now() in metadata
    
    * fix value unpacking error
    
    * switch set to list to fix issue
    
    * test getting_test_data
    
    * pylint fixes
    
    * check disabling certain pylint errors
    
    * try pylint again
    
    * fix mypy
    
    * additional linting fixes
    
    * fix flake8 trailing whitespace
    
    * add author and version
    
    * requested changes
    
    * fix linting issues
    
    * fix typerror
    
    * fix linting pt 3
    
    * test mypy
    
    * test mypy pt 2
    
    * try mypy pt 4
    
    * mypy fix
    
    ---------
    
    Co-authored-by: Jannie Li <jannieli@microsoft.com>
    Co-authored-by: Pete Bryan <peter.bryan@microsoft.com>
    Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
    4 people authored May 22, 2023
    Configuration menu
    Copy the full SHA
    9c9936e View commit details
    Browse the repository at this point in the history

Commits on May 26, 2023

  1. Update _version.py to 2.5.0

    ianhelle authored May 26, 2023
    Configuration menu
    Copy the full SHA
    1f87529 View commit details
    Browse the repository at this point in the history

Commits on Jun 2, 2023

  1. Hotfix for v2.5.1 (#672)

    Add more defense against import errors - in msticpy.__init__.py - this causes failures when help(msticpy) is used, causing loading of all dynamic attributes
    Better exception message on import error in azure_data.py
    Moving ResourceGraph query provider to only instantiate the provider when needed.
    Made data_query_reader.py produce warnings rather throw exceptions when encountering a bad query file
    ianhelle authored Jun 2, 2023
    Configuration menu
    Copy the full SHA
    9466a77 View commit details
    Browse the repository at this point in the history

Commits on Jun 13, 2023

  1. Ianhelle/hotfix 2.5.2 2023 06 08 (#676)

    * Changed Bokeh requirements to work with panel 1.x
    
    Moved code from nbinit that checked CLI credentials to be run only in AML - avoiding non-core import.
    
    * Adding back MicrosoftSentinel as mp attribute
    
    Making the attribute failure more robust/informative.
    
    * Adding documentation URL to ignored links
    "https://username:password@proxy_host:port" appears in docstrings
    and documentation and is being checked for URL validity.
    
    * Checked in test version of readthedocs conf.py by mistake - reverting
    ianhelle authored Jun 13, 2023
    Configuration menu
    Copy the full SHA
    f4e2cb0 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2023

  1. Azure monitor endpoint URL has changed format in v1.2.0 (#677)

    * Azure monitor endpoint URL has changed format in v1.2.0
    
    Unfortunately, older versions break with new format - so need a version-specific code branch.
    
    * Bug for missing attribute in kusto_driver - due to code change in kql_driver.py.
    
    Added documentation of need for additional packages to DataProv-Kusto-New.rst and DataProv-MSSentinel-New.rst
    
    * Changing ipwidgets requirement to <9.0.0
    
    * Update DataProv-Kusto-New.rst
    
    Fixing name of `azure-kusto-data`
    ianhelle authored Jun 21, 2023
    Configuration menu
    Copy the full SHA
    ab444ca View commit details
    Browse the repository at this point in the history

Commits on Jun 22, 2023

  1. Update _version.py

    Updating version to 2.5.3
    ianhelle authored Jun 22, 2023
    Configuration menu
    Copy the full SHA
    55c6c1a View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2023

  1. Update python-publish.yml

    ianhelle authored Jun 24, 2023
    Configuration menu
    Copy the full SHA
    9316568 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2023

  1. Ianhelle/velociraptor provider 2023 05 19 (#668)

    * Adding Velociraptor provider for local logs
    
    * Format of cluster name has changed in new KustoClient. Fixing test cases to allow for old and new format.
    
    * Minor updates for DataProv-Velociraptor.rst
    
    * Fixing comments in PR.
    
    Fixed bug in azure_kusto_driver and test_azure_kusto_driver
    Fixed some doc references.
    
    * Adding acknowledgement of Blue Team Village data
    ianhelle authored Jul 3, 2023
    Configuration menu
    Copy the full SHA
    2908083 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9c53daf View commit details
    Browse the repository at this point in the history

Commits on Jul 5, 2023

  1. Added multithreading support for additional connections (+fixes) (#645)

    * Multithreading support when using multiple connections
    
    * Renamed additional connection column in results df
    
    * Fix flake warning
    
    * Adding threaded execution for both multiple instances and split queries for drivers that support multi-threading in query_provider_connections_mixin.py
    
    Added unit tests for threading code in test_async_queries.py
    Added driver properties to azure_kusto_driver.py, azure_monitor_driver.py and odata.py (mdatp_driver and security_graph_driver)
    Fixed test in test_azure_kusto_driver.py
    Some doc fixes to docstring in DataProv-Kusto-New.rst, DataProv-MSSentinel-New.rst, DataProviders.rst
    Unrelated doc fixes in polling_detection.py, Installing.rst, SentinelIncidents.rst
    
    * Fixing issue with unit_test_lib not properly isolating temporary settings changes
    
    * Adding locking around pivot data providers loader to fix config file for pivot tests.
    
    Changing test_nbinit.py to avoid using config locking and just use monkeypatch.setenv
    
    * Fixing some bugs in multi-threaded code - ensuring that loop is available if nested threading is happening.
    
    Converting pd.Timestamps to datetimes to allow serialization in Azure-azure_monitor_driver (in AZmon SDK)
    Fixing some logger info outputs in nbinit.py - that normally have no output.
    
    * Fxing handling of datetime/pd.Timestamp in query_provider_connections_mixin.
    
    Add more logging to data_providers.QueryProvider and azure_monitor_driver.py
    
    * Typo in data_providers (self.logger instead of logger)
    
    * Typo calling logger.info in data_providers.py
    
    Format of cluster name has changed in new KustoClient. Fixing test cases to allow for old and new format.
    
    * Cleaned up and refactored code in query_provider_connections_mixin.py
    
    * Typo in type annotation in query_provider_connections_mixin
    
    Reverted change to pop start and end parameters
    Fixed failing test in test_dataqueries.py::test_split_query_err
    
    * Removing redundant line in mdatp_driver
    
    * Bug in commit from merge - missing self._connection_str attribute in azure_kusto_driver.py
    
    ---------
    
    Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
    d3vzer0 and ianhelle authored Jul 5, 2023
    Configuration menu
    Copy the full SHA
    7504862 View commit details
    Browse the repository at this point in the history
  2. Bump readthedocs-sphinx-ext from 2.2.0 to 2.2.2 (#679)

    Bumps [readthedocs-sphinx-ext](https://github.com/readthedocs/readthedocs-sphinx-ext) from 2.2.0 to 2.2.2.
    - [Commits](readthedocs/readthedocs-sphinx-ext@2.2.0...2.2.2)
    
    ---
    updated-dependencies:
    - dependency-name: readthedocs-sphinx-ext
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
    dependabot[bot] and ianhelle authored Jul 5, 2023
    Configuration menu
    Copy the full SHA
    7dbc9a4 View commit details
    Browse the repository at this point in the history
  3. Bump sphinx-rtd-theme from 1.2.0 to 1.2.2 (#675)

    Bumps [sphinx-rtd-theme](https://github.com/readthedocs/sphinx_rtd_theme) from 1.2.0 to 1.2.2.
    - [Changelog](https://github.com/readthedocs/sphinx_rtd_theme/blob/master/docs/changelog.rst)
    - [Commits](readthedocs/sphinx_rtd_theme@1.2.0...1.2.2)
    
    ---
    updated-dependencies:
    - dependency-name: sphinx-rtd-theme
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
    dependabot[bot] and ianhelle authored Jul 5, 2023
    Configuration menu
    Copy the full SHA
    a00ab8f View commit details
    Browse the repository at this point in the history

Commits on Jul 6, 2023

  1. Bump httpx from 0.24.0 to 0.24.1 (#666)

    Bumps [httpx](https://github.com/encode/httpx) from 0.24.0 to 0.24.1.
    - [Release notes](https://github.com/encode/httpx/releases)
    - [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md)
    - [Commits](encode/httpx@0.24.0...0.24.1)
    
    ---
    updated-dependencies:
    - dependency-name: httpx
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
    dependabot[bot] and ianhelle authored Jul 6, 2023
    Configuration menu
    Copy the full SHA
    56560b4 View commit details
    Browse the repository at this point in the history
  2. Ianhelle/fix func query names 2023 06 30 (#680)

    * Changes to doc strings and queries to improve descriptions of pivot functions and queries.
    
    Renamed m365 query files
    Some corrections to kql_mdatp_file.yaml and kql_m365_file.yaml to reference DeviceFileEvents instead of DeviceProcessEvents
    
    * Missing column from query in kql_mdatp_file.yaml
    
    * Bunch of minor typo/URL link fixes in documents
    
    * Some missing doc files from module generation
    ianhelle authored Jul 6, 2023
    Configuration menu
    Copy the full SHA
    555b58a View commit details
    Browse the repository at this point in the history

Commits on Jul 25, 2023

  1. Update _version.py to 2.6.0

    ianhelle authored Jul 25, 2023
    Configuration menu
    Copy the full SHA
    a8a2de4 View commit details
    Browse the repository at this point in the history
  2. Add CrowdSec TIProvider (#673)

    * Add CrowdSec TIProvider
    
    Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
    
    * Add user agent for crowdsec tiprovider
    
    Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
    
    * Implement review suggestions
    
    Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
    
    * Fix import error in tests
    
    Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
    
    * Extraneous braces in test data in test, unneeded ioc_param item in test data for CrowdSec
    
    Added CrowdSec settings entry to test msticpyconfig.yaml and msticpyconfig-test.yaml
    
    * Adding docstring to crowdsec.py parse_results
    
    ---------
    
    Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
    Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
    sbs2001 and ianhelle authored Jul 25, 2023
    Configuration menu
    Copy the full SHA
    f76650d View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2023

  1. Added delete_watchlist_item method (#682)

    * Added delete_watchlist_item method
    
    * Black format sentinel_watchlists.py
    
    ---------
    
    Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
    Co-authored-by: Pete Bryan <peter.bryan@microsoft.com>
    3 people authored Jul 27, 2023
    Configuration menu
    Copy the full SHA
    d854d9e View commit details
    Browse the repository at this point in the history