Don't parse non-standard image name in container scanning ingestion
What does this MR do and why?
Resolves Container Scanning parsing doesn't have image n... (#555361)
The change in this MR returns image_name from docker_image_name_without_tag if there is no : in the image_name making it unparseable. In the case that we are scanning a latest image, this would lead to:
- If
image_nameisimage:latest, the output ofdocker_image_name_without_tagisimage(base_name). - If
image_nameisimage, the output ofdocker_image_name_without_tagisimage(image_name).
When reviewing this MR, it's important to consider whether file path names as location/image names have any implications on our data, e.g. default branch image naming.
Relates to Archive File Scanning for Container Scanning (#501077 - closed)
References
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
![]() |
![]() |
Note we have more vulnerabilities on the right because they are not overriden by different images with matching vulnerabilities.
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.



