container scanning parsing errors when no tag is used
Summary
When running GitLab container_scanning image the security report does not parse the image name when a specific image tag is not specified. the regex pattern ^[^:]+(:\d+[^:]*)?:[^:]+$
will not find a match.
Steps to reproduce
- use Security/Container-Scanning.gitlab-ci.yml
- set DOCKER_IMAGE: to image name without tag specified implying latest (ex. httpd vs httpd:latest)
- run pipeline
- move to security tab
- get Error parsing security reports
Example Project
https://gitlab.com/jessie/312435
What is the current bug behavior?
regex fails to parse image name and does not present report
What is the expected correct behavior?
regex parses image name and presents report
Relevant logs and/or screenshots
Output of checks
This bug happens on gitlab.com
Implementation Plan
-
backend If the DOCKER_IMAGE
does not include the tag, append the:latest
by default either inGcs::Enviornment.docker_image
or inGcs::Cli#scan
methods.
Edited by Alan (Maciej) Paruszewski