You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto-discovery cannot create scheduled scans for containers whose names violate the metadata.name naming convention. This should be taken into account as in the container image name there are additional characters allowed, such as "_". I think this should be taken into account and discard/replace characters that are not allowed by metadata.name while creating the scheduled scan name.
Steps To Reproduce
Steps to reproduce the behavior:
Install auto-discovery and activate container scans
Deploy a pod with a container which has in its image name an invalid character such as "_", which is an allowed character for the container image name
Check autodiscovery logs and see that it will fail to create the scheduled scan:
Failed to create scheduled scan, metadata.name: Invalid value: a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is 'a-z0-9?(\.a-z0-9?)*')"}
While is good to not have such names in container image names, it can still happen.
Expected behavior
The expected behaviour is for the autodiscovery controller to detect such names and fix them before creating the scan.
System (please complete the following information):
Activity
J12934 commentedon Oct 11, 2024
Ah thanks for pointing that out 🙌
Wasn't aware that container names had a different set of allowed characters.
#2706 Remove underscore in container name since it is allowed in ima…
#2706 Remove underscore in container name since it is allowed in ima…