pypi crowdstrike-falconpy 0.4.6
Version 0.4.6

latest releases: 1.4.5, 1.4.4, 1.4.3...
3 years ago

FalconPy v0.4.6

This pull request provides updated functionality to the FalconPy base package.

  • Enhancement
  • Updated unit tests

Unit test coverage

Name                                                             Stmts   Miss  Cover
------------------------------------------------------------------------------------
src/falconpy/__init__.py                                            10      0   100%
src/falconpy/_endpoint/__init__.py                                  83      0   100%
src/falconpy/_endpoint/_cloud_connect_aws.py                         1      0   100%
src/falconpy/_endpoint/_cspm_registration.py                         1      0   100%
src/falconpy/_endpoint/_custom_ioa.py                                1      0   100%
src/falconpy/_endpoint/_d4c_registration.py                          1      0   100%
src/falconpy/_endpoint/_detects.py                                   1      0   100%
src/falconpy/_endpoint/_device_control_policies.py                   1      0   100%
src/falconpy/_endpoint/_event_streams.py                             1      0   100%
src/falconpy/_endpoint/_falcon_complete_dashboard.py                 1      0   100%
src/falconpy/_endpoint/_falconx_sandbox.py                           1      0   100%
src/falconpy/_endpoint/_firewall_management.py                       1      0   100%
src/falconpy/_endpoint/_firewall_policies.py                         1      0   100%
src/falconpy/_endpoint/_host_group.py                                1      0   100%
src/falconpy/_endpoint/_hosts.py                                     1      0   100%
src/falconpy/_endpoint/_incidents.py                                 1      0   100%
src/falconpy/_endpoint/_installation_tokens.py                       1      0   100%
src/falconpy/_endpoint/_intel.py                                     1      0   100%
src/falconpy/_endpoint/_ioa_exclusions.py                            1      0   100%
src/falconpy/_endpoint/_iocs.py                                      1      0   100%
src/falconpy/_endpoint/_malquery.py                                  1      0   100%
src/falconpy/_endpoint/_ml_exclusions.py                             1      0   100%
src/falconpy/_endpoint/_mssp.py                                      1      0   100%
src/falconpy/_endpoint/_oauth2.py                                    1      0   100%
src/falconpy/_endpoint/_overwatch_dashboard.py                       1      0   100%
src/falconpy/_endpoint/_prevention_policies.py                       1      0   100%
src/falconpy/_endpoint/_quick_scan.py                                1      0   100%
src/falconpy/_endpoint/_real_time_response.py                        1      0   100%
src/falconpy/_endpoint/_real_time_response_admin.py                  1      0   100%
src/falconpy/_endpoint/_sample_uploads.py                            1      0   100%
src/falconpy/_endpoint/_sensor_download.py                           1      0   100%
src/falconpy/_endpoint/_sensor_update_policies.py                    1      0   100%
src/falconpy/_endpoint/_sensor_visibility_exclusions.py              1      0   100%
src/falconpy/_endpoint/_spotlight_vulnerabilities.py                 1      0   100%
src/falconpy/_endpoint/_user_management.py                           1      0   100%
src/falconpy/_endpoint/_zero_trust_assessment.py                     1      0   100%
src/falconpy/_endpoint/deprecated/__init__.py                       12      0   100%
src/falconpy/_endpoint/deprecated/_custom_ioa.py                     1      0   100%
src/falconpy/_endpoint/deprecated/_firewall_management.py            1      0   100%
src/falconpy/_endpoint/deprecated/_installation_tokens.py            1      0   100%
src/falconpy/_endpoint/deprecated/_iocs.py                           1      0   100%
src/falconpy/_endpoint/deprecated/_real_time_response.py             1      0   100%
src/falconpy/_endpoint/deprecated/_real_time_response_admin.py       1      0   100%
src/falconpy/_result.py                                              8      0   100%
src/falconpy/_service_class.py                                      44      0   100%
src/falconpy/_util.py                                              129      0   100%
src/falconpy/_version.py                                             8      0   100%
src/falconpy/api_complete.py                                        87      0   100%
src/falconpy/cloud_connect_aws.py                                   74      0   100%
src/falconpy/cspm_registration.py                                  128      0   100%
src/falconpy/custom_ioa.py                                         142      0   100%
src/falconpy/detects.py                                             34      0   100%
src/falconpy/device_control_policies.py                             77      0   100%
src/falconpy/event_streams.py                                       15      0   100%
src/falconpy/falconx_sandbox.py                                     82      0   100%
src/falconpy/firewall_management.py                                148      0   100%
src/falconpy/firewall_policies.py                                   80      0   100%
src/falconpy/host_group.py                                          71      0   100%
src/falconpy/hosts.py                                               64      0   100%
src/falconpy/incidents.py                                           45      0   100%
src/falconpy/intel.py                                              105      0   100%
src/falconpy/iocs.py                                                60      0   100%
src/falconpy/mssp.py                                               159      0   100%
src/falconpy/oauth2.py                                              33      0   100%
src/falconpy/prevention_policy.py                                   77      0   100%
src/falconpy/quick_scan.py                                          29      0   100%
src/falconpy/real_time_response.py                                 147      0   100%
src/falconpy/real_time_response_admin.py                            88      0   100%
src/falconpy/sample_uploads.py                                      31      0   100%
src/falconpy/sensor_download.py                                     42      0   100%
src/falconpy/sensor_update_policy.py                               117      0   100%
src/falconpy/spotlight_vulnerabilities.py                           15      0   100%
src/falconpy/user_management.py                                     75      0   100%
src/falconpy/zero_trust_assessment.py                                9      0   100%
------------------------------------------------------------------------------------
TOTAL                                                             2368      0   100%

Bandit analysis

[main]	INFO	running on Python 3.9.2
Run started:2021-04-19 10:30:07.881913

Test results:
	No issues identified.

Code scanned:
	Total lines of code: 17277
	Total lines skipped (#nosec): 0

Run metrics:
	Total issues (by severity):
		Undefined: 0.0
		Low: 0.0
		Medium: 0.0
		High: 0.0
	Total issues (by confidence):
		Undefined: 0.0
		Low: 0.0
		Medium: 0.0
		High: 0.0
Files skipped (0):

Added features and functionality

  • Added: Missing method to Spotlight_Vulnerabilities Service Class (spotlight_vulnerabilities.py)

    • getRemediations
    • Added unit test to existing test series (test_spotlight_vulnerabilities.py)
  • Added: MSSP (Falcon Flight Control) Service Class

    • getChildren
    • getCIDGroupMembersBy
    • addCIDGroupMembers
    • deleteCIDGroupMembers
    • getCIDGroupById
    • createCIDGroups
    • deleteCIDGroups
    • updateCIDGroups
    • getRolesByID
    • addRole
    • deleteRoles
    • getUserGroupMembersByID
    • addUserGroupMembers
    • deleteUserGroupMembers
    • getUserGroupsByID
    • createUserGroup
    • deleteUserGroups
    • updateUserGroups
    • queryChildren
    • queryCIDGroupMembers
    • queryCIDGroups
    • queryRoles
    • queryUserGroupMembers
    • queryUserGroups
    • Added unit tests (test_mssp.py)
  • Added: Zero Trust Assessment Service Class

    • getAssessmentV1
    • Added unit tests (test_zero_trust_assessment.py)

Issues resolved

  • Fixed KeyError when providing invalid credentials to a Service Class using Credential
    or Object authentication, Closes #134

Other

  • Moved _endpoint constant library to a private submodule (No impact to existing usage)
    • Added payload parameter information to _endpoint constants
    • Adds service collection ID to endpoint lists
    • This prepares the package for new functionality planned for future releases
  • Added: force_default function - decorator function that forces default values for function arguments (_util.py)
    • Added: Helper function get_default
    • Refactored Uber class to leverage this new functionality
      • Unit tests refactored to cover new code paths (test_uber_api_complete.py)
    • Depending upon feedback, this updated pattern will be implemented within Service Classes to reduce overall function complexity
  • Linting

    Developers: These patterns are being tested within the Uber Class for migration over to Service Classes in future versions

    • Reduced Uber class method complexity
      • Added: Helper function calc_url_from_args (_util.py)
      • Added: Helper function _create_header_payload (api_complete.py, Requires class internal variables)
    • Migrated Uber class variables to snake_case format
    • Removed unnecessarily complex lambdas
      • New class method: valid_cred_format, replaces previous lambda class attribute
      • New class method: token_expired, replaces previous lambda class attribute
    • Reduced overall number of instance attributes
    • Unit tests updated (test_uber_api_complete.py)
  • Minor unit test update to test_cspm_registration.py
  • Added util/coverage.config
    • Moved unit test coverage reporting over to configuration file for parameter management
  • Documentation updates

Don't miss a new crowdstrike-falconpy release

NewReleases is sending notifications on new releases.