CrowdStrike Falcon Twitter URL

Using the Falcon Container service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
GetCredentials
PEP 8get_credentials
Gets the registry credentials.
GetImageAssessmentReport
PEP 8get_assessment
Retrieve an assessment report for an image by specifying repository and tag.
DeleteImageDetails
PEP 8delete_image_details
Delete image details from the CrowdStrike registry.
ImageMatchesPolicy
PEP 8image_matches_policy
Check if an image matches a policy by specifying repository and tag.

Passing credentials

WARNING

client_id and client_secret are input variables 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.

GetCredentials

Gets the registry credentials

PEP8 method name

get_credentials

Content-Type

  • Produces: application/json

Keyword Arguments

No keywords or arguments accepted.

Usage

Service class example (PEP8 syntax)
from falconpy import FalconContainer

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

response = falcon.get_credentials()
print(response)

Service class example (Operation ID syntax)
from falconpy import FalconContainer

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

response = falcon.GetCredentials()
print(response)

Uber class example
from falconpy import APIHarness

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

response = falcon.command("GetCredentials")
print(response)

GetImageAssessmentReport

Retrieve an assessment report for an image by specifying repository and tag.

PEP8 method name

get_assessment

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.
repository
Service Class Support

Uber Class Support
querystringRepository where the image resides.
tag
Service Class Support

Uber Class Support
querystringTag used for the image assessed.

Usage

Service class example (PEP8 syntax)
from falconpy import FalconContainer

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

response = falcon.get_assessment(repository="string", tag="string")
print(response)

Service class example (Operation ID syntax)
from falconpy import FalconContainer

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

response = falcon.GetImageAssessmentReport(repository="string", tag="string")
print(response)

Uber class example
from falconpy import APIHarness

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

response = falcon.command("GetImageAssessmentReport", repository="string", tag="string")
print(response)

DeleteImageDetails

Delete image details from the CrowdStrike registry.

PEP8 method name

delete_image_details

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
image_id
Service Class Support

Uber Class Support
pathstringID of the image to delete details for.

Usage

Service class example (PEP8 syntax)
from falconpy import FalconContainer

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

response = falcon.delete_image_details(image_id="string")
print(response)

Service class example (Operation ID syntax)
from falconpy import FalconContainer

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

response = falcon.DeleteImageDetails(image_id="string")
print(response)

Uber class example
from falconpy import APIHarness

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

response = falcon.command("DeleteImageDetails", image_id="string")
print(response)

ImageMatchesPolicy

Check if an image matches a policy by specifying repository and tag.

PEP8 method name

image_matches_policy

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
parameters
Service Class Support

Uber Class Support
querydictionaryFull query string parameters payload in JSON format.
repository
Service Class Support

Uber Class Support
querystringRepository where the image resides.
tag
Service Class Support

Uber Class Support
querystringTag used for the image assessed.

Usage

Service class example (PEP8 syntax)
from falconpy import FalconContainer

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

response = falcon.image_matches_policy(repository="string", tag="string")
print(response)

Service class example (Operation ID syntax)
from falconpy import FalconContainer

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

response = falcon.ImageMatchesPolicy(repository="string", tag="string")
print(response)

Uber class example
from falconpy import APIHarness

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

response = falcon.command("ImageMatchesPolicy", repository="string", tag="string")
print(response)