CrowdStrike Falcon CrowdStrike Subreddit

Using the Configuration Assessment service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
getCombinedAssessmentsQuery
PEP8query_combined_assessments
Search for assessments in your environment by providing an FQL filter and paging details. Returns a set of HostFinding entities which match the filter criteria
getRuleDetails
PEP8get_rule_details
Get rules details for provided one or more rule IDs

Passing credentials

WARNING

client_id and client_secret are keyword arguments that contain your CrowdStrike API credentials. Please note that all examples below do not hard code these values. (These values are ingested as strings.)

CrowdStrike does not recommend hard coding API credentials or customer identifiers within source code.

getCombinedAssessmentsQuery

Search for assessments in your environment by providing an FQL filter and paging details. Returns a set of HostFinding entities which match the filter criteria

PEP8 method name

query_combined_assessments

Endpoint

MethodRoute
GET/configuration-assessment/combined/assessments/v1

Required Scope

configuration-assessment:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
after
Service Class Support

Uber Class Support
querystringA pagination token used with the limit parameter to manage pagination of results. On your first request, don't provide an after token. On subsequent requests, provide the after token from the previous response to continue from that place in the results.
limit
Service Class Support

Uber Class Support
queryintegerThe number of items to return in this response (default: 100, max: 5000). Use with the after parameter to manage pagination of results.
sort
Service Class Support

Uber Class Support
querystringSort assessment by their properties. Common sort options include:
  • created_timestamp
filter
Service Class Support

Uber Class Support
querystringFilter items using a query in Falcon Query Language (FQL). Wildcards * are unsupported. Common filter options include:
  • created_timestamp:>'2019-11-25T22:36:12Z'
  • updated_timestamp:>'2019-11-25T22:36:12Z'
  • aid:'8e7656b27d8c49a34a1af416424d6231'
facet
Service Class Support

Uber Class Support
querylist of stringsSelect various details blocks to be returned for each assessment entity. Supported values:
  • host
  • finding.rule
  • finding.evaluation_logic
parametersService Class Support
Uber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import ConfigurationAssessment

# Do not hardcode API credentials!
falcon = ConfigurationAssessment(client_id=CLIENT_ID,
                                 client_secret=CLIENT_SECRET
                                 )

response = falcon.query_combined_assessments(after="string",
                                             limit=integer,
                                             sort="string",
                                             filter="string",
                                             facet=["string", "string"]
                                             )
print(response)
Service class example (Operation ID syntax)
from falconpy import ConfigurationAssessment

# Do not hardcode API credentials!
falcon = ConfigurationAssessment(client_id=CLIENT_ID,
                                 client_secret=CLIENT_SECRET
                                 )

response = falcon.getCombinedAssessmentsQuery(after="string",
                                              limit=integer,
                                              sort="string",
                                              filter="string",
                                              facet=["string", "string"]
                                              )
print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.command("getCombinedAssessmentsQuery",
                          after="string",
                          limit=integer,
                          sort="string",
                          filter="string",
                          facet=["string", "string"]
                          )
print(response)

getRuleDetails

Get rules details for provided one or more rule IDs

PEP8 method name

get_rule_details

Endpoint

MethodRoute
GET/configuration-assessment/entities/rule-details/v1

Required Scope

configuration-assessment:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
ids
Service Class Support

Uber Class Support
querystring or list of stringsOne or more rules IDs (max: 400)
parametersService Class Support
Uber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.

Usage

Service class example (PEP8 syntax)
from falconpy import ConfigurationAssessment

# Do not hardcode API credentials!
falcon = ConfigurationAssessment(client_id=CLIENT_ID,
                                 client_secret=CLIENT_SECRET
                                 )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.get_rule_details(ids=id_list)

print(response)
Service class example (Operation ID syntax)
from falconpy import ConfigurationAssessment

# Do not hardcode API credentials!
falcon = ConfigurationAssessment(client_id=CLIENT_ID,
                                 client_secret=CLIENT_SECRET
                                 )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.getRuleDetails(ids=id_list)

print(response)
Uber class example
from falconpy import APIHarnessV2

# Do not hardcode API credentials!
falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

id_list = 'ID1,ID2,ID3'  # Can also pass a list here: ['ID1', 'ID2', 'ID3']

response = falcon.command("getRuleDetails", ids=id_list)

print(response)