- Navigation GuideYou are on a Command (operation) page with structural examples. Use the navigation breadcrumb if you would like to return to the Client landing page.
DescribeImageScanFindingsCommand
Returns the scan findings for the specified image.
Example Syntax
Use a bare-bones client and the command you need to make an API call.
import { ECRClient, DescribeImageScanFindingsCommand } from "@aws-sdk/client-ecr"; // ES Modules import
// const { ECRClient, DescribeImageScanFindingsCommand } = require("@aws-sdk/client-ecr"); // CommonJS import
const client = new ECRClient(config);
const input = { // DescribeImageScanFindingsRequest
registryId: "STRING_VALUE",
repositoryName: "STRING_VALUE", // required
imageId: { // ImageIdentifier
imageDigest: "STRING_VALUE",
imageTag: "STRING_VALUE",
},
nextToken: "STRING_VALUE",
maxResults: Number("int"),
};
const command = new DescribeImageScanFindingsCommand(input);
const response = await client.send(command);
// { // DescribeImageScanFindingsResponse
// registryId: "STRING_VALUE",
// repositoryName: "STRING_VALUE",
// imageId: { // ImageIdentifier
// imageDigest: "STRING_VALUE",
// imageTag: "STRING_VALUE",
// },
// imageScanStatus: { // ImageScanStatus
// status: "IN_PROGRESS" || "COMPLETE" || "FAILED" || "UNSUPPORTED_IMAGE" || "ACTIVE" || "PENDING" || "SCAN_ELIGIBILITY_EXPIRED" || "FINDINGS_UNAVAILABLE" || "LIMIT_EXCEEDED",
// description: "STRING_VALUE",
// },
// imageScanFindings: { // ImageScanFindings
// imageScanCompletedAt: new Date("TIMESTAMP"),
// vulnerabilitySourceUpdatedAt: new Date("TIMESTAMP"),
// findingSeverityCounts: { // FindingSeverityCounts
// "<keys>": Number("int"),
// },
// findings: [ // ImageScanFindingList
// { // ImageScanFinding
// name: "STRING_VALUE",
// description: "STRING_VALUE",
// uri: "STRING_VALUE",
// severity: "INFORMATIONAL" || "LOW" || "MEDIUM" || "HIGH" || "CRITICAL" || "UNDEFINED",
// attributes: [ // AttributeList
// { // Attribute
// key: "STRING_VALUE", // required
// value: "STRING_VALUE",
// },
// ],
// },
// ],
// enhancedFindings: [ // EnhancedImageScanFindingList
// { // EnhancedImageScanFinding
// awsAccountId: "STRING_VALUE",
// description: "STRING_VALUE",
// findingArn: "STRING_VALUE",
// firstObservedAt: new Date("TIMESTAMP"),
// lastObservedAt: new Date("TIMESTAMP"),
// packageVulnerabilityDetails: { // PackageVulnerabilityDetails
// cvss: [ // CvssScoreList
// { // CvssScore
// baseScore: Number("double"),
// scoringVector: "STRING_VALUE",
// source: "STRING_VALUE",
// version: "STRING_VALUE",
// },
// ],
// referenceUrls: [ // ReferenceUrlsList
// "STRING_VALUE",
// ],
// relatedVulnerabilities: [ // RelatedVulnerabilitiesList
// "STRING_VALUE",
// ],
// source: "STRING_VALUE",
// sourceUrl: "STRING_VALUE",
// vendorCreatedAt: new Date("TIMESTAMP"),
// vendorSeverity: "STRING_VALUE",
// vendorUpdatedAt: new Date("TIMESTAMP"),
// vulnerabilityId: "STRING_VALUE",
// vulnerablePackages: [ // VulnerablePackagesList
// { // VulnerablePackage
// arch: "STRING_VALUE",
// epoch: Number("int"),
// filePath: "STRING_VALUE",
// name: "STRING_VALUE",
// packageManager: "STRING_VALUE",
// release: "STRING_VALUE",
// sourceLayerHash: "STRING_VALUE",
// version: "STRING_VALUE",
// fixedInVersion: "STRING_VALUE",
// },
// ],
// },
// remediation: { // Remediation
// recommendation: { // Recommendation
// url: "STRING_VALUE",
// text: "STRING_VALUE",
// },
// },
// resources: [ // ResourceList
// { // Resource
// details: { // ResourceDetails
// awsEcrContainerImage: { // AwsEcrContainerImageDetails
// architecture: "STRING_VALUE",
// author: "STRING_VALUE",
// imageHash: "STRING_VALUE",
// imageTags: [ // ImageTagsList
// "STRING_VALUE",
// ],
// platform: "STRING_VALUE",
// pushedAt: new Date("TIMESTAMP"),
// lastInUseAt: new Date("TIMESTAMP"),
// inUseCount: Number("long"),
// registry: "STRING_VALUE",
// repositoryName: "STRING_VALUE",
// },
// },
// id: "STRING_VALUE",
// tags: { // Tags
// "<keys>": "STRING_VALUE",
// },
// type: "STRING_VALUE",
// },
// ],
// score: Number("double"),
// scoreDetails: { // ScoreDetails
// cvss: { // CvssScoreDetails
// adjustments: [ // CvssScoreAdjustmentList
// { // CvssScoreAdjustment
// metric: "STRING_VALUE",
// reason: "STRING_VALUE",
// },
// ],
// score: Number("double"),
// scoreSource: "STRING_VALUE",
// scoringVector: "STRING_VALUE",
// version: "STRING_VALUE",
// },
// },
// severity: "STRING_VALUE",
// status: "STRING_VALUE",
// title: "STRING_VALUE",
// type: "STRING_VALUE",
// updatedAt: new Date("TIMESTAMP"),
// fixAvailable: "STRING_VALUE",
// exploitAvailable: "STRING_VALUE",
// },
// ],
// },
// nextToken: "STRING_VALUE",
// };
DescribeImageScanFindingsCommand Input
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
imageId Required | ImageIdentifier | undefined | An object with identifying information for an image in an Amazon ECR repository. |
repositoryName Required | string | undefined | The repository for the image for which to describe the scan findings. |
maxResults | number | undefined | The maximum number of image scan results returned by |
nextToken | string | undefined | The |
registryId | string | undefined | The Amazon Web Services account ID associated with the registry that contains the repository in which to describe the image scan findings for. If you do not specify a registry, the default registry is assumed. |
DescribeImageScanFindingsCommand Output
Parameter | Type | Description |
---|
Parameter | Type | Description |
---|---|---|
$metadata Required | ResponseMetadata | Metadata pertaining to this request. |
imageId | ImageIdentifier | undefined | An object with identifying information for an image in an Amazon ECR repository. |
imageScanFindings | ImageScanFindings | undefined | The information contained in the image scan findings. |
imageScanStatus | ImageScanStatus | undefined | The current state of the scan. |
nextToken | string | undefined | The |
registryId | string | undefined | The registry ID associated with the request. |
repositoryName | string | undefined | The repository name associated with the request. |
Throws
Name | Fault | Details |
---|
Name | Fault | Details |
---|---|---|
ImageNotFoundException | client | The image requested does not exist in the specified repository. |
InvalidParameterException | client | The specified parameter is invalid. Review the available parameters for the API request. |
RepositoryNotFoundException | client | The specified repository could not be found. Check the spelling of the specified repository and ensure that you are performing operations on the correct registry. |
ScanNotFoundException | client | The specified image scan could not be found. Ensure that image scanning is enabled on the repository and try again. |
ServerException | server | These errors are usually caused by a server-side issue. |
ValidationException | client | There was an exception validating this request. |
ECRServiceException | Base exception class for all service exceptions from ECR service. |