alexjurkiewicz / ecr-scan-image

Github Action to run AWS ECR vulnerability scan on Docker image
MIT License
28 stars 23 forks source link

fix: Unhandled scan status "PENDING" #51

Closed s-hashimo closed 2 months ago

s-hashimo commented 3 months ago

The following error often occurs in our CI environment:

Error: Unhandled scan status "PENDING". API response: {"registryId":"222222222222","repositoryName":"dummy","imageId":{"imageDigest":"sha256:08eec9208c975baa1df884a1009b38426b1a44e90048d7ae82f59ba268767c36","imageTag":"08eec9208c975baa1df884a1009b38426b1a44e90048d7ae82f59ba268767c36"},"imageScanStatus":{"status":"PENDING","description":"Pending start of the image scan."},"imageScanFindings":{"findings":[],"enhancedFindings":[]}}

And here is the AWS documentation:

https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_ImageScanStatus.html

Valid Values: IN_PROGRESS | COMPLETE | FAILED | UNSUPPORTED_IMAGE | ACTIVE | PENDING | SCAN_ELIGIBILITY_EXPIRED | FINDINGS_UNAVAILABLE

alexjurkiewicz commented 2 months ago

LGTM thanks for the patch!