Skip to content

aws.inspector2.list_coverage

Example SQL Queries

SELECT * FROM
aws.inspector2.list_coverage;

Description

Lists coverage details for you environment.

Table Definition

Column NameColumn Data Type
filter_criteria Input Column

An object that contains details on the filters to apply to the coverage data for your environment.

STRUCT(
"account_id" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"ec2_instance_tags" STRUCT(
"comparison" VARCHAR,
"key" VARCHAR,
"value" VARCHAR
)[],
"ecr_image_tags" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"ecr_repository_name" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"image_pulled_at" STRUCT(
"end_inclusive" TIMESTAMP_S,
"start_inclusive" TIMESTAMP_S
)[],
"lambda_function_name" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"lambda_function_runtime" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"lambda_function_tags" STRUCT(
"comparison" VARCHAR,
"key" VARCHAR,
"value" VARCHAR
)[],
"last_scanned_at" STRUCT(
"end_inclusive" TIMESTAMP_S,
"start_inclusive" TIMESTAMP_S
)[],
"resource_id" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"resource_type" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"scan_mode" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"scan_status_code" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"scan_status_reason" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[],
"scan_type" STRUCT(
"comparison" VARCHAR,
"value" VARCHAR
)[]
)
Show child fields
filter_criteria.account_id[]
Show child fields
filter_criteria.account_id[].comparison

The operator to compare strings on.

filter_criteria.account_id[].value

The value to compare strings on.

filter_criteria.ec2_instance_tags[]
Show child fields
filter_criteria.ec2_instance_tags[].comparison

The operator to compare coverage on.

filter_criteria.ec2_instance_tags[].key

The tag key associated with the coverage map filter.

filter_criteria.ec2_instance_tags[].value

The tag value associated with the coverage map filter.

filter_criteria.ecr_image_tags[]
Show child fields
filter_criteria.ecr_image_tags[].comparison

The operator to compare strings on.

filter_criteria.ecr_image_tags[].value

The value to compare strings on.

filter_criteria.ecr_repository_name[]
Show child fields
filter_criteria.ecr_repository_name[].comparison

The operator to compare strings on.

filter_criteria.ecr_repository_name[].value

The value to compare strings on.

filter_criteria.image_pulled_at[]
Show child fields
filter_criteria.image_pulled_at[].end_inclusive

A timestamp representing the end of the time period to filter results by.

filter_criteria.image_pulled_at[].start_inclusive

A timestamp representing the start of the time period to filter results by.

filter_criteria.lambda_function_name[]
Show child fields
filter_criteria.lambda_function_name[].comparison

The operator to compare strings on.

filter_criteria.lambda_function_name[].value

The value to compare strings on.

filter_criteria.lambda_function_runtime[]
Show child fields
filter_criteria.lambda_function_runtime[].comparison

The operator to compare strings on.

filter_criteria.lambda_function_runtime[].value

The value to compare strings on.

filter_criteria.lambda_function_tags[]
Show child fields
filter_criteria.lambda_function_tags[].comparison

The operator to compare coverage on.

filter_criteria.lambda_function_tags[].key

The tag key associated with the coverage map filter.

filter_criteria.lambda_function_tags[].value

The tag value associated with the coverage map filter.

filter_criteria.last_scanned_at[]
Show child fields
filter_criteria.last_scanned_at[].end_inclusive

A timestamp representing the end of the time period to filter results by.

filter_criteria.last_scanned_at[].start_inclusive

A timestamp representing the start of the time period to filter results by.

filter_criteria.resource_id[]
Show child fields
filter_criteria.resource_id[].comparison

The operator to compare strings on.

filter_criteria.resource_id[].value

The value to compare strings on.

filter_criteria.resource_type[]
Show child fields
filter_criteria.resource_type[].comparison

The operator to compare strings on.

filter_criteria.resource_type[].value

The value to compare strings on.

filter_criteria.scan_mode[]
Show child fields
filter_criteria.scan_mode[].comparison

The operator to compare strings on.

filter_criteria.scan_mode[].value

The value to compare strings on.

filter_criteria.scan_status_code[]
Show child fields
filter_criteria.scan_status_code[].comparison

The operator to compare strings on.

filter_criteria.scan_status_code[].value

The value to compare strings on.

filter_criteria.scan_status_reason[]
Show child fields
filter_criteria.scan_status_reason[].comparison

The operator to compare strings on.

filter_criteria.scan_status_reason[].value

The value to compare strings on.

filter_criteria.scan_type[]
Show child fields
filter_criteria.scan_type[].comparison

The operator to compare strings on.

filter_criteria.scan_type[].value

The value to compare strings on.

_aws_profile Input Column

The AWS profile defines the AWS identity used. It can be defined via credentials or by assuming a IAM role.

STRUCT(
"type" VARCHAR,
"name" VARCHAR,
"account_id" VARCHAR,
"via_profile_name" VARCHAR,
"assumed_role_arn" VARCHAR,
"organization" STRUCT(
"account_name" VARCHAR,
"id" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[],
"master_account" STRUCT(
"id" VARCHAR,
"email" VARCHAR
),
"parents" STRUCT(
"type" VARCHAR,
"id" VARCHAR,
"name" VARCHAR,
"tags" STRUCT(
"key" VARCHAR,
"value" VARCHAR
)[]
)[]
)
)
Show child fields
_aws_profile.account_id

The AWS account id

_aws_profile.assumed_role_arn

The ARN of the assumed role

_aws_profile.name

The unique name of the profile.

_aws_profile.organization

Information about this profile's membership in the AWS organization.

Show child fields
_aws_profile.organization.account_name

The name of account speciifed by the organization

_aws_profile.organization.id

The organization id

_aws_profile.organization.master_account
Show child fields
_aws_profile.organization.master_account.email

The organization master account email address

_aws_profile.organization.master_account.id

The organization master account id

_aws_profile.organization.parents[]
Show child fields
_aws_profile.organization.parents[].id

The id of the parent

_aws_profile.organization.parents[].name

The name of the parent

_aws_profile.organization.parents[].tags[]
Show child fields
_aws_profile.organization.parents[].tags[].key
_aws_profile.organization.parents[].tags[].value
_aws_profile.organization.parents[].type

The type of parent can be an organization unit or a root

_aws_profile.organization.tags[]
Show child fields
_aws_profile.organization.tags[].key
_aws_profile.organization.tags[].value
_aws_profile.type

The type of profile, either 'credentials' or 'assumed_role'

_aws_profile.via_profile_name

This IAM role for this profile is assumed by first utilizing another profile with this name to obtain credentials.

_aws_region Input Column

The AWS region to use.

VARCHAR
account_id

The Amazon Web Services account ID of the covered resource.

VARCHAR
last_scanned_at

The date and time the resource was last checked for vulnerabilities.

TIMESTAMP_S
resource_id

The ID of the covered resource.

VARCHAR
resource_metadata

An object that contains details about the metadata.

STRUCT(
"ec2" STRUCT(
"ami_id" VARCHAR,
"platform" VARCHAR,
"tags" MAP(VARCHAR, VARCHAR)
),
"ecr_image" STRUCT(
"image_pulled_at" TIMESTAMP_S,
"tags" VARCHAR[]
),
"ecr_repository" STRUCT(
"name" VARCHAR,
"scan_frequency" VARCHAR
),
"lambda_function" STRUCT(
"function_name" VARCHAR,
"function_tags" MAP(VARCHAR, VARCHAR),
"layers" VARCHAR[],
"runtime" VARCHAR
)
)
Show child fields
resource_metadata.ec2

An object that contains metadata details for an Amazon EC2 instance.

Show child fields
resource_metadata.ec2.ami_id

The ID of the Amazon Machine Image (AMI) used to launch the instance.

resource_metadata.ec2.platform

The platform of the instance.

resource_metadata.ec2.tags

The tags attached to the instance.

resource_metadata.ecr_image

An object that contains details about the container metadata for an Amazon ECR image.

Show child fields
resource_metadata.ecr_image.image_pulled_at

The date an image was last pulled at.

resource_metadata.ecr_image.tags[]
resource_metadata.ecr_repository

An object that contains details about the repository an Amazon ECR image resides in.

Show child fields
resource_metadata.ecr_repository.name

The name of the Amazon ECR repository.

resource_metadata.ecr_repository.scan_frequency

The frequency of scans.

resource_metadata.lambda_function

An object that contains metadata details for an Amazon Web Services Lambda function.

Show child fields
resource_metadata.lambda_function.function_name

The name of a function.

resource_metadata.lambda_function.function_tags

The resource tags on an Amazon Web Services Lambda function.

resource_metadata.lambda_function.layers[]
resource_metadata.lambda_function.runtime

An Amazon Web Services Lambda function's runtime.

resource_type

The type of the covered resource.

VARCHAR
scan_mode

The scan method that is applied to the instance.

VARCHAR
scan_status

The status of the scan covering the resource.

STRUCT(
"reason" VARCHAR,
"status_code" VARCHAR
)
Show child fields
scan_status.reason

The scan status. Possible return values and descriptions are:

PENDING_INITIAL_SCAN - This resource has been identified for scanning, results will be available soon.

ACCESS_DENIED - Resource access policy restricting Amazon Inspector access. Please update the IAM policy.

INTERNAL_ERROR - Amazon Inspector has encountered an internal error for this resource. Amazon Inspector service will automatically resolve the issue and resume the scanning. No action required from the user.

UNMANAGED_EC2_INSTANCE - The EC2 instance is not managed by SSM, please use the following SSM automation to remediate the issue: https://docs.aws.amazon.com/systems-manager-automation-runbooks/latest/userguide/automation-awssupport-troubleshoot-managed-instance.html. Once the instance becomes managed by SSM, Inspector will automatically begin scanning this instance.

UNSUPPORTED_OS - Amazon Inspector does not support this OS, architecture, or image manifest type at this time. To see a complete list of supported operating systems see: https://docs.aws.amazon.com/inspector/latest/user/supported.html.

SCAN_ELIGIBILITY_EXPIRED - The configured scan duration has lapsed for this image.

RESOURCE_TERMINATED - This resource has been terminated. The findings and coverage associated with this resource are in the process of being cleaned up.

SUCCESSFUL - The scan was successful.

NO_RESOURCES_FOUND - Reserved for future use.

IMAGE_SIZE_EXCEEDED - Reserved for future use.

SCAN_FREQUENCY_MANUAL - This image will not be covered by Amazon Inspector due to the repository scan frequency configuration.

SCAN_FREQUENCY_SCAN_ON_PUSH - This image will be scanned one time and will not new findings because of the scan frequency configuration.

EC2_INSTANCE_STOPPED - This EC2 instance is in a stopped state, therefore, Amazon Inspector will pause scanning. The existing findings will continue to exist until the instance is terminated. Once the instance is re-started, Inspector will automatically start scanning the instance again. Please note that you will not be charged for this instance while it’s in a stopped state.

PENDING_DISABLE - This resource is pending cleanup during disablement. The customer will not be billed while a resource is in the pending disable status.

NO INVENTORY - Amazon Inspector couldn’t find software application inventory to scan for vulnerabilities. This might be caused due to required Amazon Inspector associations being deleted or failing to run on your resource. Please verify the status of InspectorInventoryCollection-do-not-delete association in the SSM console for the resource. Additionally, you can verify the instance’s inventory in the SSM Fleet Manager console.

STALE_INVENTORY - Amazon Inspector wasn’t able to collect an updated software application inventory in the last 7 days. Please confirm the required Amazon Inspector associations still exist and you can still see an updated inventory in the SSM console.

EXCLUDED_BY_TAG - This resource was not scanned because it has been excluded by a tag.

UNSUPPORTED_RUNTIME - The function was not scanned because it has an unsupported runtime. To see a complete list of supported runtimes see: https://docs.aws.amazon.com/inspector/latest/user/supported.html.

UNSUPPORTED_MEDIA_TYPE - The ECR image has an unsupported media type.

UNSUPPORTED_CONFIG_FILE - Reserved for future use.

DEEP_INSPECTION_PACKAGE_COLLECTION_LIMIT_EXCEEDED - The instance has exceeded the 5000 package limit for Amazon Inspector Deep inspection. To resume Deep inspection for this instance you can try to adjust the custom paths associated with the account.

DEEP_INSPECTION_DAILY_SSM_INVENTORY_LIMIT_EXCEEDED - The SSM agent couldn't send inventory to Amazon Inspector because the SSM quota for Inventory data collected per instance per day has already been reached for this instance.

DEEP_INSPECTION_COLLECTION_TIME_LIMIT_EXCEEDED - Amazon Inspector failed to extract the package inventory because the package collection time exceeding the maximum threshold of 15 minutes.

DEEP_INSPECTION_NO_INVENTORY The Amazon Inspector plugin hasn't yet been able to collect an inventory of packages for this instance. This is usually the result of a pending scan, however, if this status persists after 6 hours, use SSM to ensure that the required Amazon Inspector associations exist and are running for the instance.

scan_status.status_code

The status code of the scan.

scan_type

The Amazon Inspector scan type covering the resource.

VARCHAR