CrowdStrike Falcon CrowdStrike Subreddit

Using the Container Packages service collection

Uber class support Service class support Documentation Version Page Updated

Table of Contents

Operation IDDescription
ReadPackagesByImageCount
PEP8read_packages_by_image_count
Retrieves the N most frequently used packages across images.
ReadPackagesCountByZeroDay
PEP8read_zero_day_counts
Retrieve packages count affected by zero day vulnerabilities.
ReadPackagesByFixableVulnCount
PEP8read_fixable_vuln_count
Retrieve top x app packages with the most fixable vulnerabilities.
ReadPackagesByVulnCount
PEP8read_vuln_count
Retrieve top x packages with the most vulnerabilities.
ReadPackagesCombinedExport
PEP8read_combined_export
Retrieve packages identified by the provided filter criteria for the purpose of export.
ReadPackagesCombined
PEP8read_combined
Retrieve packages identified by the provided filter criteria.
ReadPackagesCombinedV2
PEP8read_packages
Retrieve packages identified by the provided filter criteria.

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.

ReadPackagesByImageCount

Retrieves the N most frequently used packages across images.

PEP8 method name

read_packages_by_image_count

Endpoint

MethodRoute
GET/container-security/aggregates/packages/by-image-count/v1

Required Scope

falcon-container-image:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filterquerystringFilter packages using a query in Falcon Query Language (FQL). Supported filter fields: ai_related, cveid, running_images, severity, type, and vulnerability_count
limitqueryintegerMaximum number of package results to return. Default value: 5
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.container_packages import ContainerPackages

falcon = ContainerPackages(client_id=CLIENT_ID,
                           client_secret=CLIENT_SECRET
                           )

response = falcon.read_packages_by_image_count(filter="string", limit=integer)

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

falcon = ContainerPackages(client_id=CLIENT_ID,
                           client_secret=CLIENT_SECRET
                           )

response = falcon.ReadPackagesByImageCount(filter="string", limit=integer)

print(response)
Uber class example
from falconpy import APIHarnessV2

falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.command("ReadPackagesByImageCount", filter="string", limit=integer)

print(response)

ReadPackagesCountByZeroDay

Retrieve packages count affected by zero day vulnerabilities.

PEP8 method name

read_zero_day_counts

Endpoint

MethodRoute
GET/container-security/aggregates/packages/count-by-zero-day/v1

Required Scope

falcon-container-image:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFilter packages using a query in Falcon Query Language (FQL). Supported filters: cid
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 ContainerPackages

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

response = falcon.read_zero_day_counts(filter="string")

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

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

response = falcon.ReadPackagesCountByZeroDay(filter="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("ReadPackagesCountByZeroDay", filter="string")

print(response)

ReadPackagesByFixableVulnCount

Retrieve top x app packages with the most fixable vulnerabilities.

PEP8 method name

read_fixable_vuln_count

Endpoint

MethodRoute
GET/container-security/combined/packages/app-by-fixable-vulnerability-count/v1

Required Scope

falcon-container-image:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFilter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count
limit
Service Class Support

Uber Class Support
queryintegerThe upper-bound on the number of records to retrieve.
offset
Service Class Support

Uber Class Support
queryintegerThe offset from where to begin.
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 ContainerPackages

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

response = falcon.read_fixable_vuln_count(filter="string",
                                          limit=integer,
                                          offset=integer
                                          )
print(response)
Service class example (Operation ID syntax)
from falconpy import ContainerPackages

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

response = falcon.ReadPackagesByFixableVulnCount(filter="string",
                                                 limit=integer,
                                                 offset=integer
                                                 )
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("ReadPackagesByFixableVulnCount",
                          filter="string",
                          limit=integer,
                          offset=integer
                          )
print(response)

ReadPackagesByVulnCount

Retrieve top x packages with the most vulnerabilities.

PEP8 method name

read_vuln_count

Endpoint

MethodRoute
GET/container-security/combined/packages/by-vulnerability-count/v1

Required Scope

falcon-container-image:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFilter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count
limit
Service Class Support

Uber Class Support
queryintegerThe upper-bound on the number of records to retrieve.
offset
Service Class Support

Uber Class Support
queryintegerThe offset from where to begin.
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 ContainerPackages

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

response = falcon.read_vuln_count(filter="string",
                                  limit=integer,
                                  offset=integer
                                  )
print(response)
Service class example (Operation ID syntax)
from falconpy import ContainerPackages

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

response = falcon.ReadPackagesByVulnCount(filter="string",
                                          limit=integer,
                                          offset=integer
                                          )
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("ReadPackagesByVulnCount",
                          filter="string",
                          limit=integer,
                          offset=integer
                          )
print(response)

ReadPackagesCombinedExport

Retrieve packages identified by the provided filter criteria for the purpose of export.

PEP8 method name

read_combined_export

Endpoint

MethodRoute
GET/container-security/combined/packages/export/v1

Required Scope

falcon-container-image:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFilter packages using a query in Falcon Query Language (FQL). Supported filters: cid,container_id,cveid,fix_status,image_digest,license,package_name_version,severity,type,vulnerability_count
only_zero_day_affected
Service Class Support

Uber Class Support
queryboolean(true/false) load zero day affected packages, default is false
limit
Service Class Support

Uber Class Support
queryintegerThe upper-bound on the number of records to retrieve.
offset
Service Class Support

Uber Class Support
queryintegerThe offset from where to begin.
parametersService Class Support
Uber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.
sort
Service Class Support

Uber Class Support
querystringThe fields to sort the records on. Supported columns: [license package_name_version type]

Usage

Service class example (PEP8 syntax)
from falconpy import ContainerPackages

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

response = falcon.read_combined_export(filter="string",
                                       only_zero_day_affected=boolean,
                                       limit=integer,
                                       offset=integer,
                                       sort="string"
                                       )
print(response)
Service class example (Operation ID syntax)
from falconpy import ContainerPackages

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

response = falcon.ReadPackagesCombinedExport(filter="string",
                                             only_zero_day_affected=boolean,
                                             limit=integer,
                                             offset=integer,
                                             sort="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("ReadPackagesCombinedExport",
                          filter="string",
                          only_zero_day_affected=boolean,
                          limit=integer,
                          offset=integer,
                          sort="string"
                          )
print(response)

ReadPackagesCombined

Retrieve packages identified by the provided filter criteria.

PEP8 method name

read_combined

Endpoint

MethodRoute
GET/container-security/combined/packages/v1

Required Scope

falcon-container-image:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFilter packages using a query in Falcon Query Language (FQL). Supported filters: ai_related, cid, container_id, cveid, fix_status, image_digest, license, package_name_version, severity, type, and vulnerability_count
only_zero_day_affected
Service Class Support

Uber Class Support
querybooleanLoad zero day affected packages. Default: false
limit
Service Class Support

Uber Class Support
queryintegerThe upper-bound on the number of records to retrieve.
offset
Service Class Support

Uber Class Support
queryintegerThe offset from where to begin.
parametersService Class Support
Uber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.
sort
Service Class Support

Uber Class Support
querystringThe fields to sort the records on. Supported columns: license, package_name_version, and type

Usage

Service class example (PEP8 syntax)
from falconpy import ContainerPackages

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

response = falcon.read_combined(filter="string",
                                only_zero_day_affected=boolean,
                                limit=integer,
                                offset=integer,
                                sort="string"
                                )
print(response)
Service class example (Operation ID syntax)
from falconpy import ContainerPackages

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

response = falcon.ReadPackagesCombined(filter="string",
                                       only_zero_day_affected=boolean,
                                       limit=integer,
                                       offset=integer,
                                       sort="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("ReadPackagesCombined",
                          filter="string",
                          only_zero_day_affected=boolean,
                          limit=integer,
                          offset=integer,
                          sort="string"
                          )
print(response)

ReadPackagesCombinedV2

Retrieve packages identified by the provided filter criteria.

PEP8 method name

read_packages

Endpoint

MethodRoute
GET/container-security/combined/packages/v2

Required Scope

falcon-container-image:read

Content-Type

  • Produces: application/json

Keyword Arguments

NameServiceUberTypeData typeDescription
filter
Service Class Support

Uber Class Support
querystringFilter packages using a query in Falcon Query Language (FQL). Supported filters: ai_related, cid, container_id, cveid, fix_status, image_digest, license, package_name_version, severity, type, and vulnerability_count
only_zero_day_affected
Service Class Support

Uber Class Support
querybooleanLoad zero day affected packages. Default: false
limit
Service Class Support

Uber Class Support
queryintegerThe upper-bound on the number of records to retrieve.
offset
Service Class Support

Uber Class Support
queryintegerThe offset from where to begin.
parametersService Class Support
Uber Class SupportquerydictionaryFull query string parameters payload in JSON format. Not required if using other keywords.
sort
Service Class Support

Uber Class Support
querystringThe fields to sort the records on. Supported columns: license, package_name_version, and type

Usage

Service class example (PEP8 syntax)
from falconpy.container_packages import ContainerPackages

falcon = ContainerPackages(client_id=CLIENT_ID,
                           client_secret=CLIENT_SECRET
                           )

response = falcon.read_packages(filter="string",
                                only_zero_day_affected=boolean,
                                sort="string",
                                limit=integer,
                                offset=integer
                                )
print(response)
Service class example (Operation ID syntax)
from falconpy import ContainerPackages

falcon = ContainerPackages(client_id=CLIENT_ID,
                           client_secret=CLIENT_SECRET
                           )

response = falcon.ReadPackagesCombinedV2(filter="string",
                                         only_zero_day_affected=boolean,
                                         sort="string",
                                         limit=integer,
                                         offset=integer
                                         )
print(response)
Uber class example
from falconpy import APIHarnessV2

falcon = APIHarnessV2(client_id=CLIENT_ID,
                      client_secret=CLIENT_SECRET
                      )

response = falcon.command("ReadPackagesCombinedV2",
                          filter="string",
                          only_zero_day_affected=boolean,
                          sort="string",
                          limit=integer,
                          offset=integer
                          )
print(response)