# This file is automatically generated by botocraft. Do not edit directly.
# mypy: disable-error-code="index, override, assignment, union-attr, misc"
from pydantic import Field
from .abstract import (
Boto3Model,
ReadonlyBoto3Model,
PrimaryBoto3Model,
ReadonlyPrimaryBoto3Model,
Boto3ModelManager,
ReadonlyBoto3ModelManager,
)
from typing import ClassVar, Literal, Any, cast
from .abstract import PrimaryBoto3ModelQuerySet
from botocraft.mixins.tags import TagsDictMixin
from datetime import datetime
from botocraft.mixins.inspector2 import list_augment_delegated_admin_accounts
from botocraft.mixins.inspector2 import CisScanConfigurationManagerMixin
import builtins
from botocraft.mixins.inspector2 import VulnerabilityManagerMixin
from botocraft.mixins.inspector2 import convert_delegated_admin
# ===============
# Managers
# ===============
[docs]class CisScanConfigurationManager(CisScanConfigurationManagerMixin, Boto3ModelManager):
service_name: str = "inspector2"
[docs] def create(self, model: "CisScanConfiguration") -> str:
"""
Create a new CIS scan configuration.
Args:
model: The :py:class:`CisScanConfiguration` to create.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
scanName=data.get("scanName"),
securityLevel=data.get("securityLevel"),
schedule=data.get("schedule"),
targets=data.get("targets"),
tags=data.get("tags"),
)
_response = self.client.create_cis_scan_configuration(
**{k: v for k, v in args.items() if v is not None}
)
response = CreateCisScanConfigurationResponse(**_response)
self.sessionize(response.scanConfigurationArn)
return cast("str", response.scanConfigurationArn)
[docs] def delete(self, scanConfigurationArn: str) -> "CisScanConfiguration":
"""
Delete a CIS scan configuration.
Args:
scanConfigurationArn: The ARN of the CIS scan configuration.
"""
args: dict[str, Any] = dict(
scanConfigurationArn=self.serialize(scanConfigurationArn)
)
_response = self.client.delete_cis_scan_configuration(
**{k: v for k, v in args.items() if v is not None}
)
response = DeleteCisScanConfigurationResponse(**_response)
return cast("CisScanConfiguration", response.scanConfigurationArn)
[docs] def update(self, model: "CisScanConfiguration") -> str:
"""
Update a CIS scan configuration.
Args:
model: The :py:class:`CisScanConfiguration` to update.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
scanConfigurationArn=data.get("scanConfigurationArn"),
scanName=data.get("scanName"),
securityLevel=data.get("securityLevel"),
schedule=data.get("schedule"),
targets=data.get("targets"),
)
_response = self.client.update_cis_scan_configuration(
**{k: v for k, v in args.items() if v is not None}
)
response = UpdateCisScanConfigurationResponse(**_response)
self.sessionize(response.scanConfigurationArn)
return cast("str", response.scanConfigurationArn)
[docs] def list(
self,
*,
filterCriteria: "ListCisScanConfigurationsFilterCriteria | None" = None,
sortBy: "Literal['SCAN_NAME', 'SCAN_CONFIGURATION_ARN'] | None" = None,
sortOrder: "Literal['ASC', 'DESC'] | None" = None,
) -> PrimaryBoto3ModelQuerySet:
"""
Lists CIS scan configurations.
Keyword Args:
filterCriteria: The CIS scan configuration filter criteria.
sortBy: The CIS scan configuration sort by order.
sortOrder: The CIS scan configuration sort order order.
"""
paginator = self.client.get_paginator("list_cis_scan_configurations")
args: dict[str, Any] = dict(
filterCriteria=self.serialize(filterCriteria),
sortBy=self.serialize(sortBy),
sortOrder=self.serialize(sortOrder),
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = ListCisScanConfigurationsResponse(**_response)
if response.scanConfigurations:
results.extend(response.scanConfigurations)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs]class Inspector2FilterManager(Boto3ModelManager):
service_name: str = "inspector2"
[docs] def create(
self, model: "Inspector2Filter", filterCriteria: "FilterCriteria"
) -> str:
"""
Create an inspector2 filter.
Args:
model: The :py:class:`Filter` to create.
filterCriteria: Defines the criteria to be used in the filter for querying findings.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
action=data.get("action"),
filterCriteria=self.serialize(filterCriteria),
name=data.get("name"),
description=data.get("description"),
tags=data.get("tags"),
reason=data.get("reason"),
)
_response = self.client.create_filter(
**{k: v for k, v in args.items() if v is not None}
)
response = CreateFilterResponse(**_response)
self.sessionize(response.arn)
return cast("str", response.arn)
[docs] def delete(self, arn: str) -> "Inspector2Filter":
"""
Delete an inspector2 filter.
Args:
arn: The Amazon Resource Number (ARN) of the filter to be deleted.
"""
args: dict[str, Any] = dict(arn=self.serialize(arn))
_response = self.client.delete_filter(
**{k: v for k, v in args.items() if v is not None}
)
response = DeleteFilterResponse(**_response)
return cast("Inspector2Filter", response.arn)
[docs] def update(
self,
model: "Inspector2Filter",
filterArn: str,
filterCriteria: "FilterCriteria | None" = None,
) -> str:
"""
Update an inspector2 filter.
Args:
model: The :py:class:`Filter` to update.
filterArn: The Amazon Resource Number (ARN) of the filter to update.
Keyword Args:
filterCriteria: Defines the criteria to be update in the filter.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
filterArn=self.serialize(filterArn),
action=data.get("action"),
description=data.get("description"),
filterCriteria=self.serialize(filterCriteria),
name=data.get("name"),
reason=data.get("reason"),
)
_response = self.client.update_filter(
**{k: v for k, v in args.items() if v is not None}
)
response = UpdateFilterResponse(**_response)
self.sessionize(response.arn)
return cast("str", response.arn)
[docs] def get(self, arn: str) -> "Inspector2Filter | None":
"""
Get an inspector2 filter.
Args:
arn: The ARN of the filter to get.
"""
args: dict[str, Any] = dict(arns=self.serialize([arn]))
_response = self.client.list_filters(
**{k: v for k, v in args.items() if v is not None}
)
response = ListFiltersResponse(**_response)
if response and response.filters:
self.sessionize(response.filters[0])
return response.filters[0]
return None
[docs] def list(
self,
*,
arns: "builtins.list[str] | None" = None,
action: "Literal['NONE', 'SUPPRESS'] | None" = None,
) -> PrimaryBoto3ModelQuerySet:
"""
Lists the filters associated with your account.
Keyword Args:
arns: The Amazon resource number (ARN) of the filter.
action: The action the filter applies to matched findings.
"""
paginator = self.client.get_paginator("list_filters")
args: dict[str, Any] = dict(
arns=self.serialize(arns), action=self.serialize(action)
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = ListFiltersResponse(**_response)
if response.filters:
results.extend(response.filters)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs]class FindingManager(ReadonlyBoto3ModelManager):
service_name: str = "inspector2"
[docs] def get(
self,
*,
filterCriteria: "FilterCriteria | None" = None,
sortCriteria: "SortCriteria | None" = None,
) -> "Finding | None":
"""
Get an inspector2 finding.
Keyword Args:
filterCriteria: Details on the filters to apply to your finding results.
sortCriteria: Details on the sort criteria to apply to your finding results.
"""
args: dict[str, Any] = dict(
filterCriteria=self.serialize(filterCriteria),
sortCriteria=self.serialize(sortCriteria),
)
_response = self.client.list_findings(
**{k: v for k, v in args.items() if v is not None}
)
response = ListFindingsResponse(**_response)
if response and response.findings:
self.sessionize(response.findings[0])
return response.findings[0]
return None
[docs] def list(
self,
*,
filterCriteria: "FilterCriteria | None" = None,
sortCriteria: "SortCriteria | None" = None,
) -> PrimaryBoto3ModelQuerySet:
"""
Lists findings for your environment.
Keyword Args:
filterCriteria: Details on the filters to apply to your finding results.
sortCriteria: Details on the sort criteria to apply to your finding results.
"""
paginator = self.client.get_paginator("list_findings")
args: dict[str, Any] = dict(
filterCriteria=self.serialize(filterCriteria),
sortCriteria=self.serialize(sortCriteria),
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = ListFindingsResponse(**_response)
if response.findings:
results.extend(response.findings)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs] def list_aggregations(
self,
aggregationType: Literal[
"FINDING_TYPE",
"PACKAGE",
"TITLE",
"REPOSITORY",
"AMI",
"AWS_EC2_INSTANCE",
"AWS_ECR_CONTAINER",
"IMAGE_LAYER",
"ACCOUNT",
"AWS_LAMBDA_FUNCTION",
"LAMBDA_LAYER",
"CODE_REPOSITORY",
],
*,
accountIds: "builtins.list[StringFilter] | None" = None,
aggregationRequest: "AggregationRequest | None" = None,
) -> "builtins.list[AggregationResponse]":
"""
Lists aggregated finding data for your environment based on specific criteria.
Args:
aggregationType: The type of the aggregation request.
Keyword Args:
accountIds: The Amazon Web Services account IDs to retrieve finding aggregation data for.
aggregationRequest: Details of the aggregation request that is used to filter your aggregation results.
"""
paginator = self.client.get_paginator("list_finding_aggregations")
args: dict[str, Any] = dict(
aggregationType=self.serialize(aggregationType),
accountIds=self.serialize(accountIds),
aggregationRequest=self.serialize(aggregationRequest),
)
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results: "builtins.list[AggregationResponse]" = []
for _response in response_iterator:
response = ListFindingAggregationsResponse(**_response)
if response.responses is not None:
results.extend(response.responses)
else:
break
self.sessionize(results)
return cast("builtins.list[AggregationResponse]", results)
[docs] def batch_get_finding_details(
self, findingArns: "builtins.list[str]"
) -> "BatchGetFindingDetailsResponse":
"""
Gets vulnerability details for findings.
Args:
findingArns: A list of finding ARNs.
"""
args: dict[str, Any] = dict(findingArns=self.serialize(findingArns))
_response = self.client.batch_get_finding_details(
**{k: v for k, v in args.items() if v is not None}
)
response = BatchGetFindingDetailsResponse(**_response)
results: "BatchGetFindingDetailsResponse" = None
if response is not None:
results = response
self.sessionize(results)
return cast("BatchGetFindingDetailsResponse", results)
[docs]class FindingsReportManager(Boto3ModelManager):
service_name: str = "inspector2"
[docs] def create(self, model: "FindingsReport") -> str:
"""
Creates a finding report. By default only ``ACTIVE`` findings are returned in
the report. To see ``SUPRESSED`` or ``CLOSED`` findings you must specify a value
for the ``findingStatus`` filter criteria.
Args:
model: The :py:class:`FindingsReport` to create.
"""
data = model.model_dump(exclude_none=True, by_alias=True)
args = dict(
reportFormat=data.get("reportFormat"),
s3Destination=data.get("s3Destination"),
filterCriteria=data.get("filterCriteria"),
)
_response = self.client.create_findings_report(
**{k: v for k, v in args.items() if v is not None}
)
response = CreateFindingsReportResponse(**_response)
self.sessionize(response.reportId)
return cast("str", response.reportId)
[docs] def get_status(
self, *, reportId: "str | None" = None
) -> "GetFindingsReportStatusResponse":
"""
Gets the status of a findings report.
Keyword Args:
reportId: The ID of the report to retrieve the status of.
"""
args: dict[str, Any] = dict(reportId=self.serialize(reportId))
_response = self.client.get_findings_report_status(
**{k: v for k, v in args.items() if v is not None}
)
response = GetFindingsReportStatusResponse(**_response)
results: "GetFindingsReportStatusResponse" = None
if response is not None:
results = response
self.sessionize(results)
return cast("GetFindingsReportStatusResponse", results)
[docs] def create_report(
self,
reportFormat: Literal["CSV", "JSON"],
s3Destination: "Destination",
*,
filterCriteria: "FilterCriteria | None" = None,
) -> str:
"""
Creates a finding report. By default only ``ACTIVE`` findings are returned in
the report. To see ``SUPRESSED`` or ``CLOSED`` findings you must specify a value
for the ``findingStatus`` filter criteria.
Args:
reportFormat: The format to generate the report in.
s3Destination: The Amazon S3 export destination for the report.
Keyword Args:
filterCriteria: The filter criteria to apply to the results of the finding report.
"""
args: dict[str, Any] = dict(
reportFormat=self.serialize(reportFormat),
s3Destination=self.serialize(s3Destination),
filterCriteria=self.serialize(filterCriteria),
)
_response = self.client.create_findings_report(
**{k: v for k, v in args.items() if v is not None}
)
response = CreateFindingsReportResponse(**_response)
results: str = None
if response is not None:
results = response.reportId
self.sessionize(results)
return cast("str", results)
[docs] def cancel_report(self, reportId: str) -> str:
"""
Cancels the given findings report.
Args:
reportId: The ID of the report to be canceled.
"""
args: dict[str, Any] = dict(reportId=self.serialize(reportId))
_response = self.client.cancel_findings_report(
**{k: v for k, v in args.items() if v is not None}
)
response = CancelFindingsReportResponse(**_response)
results: str = None
if response is not None:
results = response.reportId
self.sessionize(results)
return cast("str", results)
[docs]class DelegatedAdminAccountManager(Boto3ModelManager):
service_name: str = "inspector2"
[docs] @list_augment_delegated_admin_accounts
def list(
self,
) -> "DelegatedAdmin | None":
"""
Lists information about the Amazon Inspector delegated administrator of your
organization.
"""
paginator = self.client.get_paginator("list_delegated_admin_accounts")
args: dict[str, Any] = dict()
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = ListDelegatedAdminAccountsResponse(**_response)
if response.delegatedAdminAccounts:
results.extend(response.delegatedAdminAccounts)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
[docs] @convert_delegated_admin
def get(
self,
) -> "DelegatedAdmin | None":
"""
Retrieves information about the Amazon Inspector delegated administrator for
your organization.
"""
args: dict[str, Any] = dict()
_response = self.client.get_delegated_admin_account(
**{k: v for k, v in args.items() if v is not None}
)
response = GetDelegatedAdminAccountResponse(**_response)
if response and response.delegatedAdmin:
self.sessionize(response.delegatedAdmin)
return response.delegatedAdmin
return None
[docs] def enable(
self, delegatedAdminAccountId: str, *, clientToken: "str | None" = None
) -> str:
"""
Enables the Amazon Inspector delegated administrator for your Organizations
organization.
Args:
delegatedAdminAccountId: The Amazon Web Services account ID of the Amazon Inspector delegated administrator.
Keyword Args:
clientToken: The idempotency token for the request.
"""
args: dict[str, Any] = dict(
delegatedAdminAccountId=self.serialize(delegatedAdminAccountId),
clientToken=self.serialize(clientToken),
)
_response = self.client.enable_delegated_admin_account(
**{k: v for k, v in args.items() if v is not None}
)
response = EnableDelegatedAdminAccountResponse(**_response)
results: str = None
if response is not None:
results = response.delegatedAdminAccountId
self.sessionize(results)
return cast("str", results)
[docs] def disable(self, delegatedAdminAccountId: str) -> str:
"""
Disables the Amazon Inspector delegated administrator for your organization.
Args:
delegatedAdminAccountId: The Amazon Web Services account ID of the current Amazon Inspector delegated administrator.
"""
args: dict[str, Any] = dict(
delegatedAdminAccountId=self.serialize(delegatedAdminAccountId)
)
_response = self.client.disable_delegated_admin_account(
**{k: v for k, v in args.items() if v is not None}
)
response = DisableDelegatedAdminAccountResponse(**_response)
results: str = None
if response is not None:
results = response.delegatedAdminAccountId
self.sessionize(results)
return cast("str", results)
[docs]class VulnerabilityManager(VulnerabilityManagerMixin, ReadonlyBoto3ModelManager):
service_name: str = "inspector2"
[docs] def list(
self, filterCriteria: "SearchVulnerabilitiesFilterCriteria"
) -> PrimaryBoto3ModelQuerySet:
"""
Lists Amazon Inspector coverage details for a specific vulnerability.
Args:
filterCriteria: The criteria used to filter the results of a vulnerability search.
"""
paginator = self.client.get_paginator("search_vulnerabilities")
args: dict[str, Any] = dict(filterCriteria=self.serialize(filterCriteria))
response_iterator = paginator.paginate(
**{k: v for k, v in args.items() if v is not None}
)
results = []
for _response in response_iterator:
if list(_response.keys()) == ["ResponseMetadata"]:
break
if "ResponseMetadata" in _response:
del _response["ResponseMetadata"]
response = SearchVulnerabilitiesResponse(**_response)
if response.vulnerabilities:
results.extend(response.vulnerabilities)
else:
if getattr(response, "NextToken", None):
continue
break
self.sessionize(results)
if results and isinstance(results[0], Boto3Model):
return PrimaryBoto3ModelQuerySet(results)
return results
# ==============
# Service Models
# ==============
[docs]class OneTimeSchedule(Boto3Model):
"""
A one time schedule.
"""
[docs]class Time(Boto3Model):
"""
The time.
"""
timeOfDay: str
"""
The time of day in 24-hour format (00:00).
"""
timezone: str
"""
The timezone.
"""
[docs]class DailySchedule(Boto3Model):
"""
A daily schedule.
"""
startTime: Time
"""
The schedule start time.
"""
[docs]class WeeklySchedule(Boto3Model):
"""
A weekly schedule.
"""
startTime: Time
"""
The weekly schedule's start time.
"""
days: "builtins.list[Literal['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']]"
"""
The weekly schedule's days.
"""
[docs]class MonthlySchedule(Boto3Model):
"""
A monthly schedule.
"""
startTime: Time
"""
The monthly schedule's start time.
"""
day: Literal["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"]
"""
The monthly schedule's day.
"""
[docs]class Schedule(Boto3Model):
"""
A schedule.
"""
oneTime: "OneTimeSchedule | None" = None
"""
The schedule's one time.
"""
daily: "DailySchedule | None" = None
"""
The schedule's daily.
"""
weekly: "WeeklySchedule | None" = None
"""
The schedule's weekly.
"""
monthly: "MonthlySchedule | None" = None
"""
The schedule's monthly.
"""
[docs]class CisTargets(Boto3Model):
"""
The CIS targets.
"""
accountIds: "builtins.list[str] | None" = Field(default_factory=list)
"""
The CIS target account ids.
"""
targetResourceTags: "dict[str, builtins.list[str]] | None" = Field(
default_factory=dict
)
"""
The CIS target resource tags.
"""
[docs]class CisScanConfiguration(PrimaryBoto3Model):
"""
The CIS scan configuration.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = CisScanConfigurationManager
Tags: dict[str, str] = Field(default_factory=dict, alias="tags")
"""
The CIS scan configuration's tags.
"""
scanConfigurationArn: str
"""
The CIS scan configuration's scan configuration ARN.
"""
ownerId: str = Field(default=None, frozen=True)
"""
The CIS scan configuration's owner ID.
"""
scanName: "str | None" = None
"""
The name of the CIS scan configuration.
"""
securityLevel: "Literal['LEVEL_1', 'LEVEL_2'] | None" = None
"""
The CIS scan configuration's security level.
"""
schedule: "Schedule | None" = None
"""
The CIS scan configuration's schedule.
"""
targets: "CisTargets | None" = None
"""
The CIS scan configuration's targets.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the
:py:attr:`scanConfigurationArn` attribute.
Returns:
The primary key of the model instance.
"""
return self.scanConfigurationArn
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the
:py:attr:`scanConfigurationArn` attribute.
Returns:
The ARN of the model instance.
"""
return self.scanConfigurationArn
@property
def name(self) -> str | None:
"""
Return the name of the model. This is the value of the :py:attr:`scanName`
attribute.
Returns:
The name of the model instance.
"""
return self.scanName
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`scanConfigurationArn` attribute.
"""
return hash(self.scanConfigurationArn)
[docs]class StringFilter(Boto3Model):
"""
An object that describes the details of a string filter.
"""
comparison: Literal["EQUALS", "PREFIX", "NOT_EQUALS"]
"""
The operator to use when comparing values in the filter.
"""
value: str
"""
The value to filter on.
"""
[docs]class DateFilter(Boto3Model):
"""
Contains details on the time range used to filter findings.
"""
startInclusive: "datetime | None" = None
"""
A timestamp representing the start of the time period filtered on.
"""
endInclusive: "datetime | None" = None
"""
A timestamp representing the end of the time period filtered on.
"""
[docs]class NumberFilter(Boto3Model):
"""
An object that describes the details of a number filter.
"""
upperInclusive: "float | None" = None
"""
The highest number to be included in the filter.
"""
lowerInclusive: "float | None" = None
"""
The lowest number to be included in the filter.
"""
[docs]class MapFilter(Boto3Model):
"""
An object that describes details of a map filter.
"""
comparison: Literal["EQUALS"]
"""
The operator to use when comparing values in the filter.
"""
key: str
"""
The tag key used in the filter.
"""
value: "str | None" = None
"""
The tag value used in the filter.
"""
[docs]class PortRangeFilter(Boto3Model):
"""
An object that describes the details of a port range filter.
"""
beginInclusive: "int | None" = None
"""
The port number the port range begins at.
"""
endInclusive: "int | None" = None
"""
The port number the port range ends at.
"""
[docs]class PackageFilter(Boto3Model):
"""
Contains information on the details of a package filter.
"""
name: "StringFilter | None" = None
"""
An object that contains details on the name of the package to filter on.
"""
version: "StringFilter | None" = None
"""
The package version to filter on.
"""
epoch: "NumberFilter | None" = None
"""
An object that contains details on the package epoch to filter on.
"""
release: "StringFilter | None" = None
"""
An object that contains details on the package release to filter on.
"""
architecture: "StringFilter | None" = None
"""
An object that contains details on the package architecture type to filter on.
"""
sourceLayerHash: "StringFilter | None" = None
"""
An object that contains details on the source layer hash to filter on.
"""
sourceLambdaLayerArn: "StringFilter | None" = None
"""
An object that describes the details of a string filter.
"""
filePath: "StringFilter | None" = None
"""
An object that contains details on the package file path to filter on.
"""
[docs]class FilterCriteria(Boto3Model):
"""
Details on the criteria used to define the filter.
"""
findingArn: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on the finding ARNs used to filter findings.
"""
awsAccountId: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details of the Amazon Web Services account IDs used to filter findings.
"""
findingType: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on the finding types used to filter findings.
"""
severity: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on the severity used to filter findings.
"""
firstObservedAt: "builtins.list[DateFilter] | None" = Field(default_factory=list)
"""
Details on the date and time a finding was first seen used to filter findings.
"""
lastObservedAt: "builtins.list[DateFilter] | None" = Field(default_factory=list)
"""
Details on the date and time a finding was last seen used to filter findings.
"""
updatedAt: "builtins.list[DateFilter] | None" = Field(default_factory=list)
"""
Details on the date and time a finding was last updated at used to filter findings.
"""
findingStatus: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on the finding status types used to filter findings.
"""
title: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on the finding title used to filter findings.
"""
inspectorScore: "builtins.list[NumberFilter] | None" = Field(default_factory=list)
"""
The Amazon Inspector score to filter on.
"""
resourceType: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on the resource types used to filter findings.
"""
resourceId: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on the resource IDs used to filter findings.
"""
resourceTags: "builtins.list[MapFilter] | None" = Field(default_factory=list)
"""
Details on the resource tags used to filter findings.
"""
ec2InstanceImageId: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Details of the Amazon EC2 instance image IDs used to filter findings.
"""
ec2InstanceVpcId: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details of the Amazon EC2 instance VPC IDs used to filter findings.
"""
ec2InstanceSubnetId: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Details of the Amazon EC2 instance subnet IDs used to filter findings.
"""
ecrImagePushedAt: "builtins.list[DateFilter] | None" = Field(default_factory=list)
"""
Details on the Amazon ECR image push date and time used to filter findings.
"""
ecrImageArchitecture: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Details of the Amazon ECR image architecture types used to filter findings.
"""
ecrImageRegistry: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on the Amazon ECR registry used to filter findings.
"""
ecrImageRepositoryName: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Details on the name of the Amazon ECR repository used to filter findings.
"""
ecrImageTags: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The tags attached to the Amazon ECR container image.
"""
ecrImageHash: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details of the Amazon ECR image hashes used to filter findings.
"""
ecrImageLastInUseAt: "builtins.list[DateFilter] | None" = Field(
default_factory=list
)
"""
Filter criteria indicating when an Amazon ECR image was last used in an Amazon ECS
cluster task or Amazon EKS cluster pod.
"""
ecrImageInUseCount: "builtins.list[NumberFilter] | None" = Field(
default_factory=list
)
"""
Filter criteria indicating when details for an Amazon ECR image include when an
Amazon ECR image is in use.
"""
portRange: "builtins.list[PortRangeFilter] | None" = Field(default_factory=list)
"""
Details on the port ranges used to filter findings.
"""
networkProtocol: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on network protocol used to filter findings.
"""
componentId: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details of the component IDs used to filter findings.
"""
componentType: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details of the component types used to filter findings.
"""
vulnerabilityId: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on the vulnerability ID used to filter findings.
"""
vulnerabilitySource: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Details on the vulnerability type used to filter findings.
"""
vendorSeverity: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on the vendor severity used to filter findings.
"""
vulnerablePackages: "builtins.list[PackageFilter] | None" = Field(
default_factory=list
)
"""
Details on the vulnerable packages used to filter findings.
"""
relatedVulnerabilities: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Details on the related vulnerabilities used to filter findings.
"""
fixAvailable: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Details on whether a fix is available through a version update.
This value can be ``YES``, ``NO``, or ``PARTIAL``. A
``PARTIAL`` fix means that some, but not all, of the packages identified in the finding have fixes available through
updated versions.
"""
lambdaFunctionName: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Filters the list of Amazon Web Services Lambda functions by the name of the
function.
"""
lambdaFunctionLayers: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Filters the list of Amazon Web Services Lambda functions by the function's
`layers <https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html>`_. A Lambda function can have up to five
layers.
"""
lambdaFunctionRuntime: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Filters the list of Amazon Web Services Lambda functions by the runtime environment
for the Lambda function.
"""
lambdaFunctionLastModifiedAt: "builtins.list[DateFilter] | None" = Field(
default_factory=list
)
"""
Filters the list of Amazon Web Services Lambda functions by the date and time that a user last updated the
configuration, in `ISO 8601 format <https://www.iso.org/iso-8601-date-and-time-format.html>`_
"""
lambdaFunctionExecutionRoleArn: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Filters the list of Amazon Web Services Lambda functions by execution role.
"""
exploitAvailable: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Filters the list of Amazon Web Services Lambda findings by the availability of
exploits.
"""
codeVulnerabilityDetectorName: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
The name of the detector used to identify a code vulnerability in a Lambda function
used to filter findings.
"""
codeVulnerabilityDetectorTags: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
The detector type tag associated with the vulnerability used to filter findings.
Detector tags group related vulnerabilities by common themes or tactics. For a list
of available tags by programming language, see
`Java tags <https://docs.aws.amazon.com/codeguru/detector-library/java/tags/>`_,
or
`Python tags <https://docs.aws.amazon.com/codeguru/detector-library/python/tags/>`_.
"""
codeVulnerabilityFilePath: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
The file path to the file in a Lambda function that contains a code vulnerability
used to filter findings.
"""
epssScore: "builtins.list[NumberFilter] | None" = Field(default_factory=list)
"""
The EPSS score used to filter findings.
"""
codeRepositoryProjectName: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Filter criteria for findings based on the project name in a code repository.
"""
codeRepositoryProviderType: "builtins.list[StringFilter] | None" = Field(
default_factory=list
)
"""
Filter criteria for findings based on the repository provider type (such as GitHub,
GitLab, etc.).
"""
[docs]class Inspector2Filter(PrimaryBoto3Model):
"""
Details about a filter.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = Inspector2FilterManager
filterArn: str = Field(default=None, alias="arn")
"""
The Amazon Resource Number (ARN) associated with this filter.
"""
filterName: str = Field(default=None, alias="name")
"""
The name of the filter.
"""
Tags: dict[str, str] = Field(default_factory=dict, alias="tags")
"""
The tags attached to the filter.
"""
ownerId: str = Field(frozen=True)
"""
The Amazon Web Services account ID of the account that created the filter.
"""
criteria: FilterCriteria = Field(frozen=True)
"""
Details on the filter criteria associated with this filter.
"""
action: Literal["NONE", "SUPPRESS"]
"""
The action that is to be applied to the findings that match the filter.
"""
createdAt: datetime = Field(frozen=True)
"""
The date and time this filter was created at.
"""
updatedAt: datetime = Field(frozen=True)
"""
The date and time the filter was last updated at.
"""
description: "str | None" = None
"""
A description of the filter.
"""
reason: "str | None" = None
"""
The reason for the filter.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the
:py:attr:`filterArn` attribute.
Returns:
The primary key of the model instance.
"""
return self.filterArn
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`filterArn`
attribute.
Returns:
The ARN of the model instance.
"""
return self.filterArn
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`filterArn` attribute.
"""
return hash(self.filterArn)
[docs]class Recommendation(Boto3Model):
"""
Details about the recommended course of action to remediate the finding.
"""
text: "str | None" = None
"""
The recommended course of action to remediate the finding.
"""
Url: "str | None" = None
"""
The URL address to the CVE remediation recommendations.
"""
[docs]class AwsEc2InstanceDetails(Boto3Model):
"""
Details of the Amazon EC2 instance involved in a finding.
"""
type: "str | None" = None
"""
The type of the Amazon EC2 instance.
"""
imageId: "str | None" = None
"""
The image ID of the Amazon EC2 instance.
"""
ipV4Addresses: "builtins.list[str] | None" = Field(default_factory=list)
"""
The IPv4 addresses of the Amazon EC2 instance.
"""
ipV6Addresses: "builtins.list[str] | None" = Field(default_factory=list)
"""
The IPv6 addresses of the Amazon EC2 instance.
"""
keyName: "str | None" = None
"""
The name of the key pair used to launch the Amazon EC2 instance.
"""
iamInstanceProfileArn: "str | None" = None
"""
The IAM instance profile ARN of the Amazon EC2 instance.
"""
vpcId: "str | None" = None
"""
The VPC ID of the Amazon EC2 instance.
"""
subnetId: "str | None" = None
"""
The subnet ID of the Amazon EC2 instance.
"""
launchedAt: "datetime | None" = None
"""
The date and time the Amazon EC2 instance was launched at.
"""
platform: "str | None" = None
"""
The platform of the Amazon EC2 instance.
"""
[docs]class AwsEcrContainerImageDetails(Boto3Model):
"""
The image details of the Amazon ECR container image.
"""
repositoryName: str
"""
The name of the repository the Amazon ECR container image resides in.
"""
imageTags: "builtins.list[str] | None" = Field(default_factory=list)
"""
The image tags attached to the Amazon ECR container image.
"""
pushedAt: "datetime | None" = None
"""
The date and time the Amazon ECR container image was pushed.
"""
author: "str | None" = None
"""
The image author of the Amazon ECR container image.
"""
architecture: "str | None" = None
"""
The architecture of the Amazon ECR container image.
"""
imageHash: str
"""
The image hash of the Amazon ECR container image.
"""
registry: str
"""
The registry for the Amazon ECR container image.
"""
platform: "str | None" = None
"""
The platform of the Amazon ECR container image.
"""
lastInUseAt: "datetime | None" = None
"""
The last time an Amazon ECR image was used in an Amazon ECS task or Amazon EKS pod.
"""
inUseCount: "int | None" = None
"""
The number of Amazon ECS tasks or Amazon EKS pods where the Amazon ECR container
image is in use.
"""
[docs]class LambdaVpcConfig(Boto3Model):
"""
The VPC security groups and subnets that are attached to an Amazon Web Services
Lambda function.
For more information, see
`VPC Settings <https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html>`_.
"""
subnetIds: "builtins.list[str] | None" = Field(default_factory=list)
"""
A list of VPC subnet IDs.
"""
securityGroupIds: "builtins.list[str] | None" = Field(default_factory=list)
"""
The VPC security groups and subnets that are attached to an Amazon Web Services
Lambda function.
For more information, see
`VPC Settings <https://docs.aws.amazon.com/lambda/latest/dg/configuration-vpc.html>`_.
"""
vpcId: "str | None" = None
"""
The ID of the VPC.
"""
[docs]class AwsLambdaFunctionDetails(Boto3Model):
"""
A summary of information about the Amazon Web Services Lambda function.
"""
functionName: str
"""
The name of the Amazon Web Services Lambda function.
"""
runtime: Literal[
"NODEJS",
"NODEJS_12_X",
"NODEJS_14_X",
"NODEJS_16_X",
"JAVA_8",
"JAVA_8_AL2",
"JAVA_11",
"PYTHON_3_7",
"PYTHON_3_8",
"PYTHON_3_9",
"UNSUPPORTED",
"NODEJS_18_X",
"GO_1_X",
"JAVA_17",
"PYTHON_3_10",
"PYTHON_3_11",
"DOTNETCORE_3_1",
"DOTNET_6",
"DOTNET_7",
"RUBY_2_7",
"RUBY_3_2",
"DOTNET_10",
"NODEJS_24_X",
]
"""
The runtime environment for the Amazon Web Services Lambda function.
"""
codeSha256: str
"""
The SHA256 hash of the Amazon Web Services Lambda function's deployment package.
"""
version: str
"""
The version of the Amazon Web Services Lambda function.
"""
executionRoleArn: str
"""
The Amazon Web Services Lambda function's execution role.
"""
layers: "builtins.list[str] | None" = Field(default_factory=list)
"""
The Amazon Web Services Lambda function's `layers <https://docs.aws.amazon.com/lambda/latest/dg/configuration-
layers.html>`_. A Lambda function can have up to five layers.
"""
vpcConfig: "LambdaVpcConfig | None" = None
"""
The Amazon Web Services Lambda function's networking configuration.
"""
packageType: "Literal['IMAGE', 'ZIP'] | None" = None
"""
The type of deployment package.
Set to ``Image`` for container image and set ``Zip`` for .zip file archive.
"""
architectures: "builtins.list[Literal['X86_64', 'ARM64']] | None" = Field(
default_factory=list
)
"""
The instruction set architecture that the Amazon Web Services Lambda function
supports.
Architecture is a string array
with one of the valid values. The default architecture value is ``x86_64``.
"""
lastModifiedAt: "datetime | None" = None
"""
The date and time that a user last updated the configuration, in `ISO 8601 format <https://www.iso.org/iso-8601-date-
and-time-format.html>`_
"""
[docs]class CodeRepositoryDetails(Boto3Model):
"""
Contains details about a code repository associated with a finding.
"""
projectName: "str | None" = None
"""
The name of the project in the code repository.
"""
integrationArn: "str | None" = None
"""
The Amazon Resource Name (ARN) of the code security integration associated with the
repository.
"""
providerType: "Literal['GITHUB', 'GITLAB_SELF_MANAGED'] | None" = None
"""
The type of repository provider (such as GitHub, GitLab, etc.).
"""
[docs]class ResourceDetails(Boto3Model):
"""
Contains details about the resource involved in the finding.
"""
awsEc2Instance: "AwsEc2InstanceDetails | None" = None
"""
An object that contains details about the Amazon EC2 instance involved in the
finding.
"""
awsEcrContainerImage: "AwsEcrContainerImageDetails | None" = None
"""
An object that contains details about the Amazon ECR container image involved in the
finding.
"""
awsLambdaFunction: "AwsLambdaFunctionDetails | None" = None
"""
A summary of the information about an Amazon Web Services Lambda function affected
by a finding.
"""
codeRepository: "CodeRepositoryDetails | None" = None
"""
Contains details about a code repository resource associated with a finding.
"""
[docs]class Inspector2Resource(Boto3Model):
"""
Details about the resource involved in a finding.
"""
Tags: dict[str, str] = Field(default_factory=dict, alias="tags")
"""
The tags attached to the resource.
"""
type: Literal[
"AWS_EC2_INSTANCE",
"AWS_ECR_CONTAINER_IMAGE",
"AWS_ECR_REPOSITORY",
"AWS_LAMBDA_FUNCTION",
"CODE_REPOSITORY",
]
"""
The type of resource.
"""
id: str
"""
The ID of the resource.
"""
partition: "str | None" = None
"""
The partition of the resource.
"""
region: "str | None" = None
"""
The Amazon Web Services Region the impacted resource is located in.
"""
details: "ResourceDetails | None" = None
"""
An object that contains details about the resource involved in a finding.
"""
[docs]class CvssScoreAdjustment(Boto3Model):
"""
Details on adjustments Amazon Inspector made to the CVSS score for a finding.
"""
metric: str
"""
The metric used to adjust the CVSS score.
"""
reason: str
"""
The reason the CVSS score has been adjustment.
"""
[docs]class CvssScoreDetails(Boto3Model):
"""
Information about the CVSS score.
"""
scoreSource: str
"""
The source for the CVSS score.
"""
cvssSource: "str | None" = None
"""
The source of the CVSS data.
"""
version: str
"""
The CVSS version used in scoring.
"""
score: float
"""
The CVSS score.
"""
scoringVector: str
"""
The vector for the CVSS score.
"""
adjustments: "builtins.list[CvssScoreAdjustment] | None" = Field(
default_factory=list
)
"""
An object that contains details about adjustment Amazon Inspector made to the CVSS
score.
"""
[docs]class InspectorScoreDetails(Boto3Model):
"""
Information about the Amazon Inspector score given to a finding.
"""
adjustedCvss: "CvssScoreDetails | None" = None
"""
An object that contains details about the CVSS score given to a finding.
"""
[docs]class PortRange(Boto3Model):
"""
Details about the port range associated with a finding.
"""
begin: int
"""
The beginning port in a port range.
"""
end: int
"""
The ending port in a port range.
"""
[docs]class Step(Boto3Model):
"""
Details about the step associated with a finding.
"""
componentId: str
"""
The component ID.
"""
componentType: str
"""
The component type.
"""
componentArn: "str | None" = None
"""
The component ARN.
The ARN can be null and is not displayed in the Amazon Web Services console.
"""
[docs]class NetworkPath(Boto3Model):
"""
Information on the network path associated with a finding.
"""
steps: "builtins.list[Step] | None" = Field(default_factory=list)
"""
The details on the steps in the network path.
"""
[docs]class NetworkReachabilityDetails(Boto3Model):
"""
Contains the details of a network reachability finding.
"""
openPortRange: PortRange
"""
An object that contains details about the open port range associated with a finding.
"""
protocol: Literal["TCP", "UDP"]
"""
The protocol associated with a finding.
"""
networkPath: NetworkPath
"""
An object that contains details about a network path associated with a finding.
"""
[docs]class VulnerablePackage(Boto3Model):
"""
Information on the vulnerable package identified by a finding.
"""
packageManager: (
Literal[
"BUNDLER",
"CARGO",
"COMPOSER",
"NPM",
"NUGET",
"PIPENV",
"POETRY",
"YARN",
"GOBINARY",
"GOMOD",
"JAR",
"OS",
"PIP",
"PYTHONPKG",
"NODEPKG",
"POM",
"GEMSPEC",
"DOTNET_CORE",
"PYTHON",
"RUST",
"RUBY",
"GOLANG",
"JAVA",
"NODEJS",
"PHP",
"DOTNET",
"DOTNET5",
"DOTNET6",
"DOTNET7",
"GENERIC",
]
| None
) = None
"""
The package manager of the vulnerable package.
"""
name: str
"""
The name of the vulnerable package.
"""
version: str
"""
The version of the vulnerable package.
"""
sourceLayerHash: "str | None" = None
"""
The source layer hash of the vulnerable package.
"""
epoch: "int | None" = None
"""
The epoch of the vulnerable package.
"""
release: "str | None" = None
"""
The release of the vulnerable package.
"""
arch: "str | None" = None
"""
The architecture of the vulnerable package.
"""
filePath: "str | None" = None
"""
The file path of the vulnerable package.
"""
fixedInVersion: "str | None" = None
"""
The version of the package that contains the vulnerability fix.
"""
remediation: "str | None" = None
"""
The code to run in your environment to update packages with a fix available.
"""
sourceLambdaLayerArn: "str | None" = None
"""
The Amazon Resource Number (ARN) of the Amazon Web Services Lambda function affected
by a finding.
"""
[docs]class CvssScore(Boto3Model):
"""
The CVSS score for a finding.
"""
baseScore: float
"""
The base CVSS score used for the finding.
"""
scoringVector: str
"""
The vector string of the CVSS score.
"""
version: str
"""
The version of CVSS used for the score.
"""
source: str
"""
The source of the CVSS score.
"""
[docs]class PackageVulnerabilityDetails(Boto3Model):
"""
Information about a package vulnerability finding.
"""
vulnerabilityId: str
"""
The ID given to this vulnerability.
"""
vulnerablePackages: "builtins.list[VulnerablePackage] | None" = Field(
default_factory=list
)
"""
The packages impacted by this vulnerability.
"""
source: str
"""
The source of the vulnerability information.
"""
cvss: "builtins.list[CvssScore] | None" = Field(default_factory=list)
"""
An object that contains details about the CVSS score of a finding.
"""
relatedVulnerabilities: "builtins.list[str] | None" = Field(default_factory=list)
"""
One or more vulnerabilities related to the one identified in this finding.
"""
sourceUrl: "str | None" = None
"""
A URL to the source of the vulnerability information.
"""
vendorSeverity: "str | None" = None
"""
The severity the vendor has given to this vulnerability type.
"""
vendorCreatedAt: "datetime | None" = None
"""
The date and time that this vulnerability was first added to the vendor's database.
"""
vendorUpdatedAt: "datetime | None" = None
"""
The date and time the vendor last updated this vulnerability in their database.
"""
referenceUrls: "builtins.list[str] | None" = Field(default_factory=list)
"""
One or more URLs that contain details about this vulnerability type.
"""
[docs]class ExploitabilityDetails(Boto3Model):
"""
The details of an exploit available for a finding discovered in your environment.
"""
lastKnownExploitAt: "datetime | None" = None
"""
The date and time of the last exploit associated with a finding discovered in your
environment.
"""
[docs]class CodeFilePath(Boto3Model):
"""
Contains information on where a code vulnerability is located in your Lambda
function.
"""
fileName: str
"""
The name of the file the code vulnerability was found in.
"""
filePath: str
"""
The file path to the code that a vulnerability was found in.
"""
startLine: int
"""
The line number of the first line of code that a vulnerability was found in.
"""
endLine: int
"""
The line number of the last line of code that a vulnerability was found in.
"""
[docs]class CodeVulnerabilityDetails(Boto3Model):
"""
Contains information on the code vulnerability identified in your Lambda function.
"""
filePath: CodeFilePath
"""
Contains information on where the code vulnerability is located in your code.
"""
detectorTags: "builtins.list[str] | None" = Field(default_factory=list)
"""
The detector tag associated with the vulnerability.
Detector tags group related vulnerabilities by common themes or tactics. For a list
of available tags by programming language, see
`Java tags <https://docs.aws.amazon.com/codeguru/detector-library/java/tags/>`_,
or
`Python tags <https://docs.aws.amazon.com/codeguru/detector-library/python/tags/>`_.
"""
referenceUrls: "builtins.list[str] | None" = Field(default_factory=list)
"""
A URL containing supporting documentation about the code vulnerability detected.
"""
ruleId: "str | None" = None
"""
The identifier for a rule that was used to detect the code vulnerability.
"""
sourceLambdaLayerArn: "str | None" = None
"""
The Amazon Resource Name (ARN) of the Lambda layer that the code vulnerability was
detected in.
"""
detectorId: str
"""
The ID for the Amazon CodeGuru detector associated with the finding.
For more information on detectors see
`Amazon CodeGuru Detector Library <https://docs.aws.amazon.com/codeguru/detector-library>`_.
"""
detectorName: str
"""
The name of the detector used to identify the code vulnerability.
For more information on detectors see
`CodeGuru Detector Library <https://docs.aws.amazon.com/codeguru/detector-library>`_.
"""
cwes: "builtins.list[str]"
"""
The Common Weakness Enumeration (CWE) item associated with the detected
vulnerability.
"""
[docs]class EpssDetails(Boto3Model):
"""
Details about the Exploit Prediction Scoring System (EPSS) score for a finding.
"""
score: "float | None" = None
"""
The EPSS score.
"""
[docs]class Finding(ReadonlyPrimaryBoto3Model):
"""
Details about an Amazon Inspector finding.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = FindingManager
findingArn: str
"""
The Amazon Resource Number (ARN) of the finding.
"""
awsAccountId: str
"""
The Amazon Web Services account ID associated with the finding.
"""
type: Literal["NETWORK_REACHABILITY", "PACKAGE_VULNERABILITY", "CODE_VULNERABILITY"]
"""
The type of the finding.
The ``type`` value determines the valid values for ``resource`` in your request. For more
information, see `Finding types <https://docs.aws.amazon.com/inspector/latest/user/findings-types.html>`_ in the Amazon
Inspector user guide.
"""
description: str
"""
The description of the finding.
"""
title: "str | None" = None
"""
The title of the finding.
"""
remediation: Remediation
"""
An object that contains the details about how to remediate a finding.
"""
severity: Literal["INFORMATIONAL", "LOW", "MEDIUM", "HIGH", "CRITICAL", "UNTRIAGED"]
"""
The severity of the finding.
``UNTRIAGED`` applies to ``PACKAGE_VULNERABILITY`` type findings that the vendor has not
assigned a severity yet. For more information, see `Severity levels for
findings <https://docs.aws.amazon.com/inspector/latest/user/findings-understanding-severity.html>`_ in the Amazon
Inspector user guide.
"""
firstObservedAt: datetime
"""
The date and time that the finding was first observed.
"""
lastObservedAt: datetime
"""
The date and time the finding was last observed.
This timestamp for this field remains unchanged until a finding is updated.
"""
updatedAt: "datetime | None" = None
"""
The date and time the finding was last updated at.
"""
status: Literal["ACTIVE", "SUPPRESSED", "CLOSED"]
"""
The status of the finding.
"""
resources: "builtins.list[Inspector2Resource]"
"""
Contains information on the resources involved in a finding.
The ``resource`` value determines the valid values for
``type`` in your request. For more information, see `Finding
types <https://docs.aws.amazon.com/inspector/latest/user/findings-types.html>`_ in the Amazon Inspector user guide.
"""
inspectorScore: "float | None" = None
"""
The Amazon Inspector score given to the finding.
"""
inspectorScoreDetails: "InspectorScoreDetails | None" = None
"""
An object that contains details of the Amazon Inspector score.
"""
networkReachabilityDetails: "NetworkReachabilityDetails | None" = None
"""
An object that contains the details of a network reachability finding.
"""
packageVulnerabilityDetails: "PackageVulnerabilityDetails | None" = None
"""
An object that contains the details of a package vulnerability finding.
"""
fixAvailable: "Literal['YES', 'NO', 'PARTIAL'] | None" = None
"""
Details on whether a fix is available through a version update.
This value can be ``YES``, ``NO``, or ``PARTIAL``. A
``PARTIAL`` fix means that some, but not all, of the packages identified in the finding have fixes available through
updated versions.
"""
exploitAvailable: "Literal['YES', 'NO'] | None" = None
"""
If a finding discovered in your environment has an exploit available.
"""
exploitabilityDetails: "ExploitabilityDetails | None" = None
"""
The details of an exploit available for a finding discovered in your environment.
"""
codeVulnerabilityDetails: "CodeVulnerabilityDetails | None" = None
"""
Details about the code vulnerability identified in a Lambda function used to filter
findings.
"""
epss: "EpssDetails | None" = None
"""
The finding's EPSS score.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the
:py:attr:`findingArn` attribute.
Returns:
The primary key of the model instance.
"""
return self.findingArn
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`findingArn`
attribute.
Returns:
The ARN of the model instance.
"""
return self.findingArn
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`findingArn` attribute.
"""
return hash(self.findingArn)
[docs]class FindingsReport(ReadonlyPrimaryBoto3Model):
manager_class: ClassVar[type[Boto3ModelManager]] = FindingsReportManager
reportId: str = None
"""
The ID of the report.
"""
reportFormat: Literal["CSV", "JSON"]
"""
The format of the report.
"""
s3Destination: "Destination"
"""
Info about the S3 bucket to which to send the report.
"""
filterCriteria: "FilterCriteria | None" = None
"""
The criteria for the report.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the
:py:attr:`reportId` attribute.
Returns:
The primary key of the model instance.
"""
return self.reportId
@property
def arn(self) -> str | None:
"""
Return the ARN of the model. This is the value of the :py:attr:`reportId`
attribute.
Returns:
The ARN of the model instance.
"""
return self.reportId
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`reportId` attribute.
"""
return hash(self.reportId)
[docs]class DelegatedAdminAccount(ReadonlyPrimaryBoto3Model):
"""
Details of the Amazon Inspector delegated administrator for your organization.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = DelegatedAdminAccountManager
status: "Literal['ENABLED', 'DISABLE_IN_PROGRESS'] | None" = None
"""
The status of the Amazon Inspector delegated administrator.
"""
accountId: "str | None" = None
"""
The Amazon Web Services account ID of the Amazon Inspector delegated administrator
for your organization.
"""
relationshipStatus: (
Literal[
"CREATED",
"INVITED",
"DISABLED",
"ENABLED",
"REMOVED",
"RESIGNED",
"DELETED",
"EMAIL_VERIFICATION_IN_PROGRESS",
"EMAIL_VERIFICATION_FAILED",
"REGION_DISABLED",
"ACCOUNT_SUSPENDED",
"CANNOT_CREATE_DETECTOR_IN_ORG_MASTER",
]
| None
) = None
"""
The status of the relationship.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the
:py:attr:`accountId` attribute.
Returns:
The primary key of the model instance.
"""
return self.accountId
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`accountId` attribute.
"""
return hash(self.accountId)
[docs] def enable(self) -> "str":
"""
Enable a delegated admin account.
"""
return (
cast("DelegatedAdminAccountManager", self.objects) # type: ignore[attr-defined]
.using(self.session)
.enable(
cast("str", self.accountId),
)
)
[docs] def disable(self) -> "str":
"""
Disable a delegated admin account.
"""
return (
cast("DelegatedAdminAccountManager", self.objects) # type: ignore[attr-defined]
.using(self.session)
.disable(
cast("str", self.accountId),
)
)
[docs]class CisaData(Boto3Model):
"""
The Cybersecurity and Infrastructure Security Agency (CISA) details for a specific
vulnerability.
"""
dateAdded: "datetime | None" = None
"""
The date and time CISA added this vulnerability to their catalogue.
"""
dateDue: "datetime | None" = None
"""
The date and time CISA expects a fix to have been provided vulnerability.
"""
action: "str | None" = None
"""
The remediation action recommended by CISA for this vulnerability.
"""
[docs]class AtigData(Boto3Model):
"""
The Amazon Web Services Threat Intel Group (ATIG) details for a specific
vulnerability.
"""
firstSeen: "datetime | None" = None
"""
The date and time this vulnerability was first observed.
"""
lastSeen: "datetime | None" = None
"""
The date and time this vulnerability was last observed.
"""
targets: "builtins.list[str] | None" = Field(default_factory=list)
"""
The commercial sectors this vulnerability targets.
"""
ttps: "builtins.list[str] | None" = Field(default_factory=list)
"""
The `MITRE ATT&CK <https://attack.mitre.org/>`_ tactics, techniques, and procedures (TTPs) associated with vulnerability.
"""
[docs]class Cvss4(Boto3Model):
"""
The Common Vulnerability Scoring System (CVSS) version 4 details for the
vulnerability.
"""
baseScore: "float | None" = None
"""
The base CVSS v4 score for the vulnerability finding, which rates the severity of
the vulnerability on a scale from 0 to 10.
"""
scoringVector: "str | None" = None
"""
The CVSS v4 scoring vector, which contains the metrics and measurements that were
used to calculate the base score.
"""
[docs]class Cvss3(Boto3Model):
"""
The Common Vulnerability Scoring System (CVSS) version 3 details for the
vulnerability.
"""
baseScore: "float | None" = None
"""
The CVSS v3 base score for the vulnerability.
"""
scoringVector: "str | None" = None
"""
The scoring vector associated with the CVSS v3 score.
"""
[docs]class Cvss2(Boto3Model):
"""
The Common Vulnerability Scoring System (CVSS) version 2 details for the
vulnerability.
"""
baseScore: "float | None" = None
"""
The CVSS v2 base score for the vulnerability.
"""
scoringVector: "str | None" = None
"""
The scoring vector associated with the CVSS v2 score.
"""
[docs]class ExploitObserved(Boto3Model):
"""
Contains information on when this exploit was observed.
"""
lastSeen: "datetime | None" = None
"""
The date an time when the exploit was last seen.
"""
firstSeen: "datetime | None" = None
"""
The date an time when the exploit was first seen.
"""
[docs]class Epss(Boto3Model):
"""
Details about the Exploit Prediction Scoring System (EPSS) score.
"""
score: "float | None" = None
"""
The Exploit Prediction Scoring System (EPSS) score.
"""
[docs]class Vulnerability(ReadonlyPrimaryBoto3Model):
"""
Contains details about a specific vulnerability Amazon Inspector can detect.
"""
manager_class: ClassVar[type[Boto3ModelManager]] = VulnerabilityManager
id: str
"""
The ID for the specific vulnerability.
"""
cwes: "builtins.list[str] | None" = Field(default_factory=list)
"""
The Common Weakness Enumeration (CWE) associated with the vulnerability.
"""
cisaData: "CisaData | None" = None
"""
An object that contains the Cybersecurity and Infrastructure Security Agency (CISA)
details for the vulnerability.
"""
source: "Literal['NVD'] | None" = None
"""
The source of the vulnerability information.
Possible results are ``RHEL``, ``AMAZON_CVE``, ``DEBIAN`` or ``NVD``.
"""
description: "str | None" = None
"""
A description of the vulnerability.
"""
atigData: "AtigData | None" = None
"""
An object that contains information about the Amazon Web Services Threat Intel Group
(ATIG) details for the vulnerability.
"""
vendorSeverity: "str | None" = None
"""
The severity assigned by the vendor.
"""
cvss4: "Cvss4 | None" = None
"""
An object that contains the Common Vulnerability Scoring System (CVSS) Version 4
details for the vulnerability.
"""
cvss3: "Cvss3 | None" = None
"""
An object that contains the Common Vulnerability Scoring System (CVSS) Version 3
details for the vulnerability.
"""
relatedVulnerabilities: "builtins.list[str] | None" = Field(default_factory=list)
"""
A list of related vulnerabilities.
"""
cvss2: "Cvss2 | None" = None
"""
An object that contains the Common Vulnerability Scoring System (CVSS) Version 2
details for the vulnerability.
"""
vendorCreatedAt: "datetime | None" = None
"""
The date and time when the vendor created this vulnerability.
"""
vendorUpdatedAt: "datetime | None" = None
"""
The date and time when the vendor last updated this vulnerability.
"""
sourceUrl: "str | None" = None
"""
A link to the official source material for this vulnerability.
"""
referenceUrls: "builtins.list[str] | None" = Field(default_factory=list)
"""
Links to various resources with more information on this vulnerability.
"""
exploitObserved: "ExploitObserved | None" = None
"""
An object that contains details on when the exploit was observed.
"""
detectionPlatforms: "builtins.list[str] | None" = Field(default_factory=list)
"""
Platforms that the vulnerability can be detected on.
"""
epss: "Epss | None" = None
"""
An object that contains the Exploit Prediction Scoring System (EPSS) score for a
vulnerability.
"""
@property
def pk(self) -> str | None:
"""
Return the primary key of the model. This is the value of the :py:attr:`id`
attribute.
Returns:
The primary key of the model instance.
"""
return self.id
def __hash__(self) -> int:
"""
Return the hash of the model.
This is the value of the
:py:attr:`id` attribute.
"""
return hash(self.id)
# =======================
# Request/Response Models
# =======================
[docs]class CreateCisTargets(Boto3Model):
"""
Creates CIS targets.
"""
accountIds: "builtins.list[str]"
"""
The CIS target account ids.
"""
targetResourceTags: dict[str, builtins.list[str]]
"""
The CIS target resource tags.
"""
[docs]class CreateCisScanConfigurationResponse(Boto3Model):
scanConfigurationArn: "str | None" = None
"""
The scan configuration ARN for the CIS scan configuration.
"""
[docs]class DeleteCisScanConfigurationResponse(Boto3Model):
scanConfigurationArn: str
"""
The ARN of the CIS scan configuration.
"""
[docs]class UpdateCisTargets(Boto3Model):
"""
Updates CIS targets.
"""
accountIds: "builtins.list[str] | None" = Field(default_factory=list)
"""
The target account ids.
"""
targetResourceTags: "dict[str, builtins.list[str]] | None" = Field(
default_factory=dict
)
"""
The target resource tags.
"""
[docs]class UpdateCisScanConfigurationResponse(Boto3Model):
scanConfigurationArn: str
"""
The CIS scan configuration ARN.
"""
[docs]class CisStringFilter(Boto3Model):
"""
The CIS string filter.
"""
comparison: Literal["EQUALS", "PREFIX", "NOT_EQUALS"]
"""
The comparison value of the CIS string filter.
"""
value: str
"""
The value of the CIS string filter.
"""
[docs]class TagFilter(Boto3Model):
"""
The tag filter.
"""
comparison: Literal["EQUALS"]
"""
The tag filter comparison value.
"""
key: str
"""
The tag filter key.
"""
value: str
"""
The tag filter value.
"""
[docs]class ListCisScanConfigurationsFilterCriteria(Boto3Model):
"""
A list of CIS scan configurations filter criteria.
"""
scanNameFilters: "builtins.list[CisStringFilter] | None" = Field(
default_factory=list
)
"""
The list of scan name filters.
"""
targetResourceTagFilters: "builtins.list[TagFilter] | None" = Field(
default_factory=list
)
"""
The list of target resource tag filters.
"""
scanConfigurationArnFilters: "builtins.list[CisStringFilter] | None" = Field(
default_factory=list
)
"""
The list of scan configuration ARN filters.
"""
[docs]class ListCisScanConfigurationsResponse(Boto3Model):
scanConfigurations: "builtins.list[CisScanConfiguration] | None" = Field(
default_factory=list
)
"""
The CIS scan configuration scan configurations.
"""
nextToken: "str | None" = None
"""
The pagination token from a previous request that's used to retrieve the next page
of results.
"""
[docs]class CreateFilterResponse(Boto3Model):
arn: str
"""
The Amazon Resource Number (ARN) of the successfully created filter.
"""
[docs]class DeleteFilterResponse(Boto3Model):
arn: str
"""
The Amazon Resource Number (ARN) of the filter that has been deleted.
"""
[docs]class UpdateFilterResponse(Boto3Model):
arn: str
"""
The Amazon Resource Number (ARN) of the successfully updated filter.
"""
[docs]class ListFiltersResponse(Boto3Model):
filters: "builtins.list[Inspector2Filter]"
"""
Contains details on the filters associated with your account.
"""
nextToken: "str | None" = None
"""
A token to use for paginating results that are returned in the response.
Set the value of this parameter to null for the
first request to a list action. For subsequent calls, use the ``NextToken`` value returned from the previous request to
continue listing results after the first page.
"""
[docs]class SortCriteria(Boto3Model):
"""
Details about the criteria used to sort finding results.
"""
field: Literal[
"AWS_ACCOUNT_ID",
"FINDING_TYPE",
"SEVERITY",
"FIRST_OBSERVED_AT",
"LAST_OBSERVED_AT",
"FINDING_STATUS",
"RESOURCE_TYPE",
"ECR_IMAGE_PUSHED_AT",
"ECR_IMAGE_REPOSITORY_NAME",
"ECR_IMAGE_REGISTRY",
"NETWORK_PROTOCOL",
"COMPONENT_TYPE",
"VULNERABILITY_ID",
"VULNERABILITY_SOURCE",
"INSPECTOR_SCORE",
"VENDOR_SEVERITY",
"EPSS_SCORE",
]
"""
The finding detail field by which results are sorted.
"""
sortOrder: Literal["ASC", "DESC"]
"""
The order by which findings are sorted.
"""
[docs]class ListFindingsResponse(Boto3Model):
nextToken: "str | None" = None
"""
A token to use for paginating results that are returned in the response.
Set the value of this parameter to null for the
first request to a list action. For subsequent calls, use the ``NextToken`` value returned from the previous request to
continue listing results after the first page.
"""
findings: "builtins.list[Finding] | None" = Field(default_factory=list)
"""
Contains details on the findings in your environment.
"""
[docs]class AccountAggregation(Boto3Model):
"""
An object that contains details about an aggregation response based on Amazon Web
Services accounts.
"""
findingType: "Literal['NETWORK_REACHABILITY', 'PACKAGE_VULNERABILITY', 'CODE_VULNERABILITY'] | None" = None
"""
The type of finding.
"""
resourceType: "Literal['AWS_EC2_INSTANCE', 'AWS_ECR_CONTAINER_IMAGE', 'AWS_LAMBDA_FUNCTION', 'CODE_REPOSITORY'] | None" = None
"""
The type of resource.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The sort order (ascending or descending).
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL'] | None" = None
"""
The value to sort by.
"""
[docs]class AmiAggregation(Boto3Model):
"""
The details that define an aggregation based on Amazon machine images (AMIs).
"""
amis: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The IDs of AMIs to aggregate findings for.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The order to sort results by.
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL', 'AFFECTED_INSTANCES'] | None" = None
"""
The value to sort results by.
"""
[docs]class AwsEcrContainerAggregation(Boto3Model):
"""
An aggregation of information about Amazon ECR containers.
"""
resourceIds: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The container resource IDs.
"""
imageShas: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The image SHA values.
"""
repositories: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The container repositories.
"""
architectures: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The architecture of the containers.
"""
imageTags: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The image tags.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The sort order (ascending or descending).
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL'] | None" = None
"""
The value to sort by.
"""
lastInUseAt: "builtins.list[DateFilter] | None" = Field(default_factory=list)
"""
The last time an Amazon ECR image was used in an Amazon ECS task or Amazon EKS pod.
"""
inUseCount: "builtins.list[NumberFilter] | None" = Field(default_factory=list)
"""
The number of Amazon ECS tasks or Amazon EKS pods where the Amazon ECR container
image is in use.
"""
[docs]class Ec2InstanceAggregation(Boto3Model):
"""
The details that define an aggregation based on Amazon EC2 instances.
"""
amis: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The AMI IDs associated with the Amazon EC2 instances to aggregate findings for.
"""
operatingSystems: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The operating system types to aggregate findings for.
Valid values must be uppercase and underscore separated, examples
are ``ORACLE_LINUX_7`` and ``ALPINE_LINUX_3_8``.
"""
instanceIds: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The Amazon EC2 instance IDs to aggregate findings for.
"""
instanceTags: "builtins.list[MapFilter] | None" = Field(default_factory=list)
"""
The Amazon EC2 instance tags to aggregate findings for.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The order to sort results by.
"""
sortBy: "Literal['NETWORK_FINDINGS', 'CRITICAL', 'HIGH', 'ALL'] | None" = None
"""
The value to sort results by.
"""
[docs]class FindingTypeAggregation(Boto3Model):
"""
The details that define an aggregation based on finding type.
"""
findingType: "Literal['NETWORK_REACHABILITY', 'PACKAGE_VULNERABILITY', 'CODE_VULNERABILITY'] | None" = None
"""
The finding type to aggregate.
"""
resourceType: "Literal['AWS_EC2_INSTANCE', 'AWS_ECR_CONTAINER_IMAGE', 'AWS_LAMBDA_FUNCTION', 'CODE_REPOSITORY'] | None" = None
"""
The resource type to aggregate.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The order to sort results by.
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL'] | None" = None
"""
The value to sort results by.
"""
[docs]class ImageLayerAggregation(Boto3Model):
"""
The details that define an aggregation based on container image layers.
"""
repositories: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The repository associated with the container image hosting the layers.
"""
resourceIds: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The ID of the container image layer.
"""
layerHashes: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The hashes associated with the layers.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The order to sort results by.
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL'] | None" = None
"""
The value to sort results by.
"""
[docs]class PackageAggregation(Boto3Model):
"""
The details that define an aggregation based on operating system package type.
"""
packageNames: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The names of packages to aggregate findings on.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The order to sort results by.
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL'] | None" = None
"""
The value to sort results by.
"""
[docs]class RepositoryAggregation(Boto3Model):
"""
The details that define an aggregation based on repository.
"""
repositories: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The names of repositories to aggregate findings on.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The order to sort results by.
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL', 'AFFECTED_IMAGES'] | None" = None
"""
The value to sort results by.
"""
[docs]class TitleAggregation(Boto3Model):
"""
The details that define an aggregation based on finding title.
"""
titles: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The finding titles to aggregate on.
"""
vulnerabilityIds: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The vulnerability IDs of the findings.
"""
resourceType: "Literal['AWS_EC2_INSTANCE', 'AWS_ECR_CONTAINER_IMAGE', 'AWS_LAMBDA_FUNCTION', 'CODE_REPOSITORY'] | None" = None
"""
The resource type to aggregate on.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The order to sort results by.
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL'] | None" = None
"""
The value to sort results by.
"""
findingType: "Literal['NETWORK_REACHABILITY', 'PACKAGE_VULNERABILITY', 'CODE_VULNERABILITY'] | None" = None
"""
The type of finding to aggregate on.
"""
[docs]class LambdaLayerAggregation(Boto3Model):
"""
The details that define a findings aggregation based on an Amazon Web Services
Lambda function's layers.
"""
functionNames: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The names of the Amazon Web Services Lambda functions associated with the layers.
"""
resourceIds: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The resource IDs for the Amazon Web Services Lambda function layers.
"""
layerArns: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The Amazon Resource Name (ARN) of the Amazon Web Services Lambda function layer.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The order to use for sorting the results.
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL'] | None" = None
"""
The finding severity to use for sorting the results.
"""
[docs]class LambdaFunctionAggregation(Boto3Model):
"""
The details that define a findings aggregation based on Amazon Web Services Lambda
functions.
"""
resourceIds: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The resource IDs to include in the aggregation results.
"""
functionNames: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The Amazon Web Services Lambda function names to include in the aggregation results.
"""
runtimes: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
Returns findings aggregated by Amazon Web Services Lambda function runtime
environments.
"""
functionTags: "builtins.list[MapFilter] | None" = Field(default_factory=list)
"""
The tags to include in the aggregation results.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The order to use for sorting the results.
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL'] | None" = None
"""
The finding severity to use for sorting the results.
"""
[docs]class CodeRepositoryAggregation(Boto3Model):
"""
The details that define an aggregation based on code repositories.
"""
projectNames: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The project names to include in the aggregation results.
"""
providerTypes: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The repository provider types to include in the aggregation results.
"""
sortOrder: "Literal['ASC', 'DESC'] | None" = None
"""
The order to sort results by (ascending or descending) in the code repository
aggregation.
"""
sortBy: "Literal['CRITICAL', 'HIGH', 'ALL'] | None" = None
"""
The value to sort results by in the code repository aggregation.
"""
resourceIds: "builtins.list[StringFilter] | None" = Field(default_factory=list)
"""
The resource IDs to include in the aggregation results.
"""
[docs]class AggregationRequest(Boto3Model):
"""
Contains details about an aggregation request.
"""
accountAggregation: "AccountAggregation | None" = None
"""
An object that contains details about an aggregation request based on Amazon Web
Services account IDs.
"""
amiAggregation: "AmiAggregation | None" = None
"""
An object that contains details about an aggregation request based on Amazon Machine
Images (AMIs).
"""
awsEcrContainerAggregation: "AwsEcrContainerAggregation | None" = None
"""
An object that contains details about an aggregation request based on Amazon ECR
container images.
"""
ec2InstanceAggregation: "Ec2InstanceAggregation | None" = None
"""
An object that contains details about an aggregation request based on Amazon EC2
instances.
"""
findingTypeAggregation: "FindingTypeAggregation | None" = None
"""
An object that contains details about an aggregation request based on finding types.
"""
imageLayerAggregation: "ImageLayerAggregation | None" = None
"""
An object that contains details about an aggregation request based on container
image layers.
"""
packageAggregation: "PackageAggregation | None" = None
"""
An object that contains details about an aggregation request based on operating
system package type.
"""
repositoryAggregation: "RepositoryAggregation | None" = None
"""
An object that contains details about an aggregation request based on Amazon ECR
repositories.
"""
titleAggregation: "TitleAggregation | None" = None
"""
An object that contains details about an aggregation request based on finding title.
"""
lambdaLayerAggregation: "LambdaLayerAggregation | None" = None
"""
Returns an object with findings aggregated by Amazon Web Services Lambda layer.
"""
lambdaFunctionAggregation: "LambdaFunctionAggregation | None" = None
"""
Returns an object with findings aggregated by Amazon Web Services Lambda function.
"""
codeRepositoryAggregation: "CodeRepositoryAggregation | None" = None
"""
An object that contains details about an aggregation request based on code
repositories.
"""
[docs]class SeverityCounts(Boto3Model):
"""
An object that contains the counts of aggregated finding per severity.
"""
all: "int | None" = None
"""
The total count of findings from all severities.
"""
medium: "int | None" = None
"""
The total count of medium severity findings.
"""
high: "int | None" = None
"""
The total count of high severity findings.
"""
critical: "int | None" = None
"""
The total count of critical severity findings.
"""
[docs]class AccountAggregationResponse(Boto3Model):
"""
An aggregation of findings by Amazon Web Services account ID.
"""
accountId: "str | None" = None
"""
The Amazon Web Services account ID.
"""
severityCounts: "SeverityCounts | None" = None
"""
The number of findings by severity.
"""
exploitAvailableCount: "int | None" = None
"""
The number of findings that have an exploit available.
"""
fixAvailableCount: "int | None" = None
"""
Details about the number of fixes.
"""
[docs]class AmiAggregationResponse(Boto3Model):
"""
A response that contains the results of a finding aggregation by AMI.
"""
ami: str
"""
The ID of the AMI that findings were aggregated for.
"""
accountId: "str | None" = None
"""
The Amazon Web Services account ID for the AMI.
"""
severityCounts: "SeverityCounts | None" = None
"""
An object that contains the count of matched findings per severity.
"""
affectedInstances: "int | None" = None
"""
The IDs of Amazon EC2 instances using this AMI.
"""
[docs]class AwsEcrContainerAggregationResponse(Boto3Model):
"""
An aggregation of information about Amazon ECR containers.
"""
resourceId: str
"""
The resource ID of the container.
"""
imageSha: "str | None" = None
"""
The SHA value of the container image.
"""
repository: "str | None" = None
"""
The container repository.
"""
architecture: "str | None" = None
"""
The architecture of the container.
"""
imageTags: "builtins.list[str] | None" = Field(default_factory=list)
"""
The container image stags.
"""
accountId: "str | None" = None
"""
The Amazon Web Services account ID of the account that owns the container.
"""
severityCounts: "SeverityCounts | None" = None
"""
The number of finding by severity.
"""
lastInUseAt: "datetime | None" = None
"""
The last time an Amazon ECR image was used in an Amazon ECS task or Amazon EKS pod.
"""
inUseCount: "int | None" = None
"""
The number of Amazon ECS tasks or Amazon EKS pods where the Amazon ECR container
image is in use.
"""
[docs]class Ec2InstanceAggregationResponse(Boto3Model):
"""
A response that contains the results of a finding aggregation by Amazon EC2
instance.
"""
instanceId: str
"""
The Amazon EC2 instance ID.
"""
ami: "str | None" = None
"""
The Amazon Machine Image (AMI) of the Amazon EC2 instance.
"""
operatingSystem: "str | None" = None
"""
The operating system of the Amazon EC2 instance.
"""
instanceTags: "dict[str, str] | None" = Field(default_factory=dict)
"""
The tags attached to the instance.
"""
accountId: "str | None" = None
"""
The Amazon Web Services account for the Amazon EC2 instance.
"""
severityCounts: "SeverityCounts | None" = None
"""
An object that contains the count of matched findings per severity.
"""
networkFindings: "int | None" = None
"""
The number of network findings for the Amazon EC2 instance.
"""
[docs]class FindingTypeAggregationResponse(Boto3Model):
"""
A response that contains the results of a finding type aggregation.
"""
accountId: "str | None" = None
"""
The ID of the Amazon Web Services account associated with the findings.
"""
severityCounts: "SeverityCounts | None" = None
"""
The value to sort results by.
"""
exploitAvailableCount: "int | None" = None
"""
The number of findings that have an exploit available.
"""
fixAvailableCount: "int | None" = None
"""
Details about the number of fixes.
"""
[docs]class ImageLayerAggregationResponse(Boto3Model):
"""
A response that contains the results of a finding aggregation by image layer.
"""
repository: str
"""
The repository the layer resides in.
"""
resourceId: str
"""
The resource ID of the container image layer.
"""
layerHash: str
"""
The layer hash.
"""
accountId: str
"""
The ID of the Amazon Web Services account that owns the container image hosting the
layer image.
"""
severityCounts: "SeverityCounts | None" = None
"""
An object that represents the count of matched findings per severity.
"""
[docs]class PackageAggregationResponse(Boto3Model):
"""
A response that contains the results of a finding aggregation by image layer.
"""
packageName: str
"""
The name of the operating system package.
"""
accountId: "str | None" = None
"""
The ID of the Amazon Web Services account associated with the findings.
"""
severityCounts: "SeverityCounts | None" = None
"""
An object that contains the count of matched findings per severity.
"""
[docs]class RepositoryAggregationResponse(Boto3Model):
"""
A response that contains details on the results of a finding aggregation by
repository.
"""
repository: str
"""
The name of the repository associated with the findings.
"""
accountId: "str | None" = None
"""
The ID of the Amazon Web Services account associated with the findings.
"""
severityCounts: "SeverityCounts | None" = None
"""
An object that represent the count of matched findings per severity.
"""
affectedImages: "int | None" = None
"""
The number of container images impacted by the findings.
"""
[docs]class TitleAggregationResponse(Boto3Model):
"""
A response that contains details on the results of a finding aggregation by title.
"""
title: str
"""
The title that the findings were aggregated on.
"""
vulnerabilityId: "str | None" = None
"""
The vulnerability ID of the finding.
"""
accountId: "str | None" = None
"""
The ID of the Amazon Web Services account associated with the findings.
"""
severityCounts: "SeverityCounts | None" = None
"""
An object that represent the count of matched findings per severity.
"""
[docs]class LambdaLayerAggregationResponse(Boto3Model):
"""
A response that contains the results of an Amazon Web Services Lambda function layer
finding aggregation.
"""
functionName: str
"""
The names of the Amazon Web Services Lambda functions associated with the layers.
"""
resourceId: str
"""
The Resource ID of the Amazon Web Services Lambda function layer.
"""
layerArn: str
"""
The Amazon Resource Name (ARN) of the Amazon Web Services Lambda function layer.
"""
accountId: str
"""
The account ID of the Amazon Web Services Lambda function layer.
"""
severityCounts: "SeverityCounts | None" = None
"""
An object that contains the counts of aggregated finding per severity.
"""
[docs]class LambdaFunctionAggregationResponse(Boto3Model):
"""
A response that contains the results of an Amazon Web Services Lambda function
finding aggregation.
"""
resourceId: str
"""
The resource IDs included in the aggregation results.
"""
functionName: "str | None" = None
"""
The Amazon Web Services Lambda function names included in the aggregation results.
"""
runtime: "str | None" = None
"""
The runtimes included in the aggregation results.
"""
lambdaTags: "dict[str, str] | None" = Field(default_factory=dict)
"""
The tags included in the aggregation results.
"""
accountId: "str | None" = None
"""
The ID of the Amazon Web Services account that owns the Amazon Web Services Lambda
function.
"""
severityCounts: "SeverityCounts | None" = None
"""
An object that contains the counts of aggregated finding per severity.
"""
lastModifiedAt: "datetime | None" = None
"""
The date that the Amazon Web Services Lambda function included in the aggregation
results was last changed.
"""
[docs]class CodeRepositoryAggregationResponse(Boto3Model):
"""
A response that contains the results of a finding aggregation by code repository.
"""
projectNames: str
"""
The names of the projects associated with the code repository.
"""
providerType: "str | None" = None
"""
The type of repository provider for the code repository.
"""
severityCounts: "SeverityCounts | None" = None
"""
An object that contains the counts of aggregated finding per severity.
"""
exploitAvailableActiveFindingsCount: "int | None" = None
"""
The number of active findings that have an exploit available for the code
repository.
"""
fixAvailableActiveFindingsCount: "int | None" = None
"""
The number of active findings that have a fix available for the code repository.
"""
accountId: "str | None" = None
"""
The Amazon Web Services account ID associated with the code repository.
"""
resourceId: "str | None" = None
"""
The resource ID of the code repository.
"""
[docs]class AggregationResponse(Boto3Model):
"""
A structure that contains details about the results of an aggregation type.
"""
accountAggregation: "AccountAggregationResponse | None" = None
"""
An object that contains details about an aggregation response based on Amazon Web
Services account IDs.
"""
amiAggregation: "AmiAggregationResponse | None" = None
"""
An object that contains details about an aggregation response based on Amazon
Machine Images (AMIs).
"""
awsEcrContainerAggregation: "AwsEcrContainerAggregationResponse | None" = None
"""
An object that contains details about an aggregation response based on Amazon ECR
container images.
"""
ec2InstanceAggregation: "Ec2InstanceAggregationResponse | None" = None
"""
An object that contains details about an aggregation response based on Amazon EC2
instances.
"""
findingTypeAggregation: "FindingTypeAggregationResponse | None" = None
"""
An object that contains details about an aggregation response based on finding
types.
"""
imageLayerAggregation: "ImageLayerAggregationResponse | None" = None
"""
An object that contains details about an aggregation response based on container
image layers.
"""
packageAggregation: "PackageAggregationResponse | None" = None
"""
An object that contains details about an aggregation response based on operating
system package type.
"""
repositoryAggregation: "RepositoryAggregationResponse | None" = None
"""
An object that contains details about an aggregation response based on Amazon ECR
repositories.
"""
titleAggregation: "TitleAggregationResponse | None" = None
"""
An object that contains details about an aggregation response based on finding
title.
"""
lambdaLayerAggregation: "LambdaLayerAggregationResponse | None" = None
"""
An aggregation of findings by Amazon Web Services Lambda layer.
"""
lambdaFunctionAggregation: "LambdaFunctionAggregationResponse | None" = None
"""
An aggregation of findings by Amazon Web Services Lambda function.
"""
codeRepositoryAggregation: "CodeRepositoryAggregationResponse | None" = None
"""
An object that contains details about an aggregation response based on code
repositories.
"""
[docs]class ListFindingAggregationsResponse(Boto3Model):
aggregationType: Literal[
"FINDING_TYPE",
"PACKAGE",
"TITLE",
"REPOSITORY",
"AMI",
"AWS_EC2_INSTANCE",
"AWS_ECR_CONTAINER",
"IMAGE_LAYER",
"ACCOUNT",
"AWS_LAMBDA_FUNCTION",
"LAMBDA_LAYER",
"CODE_REPOSITORY",
]
"""
The type of aggregation to perform.
"""
responses: "builtins.list[AggregationResponse] | None" = Field(default_factory=list)
"""
Objects that contain the results of an aggregation operation.
"""
nextToken: "str | None" = None
"""
A token to use for paginating results that are returned in the response.
Set the value of this parameter to null for the
first request to a list action. For subsequent calls, use the ``NextToken`` value returned from the previous request to
continue listing results after the first page.
"""
[docs]class Evidence(Boto3Model):
"""
Details of the evidence for a vulnerability identified in a finding.
"""
evidenceRule: "str | None" = None
"""
The evidence rule.
"""
evidenceDetail: "str | None" = None
"""
The evidence details.
"""
severity: "str | None" = None
"""
The evidence severity.
"""
[docs]class FindingDetail(Boto3Model):
"""
Details of the vulnerability identified in a finding.
"""
findingArn: "str | None" = None
"""
The finding ARN that the vulnerability details are associated with.
"""
cisaData: "CisaData | None" = None
"""
The Cybersecurity and Infrastructure Security Agency (CISA) details for a specific
vulnerability.
"""
riskScore: "int | None" = None
"""
The risk score of the vulnerability.
"""
evidences: "builtins.list[Evidence] | None" = Field(default_factory=list)
"""
Information on the evidence of the vulnerability.
"""
ttps: "builtins.list[str] | None" = Field(default_factory=list)
"""
The MITRE adversary tactics, techniques, or procedures (TTPs) associated with the
vulnerability.
"""
tools: "builtins.list[str] | None" = Field(default_factory=list)
"""
The known malware tools or kits that can exploit the vulnerability.
"""
exploitObserved: "ExploitObserved | None" = None
"""
Contains information on when this exploit was observed.
"""
referenceUrls: "builtins.list[str] | None" = Field(default_factory=list)
"""
The reference URLs for the vulnerability data.
"""
cwes: "builtins.list[str] | None" = Field(default_factory=list)
"""
The Common Weakness Enumerations (CWEs) associated with the vulnerability.
"""
epssScore: "float | None" = None
"""
The Exploit Prediction Scoring System (EPSS) score of the vulnerability.
"""
[docs]class FindingDetailsError(Boto3Model):
"""
Details about an error encountered when trying to return vulnerability data for a
finding.
"""
findingArn: str
"""
The finding ARN that returned an error.
"""
errorCode: Literal[
"INTERNAL_ERROR", "ACCESS_DENIED", "FINDING_DETAILS_NOT_FOUND", "INVALID_INPUT"
]
"""
The error code.
"""
errorMessage: str
"""
The error message.
"""
[docs]class BatchGetFindingDetailsResponse(Boto3Model):
findingDetails: "builtins.list[FindingDetail] | None" = Field(default_factory=list)
"""
A finding's vulnerability details.
"""
errors: "builtins.list[FindingDetailsError] | None" = Field(default_factory=list)
"""
Error information for findings that details could not be returned for.
"""
[docs]class Destination(Boto3Model):
"""
Contains details of the Amazon S3 bucket and KMS key used to export findings.
"""
bucketName: str
"""
The name of the Amazon S3 bucket to export findings to.
"""
keyPrefix: "str | None" = None
"""
The prefix that the findings will be written under.
"""
kmsKeyArn: str
"""
The ARN of the KMS key used to encrypt data when exporting findings.
"""
[docs]class CreateFindingsReportResponse(Boto3Model):
reportId: "str | None" = None
"""
The ID of the report.
"""
[docs]class GetFindingsReportStatusResponse(Boto3Model):
reportId: "str | None" = None
"""
The ID of the report.
"""
status: "Literal['SUCCEEDED', 'IN_PROGRESS', 'CANCELLED', 'FAILED'] | None" = None
"""
The status of the report.
"""
errorCode: "Literal['INTERNAL_ERROR', 'INVALID_PERMISSIONS', 'NO_FINDINGS_FOUND', 'BUCKET_NOT_FOUND', 'INCOMPATIBLE_BUCKET_REGION', 'MALFORMED_KMS_KEY'] | None" = None
"""
The error code of the report.
"""
errorMessage: "str | None" = None
"""
The error message of the report.
"""
destination: "Destination | None" = None
"""
The destination of the report.
"""
filterCriteria: "FilterCriteria | None" = None
"""
The filter criteria associated with the report.
"""
[docs]class CancelFindingsReportResponse(Boto3Model):
reportId: str
"""
The ID of the canceled report.
"""
[docs]class ListDelegatedAdminAccountsResponse(Boto3Model):
delegatedAdminAccounts: "builtins.list[DelegatedAdminAccount] | None" = Field(
default_factory=list
)
"""
Details of the Amazon Inspector delegated administrator of your organization.
"""
nextToken: "str | None" = None
"""
A token to use for paginating results that are returned in the response.
Set the value of this parameter to null for the
first request to a list action. For subsequent calls, use the ``NextToken`` value returned from the previous request to
continue listing results after the first page.
"""
[docs]class DelegatedAdmin(Boto3Model):
"""
Details of the Amazon Inspector delegated administrator for your organization.
"""
accountId: "str | None" = None
"""
The Amazon Web Services account ID of the Amazon Inspector delegated administrator
for your organization.
"""
relationshipStatus: "Literal['CREATED', 'INVITED', 'DISABLED', 'ENABLED', 'REMOVED', 'RESIGNED', 'DELETED', 'EMAIL_VERIFICATION_IN_PROGRESS', 'EMAIL_VERIFICATION_FAILED', 'REGION_DISABLED', 'ACCOUNT_SUSPENDED', 'CANNOT_CREATE_DETECTOR_IN_ORG_MASTER'] | None" = None
"""
The status of the Amazon Inspector delegated administrator.
"""
[docs]class GetDelegatedAdminAccountResponse(Boto3Model):
delegatedAdmin: "DelegatedAdmin | None" = None
"""
The Amazon Web Services account ID of the Amazon Inspector delegated administrator.
"""
[docs]class EnableDelegatedAdminAccountResponse(Boto3Model):
delegatedAdminAccountId: str
"""
The Amazon Web Services account ID of the successfully Amazon Inspector delegated
administrator.
"""
[docs]class DisableDelegatedAdminAccountResponse(Boto3Model):
delegatedAdminAccountId: str
"""
The Amazon Web Services account ID of the successfully disabled delegated
administrator.
"""
[docs]class SearchVulnerabilitiesFilterCriteria(Boto3Model):
"""
Details on the criteria used to define the filter for a vulnerability search.
"""
vulnerabilityIds: "builtins.list[str]"
"""
The IDs for specific vulnerabilities.
"""
[docs]class SearchVulnerabilitiesResponse(Boto3Model):
vulnerabilities: "builtins.list[Vulnerability]"
"""
Details about the listed vulnerability.
"""
nextToken: "str | None" = None
"""
The pagination parameter to be used on the next list operation to retrieve more
items.
"""