diff --git a/clients/client-inspector2/README.md b/clients/client-inspector2/README.md index 330e79d9230a..8664c96e1f03 100644 --- a/clients/client-inspector2/README.md +++ b/clients/client-inspector2/README.md @@ -446,6 +446,14 @@ ListUsageTotals [Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-inspector2/classes/listusagetotalscommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-inspector2/interfaces/listusagetotalscommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-inspector2/interfaces/listusagetotalscommandoutput.html) + +
+ +SearchVulnerabilities + + +[Command API Reference](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-inspector2/classes/searchvulnerabilitiescommand.html) / [Input](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-inspector2/interfaces/searchvulnerabilitiescommandinput.html) / [Output](https://docs.aws.amazon.com/AWSJavaScriptSDK/v3/latest/clients/client-inspector2/interfaces/searchvulnerabilitiescommandoutput.html) +
diff --git a/clients/client-inspector2/src/Inspector2.ts b/clients/client-inspector2/src/Inspector2.ts index 3ab06b540a20..b79bc062c537 100644 --- a/clients/client-inspector2/src/Inspector2.ts +++ b/clients/client-inspector2/src/Inspector2.ts @@ -132,6 +132,11 @@ import { ListUsageTotalsCommandInput, ListUsageTotalsCommandOutput, } from "./commands/ListUsageTotalsCommand"; +import { + SearchVulnerabilitiesCommand, + SearchVulnerabilitiesCommandInput, + SearchVulnerabilitiesCommandOutput, +} from "./commands/SearchVulnerabilitiesCommand"; import { TagResourceCommand, TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommand, @@ -196,6 +201,7 @@ const commands = { ListMembersCommand, ListTagsForResourceCommand, ListUsageTotalsCommand, + SearchVulnerabilitiesCommand, TagResourceCommand, UntagResourceCommand, UpdateConfigurationCommand, @@ -656,6 +662,23 @@ export interface Inspector2 { cb: (err: any, data?: ListUsageTotalsCommandOutput) => void ): void; + /** + * @see {@link SearchVulnerabilitiesCommand} + */ + searchVulnerabilities( + args: SearchVulnerabilitiesCommandInput, + options?: __HttpHandlerOptions + ): Promise; + searchVulnerabilities( + args: SearchVulnerabilitiesCommandInput, + cb: (err: any, data?: SearchVulnerabilitiesCommandOutput) => void + ): void; + searchVulnerabilities( + args: SearchVulnerabilitiesCommandInput, + options: __HttpHandlerOptions, + cb: (err: any, data?: SearchVulnerabilitiesCommandOutput) => void + ): void; + /** * @see {@link TagResourceCommand} */ diff --git a/clients/client-inspector2/src/Inspector2Client.ts b/clients/client-inspector2/src/Inspector2Client.ts index 7485d885e822..84b7c9487cfe 100644 --- a/clients/client-inspector2/src/Inspector2Client.ts +++ b/clients/client-inspector2/src/Inspector2Client.ts @@ -130,6 +130,10 @@ import { ListTagsForResourceCommandOutput, } from "./commands/ListTagsForResourceCommand"; import { ListUsageTotalsCommandInput, ListUsageTotalsCommandOutput } from "./commands/ListUsageTotalsCommand"; +import { + SearchVulnerabilitiesCommandInput, + SearchVulnerabilitiesCommandOutput, +} from "./commands/SearchVulnerabilitiesCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "./commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "./commands/UntagResourceCommand"; import { @@ -191,6 +195,7 @@ export type ServiceInputTypes = | ListMembersCommandInput | ListTagsForResourceCommandInput | ListUsageTotalsCommandInput + | SearchVulnerabilitiesCommandInput | TagResourceCommandInput | UntagResourceCommandInput | UpdateConfigurationCommandInput @@ -233,6 +238,7 @@ export type ServiceOutputTypes = | ListMembersCommandOutput | ListTagsForResourceCommandOutput | ListUsageTotalsCommandOutput + | SearchVulnerabilitiesCommandOutput | TagResourceCommandOutput | UntagResourceCommandOutput | UpdateConfigurationCommandOutput diff --git a/clients/client-inspector2/src/commands/SearchVulnerabilitiesCommand.ts b/clients/client-inspector2/src/commands/SearchVulnerabilitiesCommand.ts new file mode 100644 index 000000000000..9f1b59ddb772 --- /dev/null +++ b/clients/client-inspector2/src/commands/SearchVulnerabilitiesCommand.ts @@ -0,0 +1,209 @@ +// smithy-typescript generated code +import { EndpointParameterInstructions, getEndpointPlugin } from "@aws-sdk/middleware-endpoint"; +import { getSerdePlugin } from "@aws-sdk/middleware-serde"; +import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@aws-sdk/protocol-http"; +import { Command as $Command } from "@aws-sdk/smithy-client"; +import { + FinalizeHandlerArguments, + Handler, + HandlerExecutionContext, + HttpHandlerOptions as __HttpHandlerOptions, + MetadataBearer as __MetadataBearer, + MiddlewareStack, + SerdeContext as __SerdeContext, +} from "@aws-sdk/types"; + +import { Inspector2ClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../Inspector2Client"; +import { SearchVulnerabilitiesRequest, SearchVulnerabilitiesResponse } from "../models/models_0"; +import { de_SearchVulnerabilitiesCommand, se_SearchVulnerabilitiesCommand } from "../protocols/Aws_restJson1"; + +/** + * @public + * + * The input for {@link SearchVulnerabilitiesCommand}. + */ +export interface SearchVulnerabilitiesCommandInput extends SearchVulnerabilitiesRequest {} +/** + * @public + * + * The output of {@link SearchVulnerabilitiesCommand}. + */ +export interface SearchVulnerabilitiesCommandOutput extends SearchVulnerabilitiesResponse, __MetadataBearer {} + +/** + * @public + *

Lists Amazon Inspector coverage details for a specific vulnerability.

+ * @example + * Use a bare-bones client and the command you need to make an API call. + * ```javascript + * import { Inspector2Client, SearchVulnerabilitiesCommand } from "@aws-sdk/client-inspector2"; // ES Modules import + * // const { Inspector2Client, SearchVulnerabilitiesCommand } = require("@aws-sdk/client-inspector2"); // CommonJS import + * const client = new Inspector2Client(config); + * const input = { // SearchVulnerabilitiesRequest + * filterCriteria: { // SearchVulnerabilitiesFilterCriteria + * vulnerabilityIds: [ // VulnIdList // required + * "STRING_VALUE", + * ], + * }, + * nextToken: "STRING_VALUE", + * }; + * const command = new SearchVulnerabilitiesCommand(input); + * const response = await client.send(command); + * // { // SearchVulnerabilitiesResponse + * // vulnerabilities: [ // Vulnerabilities // required + * // { // Vulnerability + * // id: "STRING_VALUE", // required + * // cwes: [ // Cwes + * // "STRING_VALUE", + * // ], + * // cisaData: { // CisaData + * // dateAdded: new Date("TIMESTAMP"), + * // dateDue: new Date("TIMESTAMP"), + * // action: "STRING_VALUE", + * // }, + * // source: "STRING_VALUE", + * // description: "STRING_VALUE", + * // atigData: { // AtigData + * // firstSeen: new Date("TIMESTAMP"), + * // lastSeen: new Date("TIMESTAMP"), + * // targets: [ // Targets + * // "STRING_VALUE", + * // ], + * // ttps: [ // Ttps + * // "STRING_VALUE", + * // ], + * // }, + * // vendorSeverity: "STRING_VALUE", + * // cvss3: { // Cvss3 + * // baseScore: Number("double"), + * // scoringVector: "STRING_VALUE", + * // }, + * // relatedVulnerabilities: [ // RelatedVulnerabilities + * // "STRING_VALUE", + * // ], + * // cvss2: { // Cvss2 + * // baseScore: Number("double"), + * // scoringVector: "STRING_VALUE", + * // }, + * // vendorCreatedAt: new Date("TIMESTAMP"), + * // vendorUpdatedAt: new Date("TIMESTAMP"), + * // sourceUrl: "STRING_VALUE", + * // referenceUrls: [ // VulnerabilityReferenceUrls + * // "STRING_VALUE", + * // ], + * // exploitObserved: { // ExploitObserved + * // lastSeen: new Date("TIMESTAMP"), + * // firstSeen: new Date("TIMESTAMP"), + * // }, + * // detectionPlatforms: [ // DetectionPlatforms + * // "STRING_VALUE", + * // ], + * // epss: { // Epss + * // score: Number("double"), + * // }, + * // }, + * // ], + * // nextToken: "STRING_VALUE", + * // }; + * + * ``` + * + * @param SearchVulnerabilitiesCommandInput - {@link SearchVulnerabilitiesCommandInput} + * @returns {@link SearchVulnerabilitiesCommandOutput} + * @see {@link SearchVulnerabilitiesCommandInput} for command's `input` shape. + * @see {@link SearchVulnerabilitiesCommandOutput} for command's `response` shape. + * @see {@link Inspector2ClientResolvedConfig | config} for Inspector2Client's `config` shape. + * + * @throws {@link AccessDeniedException} (client fault) + *

You do not have sufficient access to perform this action.

+ * + * @throws {@link InternalServerException} (server fault) + *

The request has failed due to an internal failure of the Amazon Inspector service.

+ * + * @throws {@link ThrottlingException} (client fault) + *

The limit on the number of requests per second was exceeded.

+ * + * @throws {@link ValidationException} (client fault) + *

The request has failed validation due to missing required fields or having invalid + * inputs.

+ * + * @throws {@link Inspector2ServiceException} + *

Base exception class for all service exceptions from Inspector2 service.

+ * + */ +export class SearchVulnerabilitiesCommand extends $Command< + SearchVulnerabilitiesCommandInput, + SearchVulnerabilitiesCommandOutput, + Inspector2ClientResolvedConfig +> { + // Start section: command_properties + // End section: command_properties + + public static getEndpointParameterInstructions(): EndpointParameterInstructions { + return { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, + }; + } + + /** + * @public + */ + constructor(readonly input: SearchVulnerabilitiesCommandInput) { + // Start section: command_constructor + super(); + // End section: command_constructor + } + + /** + * @internal + */ + resolveMiddleware( + clientStack: MiddlewareStack, + configuration: Inspector2ClientResolvedConfig, + options?: __HttpHandlerOptions + ): Handler { + this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize)); + this.middlewareStack.use( + getEndpointPlugin(configuration, SearchVulnerabilitiesCommand.getEndpointParameterInstructions()) + ); + + const stack = clientStack.concat(this.middlewareStack); + + const { logger } = configuration; + const clientName = "Inspector2Client"; + const commandName = "SearchVulnerabilitiesCommand"; + const handlerExecutionContext: HandlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog: (_: any) => _, + outputFilterSensitiveLog: (_: any) => _, + }; + const { requestHandler } = configuration; + return stack.resolve( + (request: FinalizeHandlerArguments) => + requestHandler.handle(request.request as __HttpRequest, options || {}), + handlerExecutionContext + ); + } + + /** + * @internal + */ + private serialize(input: SearchVulnerabilitiesCommandInput, context: __SerdeContext): Promise<__HttpRequest> { + return se_SearchVulnerabilitiesCommand(input, context); + } + + /** + * @internal + */ + private deserialize(output: __HttpResponse, context: __SerdeContext): Promise { + return de_SearchVulnerabilitiesCommand(output, context); + } + + // Start section: command_body_extra + // End section: command_body_extra +} diff --git a/clients/client-inspector2/src/commands/index.ts b/clients/client-inspector2/src/commands/index.ts index 95defbf6a47a..4050abfbc047 100644 --- a/clients/client-inspector2/src/commands/index.ts +++ b/clients/client-inspector2/src/commands/index.ts @@ -29,6 +29,7 @@ export * from "./ListFindingsCommand"; export * from "./ListMembersCommand"; export * from "./ListTagsForResourceCommand"; export * from "./ListUsageTotalsCommand"; +export * from "./SearchVulnerabilitiesCommand"; export * from "./TagResourceCommand"; export * from "./UntagResourceCommand"; export * from "./UpdateConfigurationCommand"; diff --git a/clients/client-inspector2/src/models/models_0.ts b/clients/client-inspector2/src/models/models_0.ts index e8f3662aef0b..28764622038e 100644 --- a/clients/client-inspector2/src/models/models_0.ts +++ b/clients/client-inspector2/src/models/models_0.ts @@ -1842,6 +1842,32 @@ export class ValidationException extends __BaseException { } } +/** + * @public + *

The Amazon Web Services Threat Intel Group (ATIG) details for a specific vulnerability.

+ */ +export interface AtigData { + /** + *

The date and time this vulnerability was first observed.

+ */ + firstSeen?: Date; + + /** + *

The date and time this vulnerability was last observed.

+ */ + lastSeen?: Date; + + /** + *

The commercial sectors this vulnerability targets.

+ */ + targets?: string[]; + + /** + *

The MITRE ATT&CK tactics, techniques, and procedures (TTPs) associated with vulnerability.

+ */ + ttps?: string[]; +} + /** * @public *

Represents which scan types are automatically enabled for new members of your Amazon Inspector organization.

@@ -2467,6 +2493,27 @@ export interface CancelFindingsReportResponse { reportId: string | undefined; } +/** + * @public + *

The Cybersecurity and Infrastructure Security Agency (CISA) details for a specific vulnerability.

+ */ +export interface CisaData { + /** + *

The date and time CISA added this vulnerability to their catalogue.

+ */ + dateAdded?: Date; + + /** + *

The date and time CISA expects a fix to have been provided vulnerability.

+ */ + dateDue?: Date; + + /** + *

The remediation action recommended by CISA for this vulnerability.

+ */ + action?: string; +} + /** * @public *

A conflict occurred.

@@ -3377,6 +3424,38 @@ export const Currency = { */ export type Currency = (typeof Currency)[keyof typeof Currency]; +/** + * @public + *

The Common Vulnerability Scoring System (CVSS) version 2 details for the vulnerability.

+ */ +export interface Cvss2 { + /** + *

The CVSS v2 base score for the vulnerability.

+ */ + baseScore?: number; + + /** + *

The scoring vector associated with the CVSS v2 score.

+ */ + scoringVector?: string; +} + +/** + * @public + *

The Common Vulnerability Scoring System (CVSS) version 3 details for the vulnerability.

+ */ +export interface Cvss3 { + /** + *

The CVSS v3 base score for the vulnerability.

+ */ + baseScore?: number; + + /** + *

The scoring vector associated with the CVSS v3 score.

+ */ + scoringVector?: string; +} + /** * @public *

The CVSS score for a finding.

@@ -3787,6 +3866,17 @@ export interface EnableDelegatedAdminAccountResponse { delegatedAdminAccountId: string | undefined; } +/** + * @public + *

Details about the Exploit Prediction Scoring System (EPSS) score.

+ */ +export interface Epss { + /** + *

The Exploit Prediction Scoring System (EPSS) score.

+ */ + score?: number; +} + /** * @public *

The details of an exploit available for a finding discovered in your environment.

@@ -3812,6 +3902,22 @@ export const ExploitAvailable = { */ export type ExploitAvailable = (typeof ExploitAvailable)[keyof typeof ExploitAvailable]; +/** + * @public + *

Contains information on when this exploit was observed.

+ */ +export interface ExploitObserved { + /** + *

The date an time when the exploit was last seen.

+ */ + lastSeen?: Date; + + /** + *

The date an time when the exploit was first seen.

+ */ + firstSeen?: Date; +} + /** * @public * @enum @@ -5112,6 +5218,155 @@ export interface ListUsageTotalsResponse { totals?: UsageTotal[]; } +/** + * @public + *

Details on the criteria used to define the filter for a vulnerability search. + *

+ */ +export interface SearchVulnerabilitiesFilterCriteria { + /** + *

The IDs for specific vulnerabilities.

+ */ + vulnerabilityIds: string[] | undefined; +} + +/** + * @public + */ +export interface SearchVulnerabilitiesRequest { + /** + *

The criteria used to filter the results of a vulnerability search.

+ */ + filterCriteria: SearchVulnerabilitiesFilterCriteria | undefined; + + /** + *

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.

+ */ + nextToken?: string; +} + +/** + * @public + * @enum + */ +export const VulnerabilitySource = { + NVD: "NVD", +} as const; + +/** + * @public + */ +export type VulnerabilitySource = (typeof VulnerabilitySource)[keyof typeof VulnerabilitySource]; + +/** + * @public + *

Contains details about a specific vulnerability Amazon Inspector can detect.

+ */ +export interface Vulnerability { + /** + *

The ID for the specific vulnerability.

+ */ + id: string | undefined; + + /** + *

The Common Weakness Enumeration (CWE) associated with the vulnerability.

+ */ + cwes?: string[]; + + /** + *

An object that contains the Cybersecurity and Infrastructure Security Agency (CISA) details for the vulnerability.

+ */ + cisaData?: CisaData; + + /** + *

The source of the vulnerability information.

+ */ + source?: VulnerabilitySource | string; + + /** + *

A description of the vulnerability.

+ */ + description?: string; + + /** + *

An object that contains information about the Amazon Web Services Threat Intel Group (ATIG) details for the vulnerability.

+ */ + atigData?: AtigData; + + /** + *

The severity assigned by the vendor.

+ */ + vendorSeverity?: string; + + /** + *

An object that contains the Common Vulnerability Scoring System (CVSS) Version 3 details for the vulnerability.

+ */ + cvss3?: Cvss3; + + /** + *

A list of related vulnerabilities.

+ */ + relatedVulnerabilities?: string[]; + + /** + *

An object that contains the Common Vulnerability Scoring System (CVSS) Version 2 details for the vulnerability.

+ */ + cvss2?: Cvss2; + + /** + *

The date and time when the vendor created this vulnerability.

+ */ + vendorCreatedAt?: Date; + + /** + *

The date and time when the vendor last updated this vulnerability.

+ */ + vendorUpdatedAt?: Date; + + /** + *

A link to the official source material for this vulnerability.

+ */ + sourceUrl?: string; + + /** + *

Links to various resources with more information on this vulnerability.

+ */ + referenceUrls?: string[]; + + /** + *

An object that contains details on when the exploit was observed.

+ */ + exploitObserved?: ExploitObserved; + + /** + *

Platforms that the vulnerability can be detected on.

+ */ + detectionPlatforms?: string[]; + + /** + *

An object that contains the Exploit Prediction Scoring System (EPSS) score.

+ */ + epss?: Epss; +} + +/** + * @public + */ +export interface SearchVulnerabilitiesResponse { + /** + *

Details about the listed vulnerability.

+ */ + vulnerabilities: Vulnerability[] | undefined; + + /** + *

The pagination parameter to be used on the next list operation to retrieve more items.

+ */ + nextToken?: string; +} + /** * @public */ diff --git a/clients/client-inspector2/src/pagination/SearchVulnerabilitiesPaginator.ts b/clients/client-inspector2/src/pagination/SearchVulnerabilitiesPaginator.ts new file mode 100644 index 000000000000..22fcabf7e840 --- /dev/null +++ b/clients/client-inspector2/src/pagination/SearchVulnerabilitiesPaginator.ts @@ -0,0 +1,49 @@ +// smithy-typescript generated code +import { Paginator } from "@aws-sdk/types"; + +import { + SearchVulnerabilitiesCommand, + SearchVulnerabilitiesCommandInput, + SearchVulnerabilitiesCommandOutput, +} from "../commands/SearchVulnerabilitiesCommand"; +import { Inspector2Client } from "../Inspector2Client"; +import { Inspector2PaginationConfiguration } from "./Interfaces"; + +/** + * @internal + */ +const makePagedClientRequest = async ( + client: Inspector2Client, + input: SearchVulnerabilitiesCommandInput, + ...args: any +): Promise => { + // @ts-ignore + return await client.send(new SearchVulnerabilitiesCommand(input), ...args); +}; +/** + * @public + */ +export async function* paginateSearchVulnerabilities( + config: Inspector2PaginationConfiguration, + input: SearchVulnerabilitiesCommandInput, + ...additionalArguments: any +): Paginator { + // ToDo: replace with actual type instead of typeof input.nextToken + let token: typeof input.nextToken | undefined = config.startingToken || undefined; + let hasNext = true; + let page: SearchVulnerabilitiesCommandOutput; + while (hasNext) { + input.nextToken = token; + if (config.client instanceof Inspector2Client) { + page = await makePagedClientRequest(config.client, input, ...additionalArguments); + } else { + throw new Error("Invalid client, expected Inspector2 | Inspector2Client"); + } + yield page; + const prevToken = token; + token = page.nextToken; + hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken)); + } + // @ts-ignore + return undefined; +} diff --git a/clients/client-inspector2/src/pagination/index.ts b/clients/client-inspector2/src/pagination/index.ts index 154ed0d9584d..31124675345d 100644 --- a/clients/client-inspector2/src/pagination/index.ts +++ b/clients/client-inspector2/src/pagination/index.ts @@ -9,3 +9,4 @@ export * from "./ListFindingAggregationsPaginator"; export * from "./ListFindingsPaginator"; export * from "./ListMembersPaginator"; export * from "./ListUsageTotalsPaginator"; +export * from "./SearchVulnerabilitiesPaginator"; diff --git a/clients/client-inspector2/src/protocols/Aws_restJson1.ts b/clients/client-inspector2/src/protocols/Aws_restJson1.ts index 2be8eec411e7..3585acae0817 100644 --- a/clients/client-inspector2/src/protocols/Aws_restJson1.ts +++ b/clients/client-inspector2/src/protocols/Aws_restJson1.ts @@ -108,6 +108,10 @@ import { ListTagsForResourceCommandOutput, } from "../commands/ListTagsForResourceCommand"; import { ListUsageTotalsCommandInput, ListUsageTotalsCommandOutput } from "../commands/ListUsageTotalsCommand"; +import { + SearchVulnerabilitiesCommandInput, + SearchVulnerabilitiesCommandOutput, +} from "../commands/SearchVulnerabilitiesCommand"; import { TagResourceCommandInput, TagResourceCommandOutput } from "../commands/TagResourceCommand"; import { UntagResourceCommandInput, UntagResourceCommandOutput } from "../commands/UntagResourceCommand"; import { @@ -134,16 +138,20 @@ import { AggregationRequest, AggregationResponse, AmiAggregation, + AtigData, AutoEnable, AwsEc2InstanceDetails, AwsEcrContainerAggregation, AwsEcrContainerImageDetails, AwsLambdaFunctionDetails, BadRequestException, + CisaData, ConflictException, CoverageFilterCriteria, CoverageMapFilter, CoverageStringFilter, + Cvss2, + Cvss3, CvssScore, CvssScoreDetails, DateFilter, @@ -152,7 +160,9 @@ import { EcrConfiguration, EcrConfigurationState, EcrRescanDurationState, + Epss, ExploitabilityDetails, + ExploitObserved, Filter, FilterCriteria, Finding, @@ -178,6 +188,7 @@ import { ResourceDetails, ResourceNotFoundException, ResourceScanType, + SearchVulnerabilitiesFilterCriteria, ServiceQuotaExceededException, SortCriteria, StringFilter, @@ -186,6 +197,7 @@ import { Usage, UsageTotal, ValidationException, + Vulnerability, } from "../models/models_0"; /** @@ -1078,6 +1090,37 @@ export const se_ListUsageTotalsCommand = async ( }); }; +/** + * serializeAws_restJson1SearchVulnerabilitiesCommand + */ +export const se_SearchVulnerabilitiesCommand = async ( + input: SearchVulnerabilitiesCommandInput, + context: __SerdeContext +): Promise<__HttpRequest> => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const headers: any = { + "content-type": "application/json", + }; + const resolvedPath = + `${basePath?.endsWith("/") ? basePath.slice(0, -1) : basePath || ""}` + "/vulnerabilities/search"; + let body: any; + body = JSON.stringify( + take(input, { + filterCriteria: (_) => _json(_), + nextToken: [], + }) + ); + return new __HttpRequest({ + protocol, + hostname, + port, + method: "POST", + headers, + path: resolvedPath, + body, + }); +}; + /** * serializeAws_restJson1TagResourceCommand */ @@ -3026,6 +3069,63 @@ const de_ListUsageTotalsCommandError = async ( } }; +/** + * deserializeAws_restJson1SearchVulnerabilitiesCommand + */ +export const de_SearchVulnerabilitiesCommand = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + if (output.statusCode !== 200 && output.statusCode >= 300) { + return de_SearchVulnerabilitiesCommandError(output, context); + } + const contents: any = map({ + $metadata: deserializeMetadata(output), + }); + const data: Record = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body"); + const doc = take(data, { + nextToken: __expectString, + vulnerabilities: (_) => de_Vulnerabilities(_, context), + }); + Object.assign(contents, doc); + return contents; +}; + +/** + * deserializeAws_restJson1SearchVulnerabilitiesCommandError + */ +const de_SearchVulnerabilitiesCommandError = async ( + output: __HttpResponse, + context: __SerdeContext +): Promise => { + const parsedOutput: any = { + ...output, + body: await parseErrorBody(output.body, context), + }; + const errorCode = loadRestJsonErrorCode(output, parsedOutput.body); + switch (errorCode) { + case "AccessDeniedException": + case "com.amazonaws.inspector2#AccessDeniedException": + throw await de_AccessDeniedExceptionRes(parsedOutput, context); + case "InternalServerException": + case "com.amazonaws.inspector2#InternalServerException": + throw await de_InternalServerExceptionRes(parsedOutput, context); + case "ThrottlingException": + case "com.amazonaws.inspector2#ThrottlingException": + throw await de_ThrottlingExceptionRes(parsedOutput, context); + case "ValidationException": + case "com.amazonaws.inspector2#ValidationException": + throw await de_ValidationExceptionRes(parsedOutput, context); + default: + const parsedBody = parsedOutput.body; + return throwDefaultError({ + output, + parsedBody, + errorCode, + }); + } +}; + /** * deserializeAws_restJson1TagResourceCommand */ @@ -3751,6 +3851,8 @@ const se_PackageFilterList = (input: PackageFilter[], context: __SerdeContext): // se_RepositoryAggregation omitted. +// se_SearchVulnerabilitiesFilterCriteria omitted. + // se_SortCriteria omitted. // se_StringFilter omitted. @@ -3763,6 +3865,8 @@ const se_PackageFilterList = (input: PackageFilter[], context: __SerdeContext): // se_UsageAccountIdList omitted. +// se_VulnIdList omitted. + // de_Account omitted. // de_AccountAggregationResponse omitted. @@ -3851,6 +3955,18 @@ const de_AggregationResponseList = (output: any, context: __SerdeContext): Aggre // de_ArchitectureList omitted. +/** + * deserializeAws_restJson1AtigData + */ +const de_AtigData = (output: any, context: __SerdeContext): AtigData => { + return take(output, { + firstSeen: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastSeen: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + targets: _json, + ttps: _json, + }) as any; +}; + // de_AutoEnable omitted. /** @@ -3907,6 +4023,17 @@ const de_AwsLambdaFunctionDetails = (output: any, context: __SerdeContext): AwsL }) as any; }; +/** + * deserializeAws_restJson1CisaData + */ +const de_CisaData = (output: any, context: __SerdeContext): CisaData => { + return take(output, { + action: __expectString, + dateAdded: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + dateDue: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + // de_Counts omitted. // de_CountsList omitted. @@ -3915,6 +4042,26 @@ const de_AwsLambdaFunctionDetails = (output: any, context: __SerdeContext): AwsL // de_CoveredResources omitted. +/** + * deserializeAws_restJson1Cvss2 + */ +const de_Cvss2 = (output: any, context: __SerdeContext): Cvss2 => { + return take(output, { + baseScore: __limitedParseDouble, + scoringVector: __expectString, + }) as any; +}; + +/** + * deserializeAws_restJson1Cvss3 + */ +const de_Cvss3 = (output: any, context: __SerdeContext): Cvss3 => { + return take(output, { + baseScore: __limitedParseDouble, + scoringVector: __expectString, + }) as any; +}; + /** * deserializeAws_restJson1CvssScore */ @@ -3957,6 +4104,8 @@ const de_CvssScoreList = (output: any, context: __SerdeContext): CvssScore[] => return retVal; }; +// de_Cwes omitted. + /** * deserializeAws_restJson1DateFilter */ @@ -3987,6 +4136,8 @@ const de_DateFilterList = (output: any, context: __SerdeContext): DateFilter[] = // de_Destination omitted. +// de_DetectionPlatforms omitted. + // de_Ec2InstanceAggregationResponse omitted. // de_Ec2Metadata omitted. @@ -4015,6 +4166,15 @@ const de_EcrRescanDurationState = (output: any, context: __SerdeContext): EcrRes }) as any; }; +/** + * deserializeAws_restJson1Epss + */ +const de_Epss = (output: any, context: __SerdeContext): Epss => { + return take(output, { + score: __limitedParseDouble, + }) as any; +}; + /** * deserializeAws_restJson1ExploitabilityDetails */ @@ -4024,6 +4184,16 @@ const de_ExploitabilityDetails = (output: any, context: __SerdeContext): Exploit }) as any; }; +/** + * deserializeAws_restJson1ExploitObserved + */ +const de_ExploitObserved = (output: any, context: __SerdeContext): ExploitObserved => { + return take(output, { + firstSeen: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + lastSeen: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + // de_FailedAccount omitted. // de_FailedAccountList omitted. @@ -4365,6 +4535,8 @@ const de_PackageVulnerabilityDetails = (output: any, context: __SerdeContext): P // de_Recommendation omitted. +// de_RelatedVulnerabilities omitted. + // de_Remediation omitted. // de_RepositoryAggregationResponse omitted. @@ -4436,8 +4608,12 @@ const de_ResourceList = (output: any, context: __SerdeContext): Resource[] => { // de_TagMap omitted. +// de_Targets omitted. + // de_TitleAggregationResponse omitted. +// de_Ttps omitted. + /** * deserializeAws_restJson1Usage */ @@ -4488,8 +4664,47 @@ const de_UsageTotalList = (output: any, context: __SerdeContext): UsageTotal[] = // de_ValidationExceptionFields omitted. +/** + * deserializeAws_restJson1Vulnerabilities + */ +const de_Vulnerabilities = (output: any, context: __SerdeContext): Vulnerability[] => { + const retVal = (output || []) + .filter((e: any) => e != null) + .map((entry: any) => { + return de_Vulnerability(entry, context); + }); + return retVal; +}; + +/** + * deserializeAws_restJson1Vulnerability + */ +const de_Vulnerability = (output: any, context: __SerdeContext): Vulnerability => { + return take(output, { + atigData: (_: any) => de_AtigData(_, context), + cisaData: (_: any) => de_CisaData(_, context), + cvss2: (_: any) => de_Cvss2(_, context), + cvss3: (_: any) => de_Cvss3(_, context), + cwes: _json, + description: __expectString, + detectionPlatforms: _json, + epss: (_: any) => de_Epss(_, context), + exploitObserved: (_: any) => de_ExploitObserved(_, context), + id: __expectString, + referenceUrls: _json, + relatedVulnerabilities: _json, + source: __expectString, + sourceUrl: __expectString, + vendorCreatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + vendorSeverity: __expectString, + vendorUpdatedAt: (_: any) => __expectNonNull(__parseEpochTimestamp(__expectNumber(_))), + }) as any; +}; + // de_VulnerabilityIdList omitted. +// de_VulnerabilityReferenceUrls omitted. + // de_VulnerablePackage omitted. // de_VulnerablePackageList omitted. diff --git a/codegen/sdk-codegen/aws-models/inspector2.json b/codegen/sdk-codegen/aws-models/inspector2.json index 3511a21281f5..1dca460d847f 100644 --- a/codegen/sdk-codegen/aws-models/inspector2.json +++ b/codegen/sdk-codegen/aws-models/inspector2.json @@ -611,6 +611,38 @@ } } }, + "com.amazonaws.inspector2#AtigData": { + "type": "structure", + "members": { + "firstSeen": { + "target": "com.amazonaws.inspector2#FirstSeen", + "traits": { + "smithy.api#documentation": "

The date and time this vulnerability was first observed.

" + } + }, + "lastSeen": { + "target": "com.amazonaws.inspector2#LastSeen", + "traits": { + "smithy.api#documentation": "

The date and time this vulnerability was last observed.

" + } + }, + "targets": { + "target": "com.amazonaws.inspector2#Targets", + "traits": { + "smithy.api#documentation": "

The commercial sectors this vulnerability targets.

" + } + }, + "ttps": { + "target": "com.amazonaws.inspector2#Ttps", + "traits": { + "smithy.api#documentation": "

The MITRE ATT&CK tactics, techniques, and procedures (TTPs) associated with vulnerability.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Amazon Web Services Threat Intel Group (ATIG) details for a specific vulnerability.

" + } + }, "com.amazonaws.inspector2#AutoEnable": { "type": "structure", "members": { @@ -1293,6 +1325,46 @@ } } }, + "com.amazonaws.inspector2#CisaAction": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0 + } + } + }, + "com.amazonaws.inspector2#CisaData": { + "type": "structure", + "members": { + "dateAdded": { + "target": "com.amazonaws.inspector2#CisaDateAdded", + "traits": { + "smithy.api#documentation": "

The date and time CISA added this vulnerability to their catalogue.

" + } + }, + "dateDue": { + "target": "com.amazonaws.inspector2#CisaDateDue", + "traits": { + "smithy.api#documentation": "

The date and time CISA expects a fix to have been provided vulnerability.

" + } + }, + "action": { + "target": "com.amazonaws.inspector2#CisaAction", + "traits": { + "smithy.api#documentation": "

The remediation action recommended by CISA for this vulnerability.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Cybersecurity and Infrastructure Security Agency (CISA) details for a specific vulnerability.

" + } + }, + "com.amazonaws.inspector2#CisaDateAdded": { + "type": "timestamp" + }, + "com.amazonaws.inspector2#CisaDateDue": { + "type": "timestamp" + }, "com.amazonaws.inspector2#ClientToken": { "type": "string", "traits": { @@ -1811,6 +1883,76 @@ ] } }, + "com.amazonaws.inspector2#Cvss2": { + "type": "structure", + "members": { + "baseScore": { + "target": "com.amazonaws.inspector2#Cvss2BaseScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The CVSS v2 base score for the vulnerability.

" + } + }, + "scoringVector": { + "target": "com.amazonaws.inspector2#Cvss2ScoringVector", + "traits": { + "smithy.api#documentation": "

The scoring vector associated with the CVSS v2 score.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Common Vulnerability Scoring System (CVSS) version 2 details for the vulnerability.

" + } + }, + "com.amazonaws.inspector2#Cvss2BaseScore": { + "type": "double", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.inspector2#Cvss2ScoringVector": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0 + } + } + }, + "com.amazonaws.inspector2#Cvss3": { + "type": "structure", + "members": { + "baseScore": { + "target": "com.amazonaws.inspector2#Cvss3BaseScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The CVSS v3 base score for the vulnerability.

" + } + }, + "scoringVector": { + "target": "com.amazonaws.inspector2#Cvss3ScoringVector", + "traits": { + "smithy.api#documentation": "

The scoring vector associated with the CVSS v3 score.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

The Common Vulnerability Scoring System (CVSS) version 3 details for the vulnerability.

" + } + }, + "com.amazonaws.inspector2#Cvss3BaseScore": { + "type": "double", + "traits": { + "smithy.api#default": 0 + } + }, + "com.amazonaws.inspector2#Cvss3ScoringVector": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0 + } + } + }, "com.amazonaws.inspector2#CvssScore": { "type": "structure", "members": { @@ -1929,6 +2071,25 @@ "target": "com.amazonaws.inspector2#CvssScore" } }, + "com.amazonaws.inspector2#Cwe": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0 + } + } + }, + "com.amazonaws.inspector2#Cwes": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Cwe" + }, + "traits": { + "smithy.api#length": { + "min": 0 + } + } + }, "com.amazonaws.inspector2#DateFilter": { "type": "structure", "members": { @@ -2169,6 +2330,18 @@ "smithy.api#documentation": "

Contains details of the Amazon S3 bucket and KMS key used to export findings.

" } }, + "com.amazonaws.inspector2#DetectionPlatforms": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#NonEmptyString" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, "com.amazonaws.inspector2#Disable": { "type": "operation", "input": { @@ -2855,6 +3028,27 @@ } } }, + "com.amazonaws.inspector2#Epss": { + "type": "structure", + "members": { + "score": { + "target": "com.amazonaws.inspector2#EpssScore", + "traits": { + "smithy.api#default": 0, + "smithy.api#documentation": "

The Exploit Prediction Scoring System (EPSS) score.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Details about the Exploit Prediction Scoring System (EPSS) score.

" + } + }, + "com.amazonaws.inspector2#EpssScore": { + "type": "double", + "traits": { + "smithy.api#default": 0 + } + }, "com.amazonaws.inspector2#ErrorCode": { "type": "string", "traits": { @@ -2942,6 +3136,26 @@ ] } }, + "com.amazonaws.inspector2#ExploitObserved": { + "type": "structure", + "members": { + "lastSeen": { + "target": "com.amazonaws.inspector2#LastSeen", + "traits": { + "smithy.api#documentation": "

The date an time when the exploit was last seen.

" + } + }, + "firstSeen": { + "target": "com.amazonaws.inspector2#FirstSeen", + "traits": { + "smithy.api#documentation": "

The date an time when the exploit was first seen.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains information on when this exploit was observed.

" + } + }, "com.amazonaws.inspector2#ExploitabilityDetails": { "type": "structure", "members": { @@ -3730,6 +3944,9 @@ ] } }, + "com.amazonaws.inspector2#FirstSeen": { + "type": "timestamp" + }, "com.amazonaws.inspector2#FixAvailable": { "type": "string", "traits": { @@ -4450,6 +4667,9 @@ { "target": "com.amazonaws.inspector2#ListUsageTotals" }, + { + "target": "com.amazonaws.inspector2#SearchVulnerabilities" + }, { "target": "com.amazonaws.inspector2#TagResource" }, @@ -5740,6 +5960,9 @@ "smithy.api#documentation": "

The VPC security groups and subnets that are attached to an AWS Lambda function. For more information, see VPC Settings.

" } }, + "com.amazonaws.inspector2#LastSeen": { + "type": "timestamp" + }, "com.amazonaws.inspector2#LayerList": { "type": "list", "member": { @@ -7433,6 +7656,26 @@ "smithy.api#documentation": "

Details about the recommended course of action to remediate the finding.

" } }, + "com.amazonaws.inspector2#RelatedVulnerabilities": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#RelatedVulnerability" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.inspector2#RelatedVulnerability": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0 + } + } + }, "com.amazonaws.inspector2#RelationshipStatus": { "type": "string", "traits": { @@ -8087,6 +8330,99 @@ ] } }, + "com.amazonaws.inspector2#SearchVulnerabilities": { + "type": "operation", + "input": { + "target": "com.amazonaws.inspector2#SearchVulnerabilitiesRequest" + }, + "output": { + "target": "com.amazonaws.inspector2#SearchVulnerabilitiesResponse" + }, + "errors": [ + { + "target": "com.amazonaws.inspector2#AccessDeniedException" + }, + { + "target": "com.amazonaws.inspector2#InternalServerException" + }, + { + "target": "com.amazonaws.inspector2#ThrottlingException" + }, + { + "target": "com.amazonaws.inspector2#ValidationException" + } + ], + "traits": { + "smithy.api#documentation": "

Lists Amazon Inspector coverage details for a specific vulnerability.

", + "smithy.api#http": { + "code": 200, + "method": "POST", + "uri": "/vulnerabilities/search" + }, + "smithy.api#paginated": { + "inputToken": "nextToken", + "outputToken": "nextToken", + "items": "vulnerabilities" + } + } + }, + "com.amazonaws.inspector2#SearchVulnerabilitiesFilterCriteria": { + "type": "structure", + "members": { + "vulnerabilityIds": { + "target": "com.amazonaws.inspector2#VulnIdList", + "traits": { + "smithy.api#documentation": "

The IDs for specific vulnerabilities.

", + "smithy.api#required": {} + } + } + }, + "traits": { + "smithy.api#documentation": "

Details on the criteria used to define the filter for a vulnerability search.\n

" + } + }, + "com.amazonaws.inspector2#SearchVulnerabilitiesRequest": { + "type": "structure", + "members": { + "filterCriteria": { + "target": "com.amazonaws.inspector2#SearchVulnerabilitiesFilterCriteria", + "traits": { + "smithy.api#documentation": "

The criteria used to filter the results of a vulnerability search.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "

A token to use for paginating results that are returned in the response. Set the value\n of this parameter to null for the first request to a list action. For subsequent calls, use\n the NextToken value returned from the previous request to continue listing\n results after the first page.

" + } + } + }, + "traits": { + "smithy.api#input": {} + } + }, + "com.amazonaws.inspector2#SearchVulnerabilitiesResponse": { + "type": "structure", + "members": { + "vulnerabilities": { + "target": "com.amazonaws.inspector2#Vulnerabilities", + "traits": { + "smithy.api#documentation": "

Details about the listed vulnerability.

", + "smithy.api#required": {} + } + }, + "nextToken": { + "target": "com.amazonaws.inspector2#NextToken", + "traits": { + "smithy.api#documentation": "

The pagination parameter to be used on the next list operation to retrieve more items.

" + } + } + }, + "traits": { + "smithy.api#output": {} + } + }, "com.amazonaws.inspector2#SecurityGroupId": { "type": "string", "traits": { @@ -8601,6 +8937,26 @@ "type": "structure", "members": {} }, + "com.amazonaws.inspector2#Target": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 50 + } + } + }, + "com.amazonaws.inspector2#Targets": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Target" + }, + "traits": { + "smithy.api#length": { + "min": 0 + } + } + }, "com.amazonaws.inspector2#ThrottlingException": { "type": "structure", "members": { @@ -8717,6 +9073,26 @@ ] } }, + "com.amazonaws.inspector2#Ttp": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0, + "max": 30 + } + } + }, + "com.amazonaws.inspector2#Ttps": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Ttp" + }, + "traits": { + "smithy.api#length": { + "min": 0 + } + } + }, "com.amazonaws.inspector2#UntagResource": { "type": "operation", "input": { @@ -9290,6 +9666,21 @@ ] } }, + "com.amazonaws.inspector2#VendorCreatedAt": { + "type": "timestamp" + }, + "com.amazonaws.inspector2#VendorSeverity": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 64 + } + } + }, + "com.amazonaws.inspector2#VendorUpdatedAt": { + "type": "timestamp" + }, "com.amazonaws.inspector2#Version": { "type": "string", "traits": { @@ -9302,6 +9693,150 @@ "smithy.api#pattern": "^vpc-([a-z0-9]{8}|[a-z0-9]{17}|\\*)$" } }, + "com.amazonaws.inspector2#VulnId": { + "type": "string", + "traits": { + "smithy.api#pattern": "^CVE-[12][0-9]{3}-[0-9]{1,10}$" + } + }, + "com.amazonaws.inspector2#VulnIdList": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#VulnId" + }, + "traits": { + "smithy.api#length": { + "min": 1, + "max": 1 + } + } + }, + "com.amazonaws.inspector2#Vulnerabilities": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#Vulnerability" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 1 + } + } + }, + "com.amazonaws.inspector2#Vulnerability": { + "type": "structure", + "members": { + "id": { + "target": "com.amazonaws.inspector2#NonEmptyString", + "traits": { + "smithy.api#documentation": "

The ID for the specific vulnerability.

", + "smithy.api#required": {} + } + }, + "cwes": { + "target": "com.amazonaws.inspector2#Cwes", + "traits": { + "smithy.api#documentation": "

The Common Weakness Enumeration (CWE) associated with the vulnerability.

" + } + }, + "cisaData": { + "target": "com.amazonaws.inspector2#CisaData", + "traits": { + "smithy.api#documentation": "

An object that contains the Cybersecurity and Infrastructure Security Agency (CISA) details for the vulnerability.

" + } + }, + "source": { + "target": "com.amazonaws.inspector2#VulnerabilitySource", + "traits": { + "smithy.api#documentation": "

The source of the vulnerability information.

" + } + }, + "description": { + "target": "com.amazonaws.inspector2#VulnerabilityDescription", + "traits": { + "smithy.api#documentation": "

A description of the vulnerability.

" + } + }, + "atigData": { + "target": "com.amazonaws.inspector2#AtigData", + "traits": { + "smithy.api#documentation": "

An object that contains information about the Amazon Web Services Threat Intel Group (ATIG) details for the vulnerability.

" + } + }, + "vendorSeverity": { + "target": "com.amazonaws.inspector2#VendorSeverity", + "traits": { + "smithy.api#documentation": "

The severity assigned by the vendor.

" + } + }, + "cvss3": { + "target": "com.amazonaws.inspector2#Cvss3", + "traits": { + "smithy.api#documentation": "

An object that contains the Common Vulnerability Scoring System (CVSS) Version 3 details for the vulnerability.

" + } + }, + "relatedVulnerabilities": { + "target": "com.amazonaws.inspector2#RelatedVulnerabilities", + "traits": { + "smithy.api#documentation": "

A list of related vulnerabilities.

" + } + }, + "cvss2": { + "target": "com.amazonaws.inspector2#Cvss2", + "traits": { + "smithy.api#documentation": "

An object that contains the Common Vulnerability Scoring System (CVSS) Version 2 details for the vulnerability.

" + } + }, + "vendorCreatedAt": { + "target": "com.amazonaws.inspector2#VendorCreatedAt", + "traits": { + "smithy.api#documentation": "

The date and time when the vendor created this vulnerability.

" + } + }, + "vendorUpdatedAt": { + "target": "com.amazonaws.inspector2#VendorUpdatedAt", + "traits": { + "smithy.api#documentation": "

The date and time when the vendor last updated this vulnerability.

" + } + }, + "sourceUrl": { + "target": "com.amazonaws.inspector2#VulnerabilitySourceUrl", + "traits": { + "smithy.api#documentation": "

A link to the official source material for this vulnerability.

" + } + }, + "referenceUrls": { + "target": "com.amazonaws.inspector2#VulnerabilityReferenceUrls", + "traits": { + "smithy.api#documentation": "

Links to various resources with more information on this vulnerability.

" + } + }, + "exploitObserved": { + "target": "com.amazonaws.inspector2#ExploitObserved", + "traits": { + "smithy.api#documentation": "

An object that contains details on when the exploit was observed.

" + } + }, + "detectionPlatforms": { + "target": "com.amazonaws.inspector2#DetectionPlatforms", + "traits": { + "smithy.api#documentation": "

Platforms that the vulnerability can be detected on.

" + } + }, + "epss": { + "target": "com.amazonaws.inspector2#Epss", + "traits": { + "smithy.api#documentation": "

An object that contains the Exploit Prediction Scoring System (EPSS) score.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains details about a specific vulnerability Amazon Inspector can detect.

" + } + }, + "com.amazonaws.inspector2#VulnerabilityDescription": { + "type": "string" + }, "com.amazonaws.inspector2#VulnerabilityId": { "type": "string", "traits": { @@ -9317,6 +9852,45 @@ "target": "com.amazonaws.inspector2#VulnerabilityId" } }, + "com.amazonaws.inspector2#VulnerabilityReferenceUrl": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0 + } + } + }, + "com.amazonaws.inspector2#VulnerabilityReferenceUrls": { + "type": "list", + "member": { + "target": "com.amazonaws.inspector2#VulnerabilityReferenceUrl" + }, + "traits": { + "smithy.api#length": { + "min": 0, + "max": 100 + } + } + }, + "com.amazonaws.inspector2#VulnerabilitySource": { + "type": "string", + "traits": { + "smithy.api#enum": [ + { + "value": "NVD", + "name": "NVD" + } + ] + } + }, + "com.amazonaws.inspector2#VulnerabilitySourceUrl": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 0 + } + } + }, "com.amazonaws.inspector2#VulnerablePackage": { "type": "structure", "members": {