yebinama / paclair

Paclair is a Python3 Cli tool to interact with Coreos's Clair (https://github.com/coreos/clair).
Apache License 2.0
27 stars 13 forks source link

bug in paclair/__init__.py #25

Open adf2007 opened 5 years ago

adf2007 commented 5 years ago

The REGEX defined in the file "paclair/init.py" might not right. It can't match the domain when I push a image like "registray.test.com/abc/test/nginx:latest".

The value of the "domain" should be like this: 'domain': r'(?:(?P(?:[a-zA-Z0-9]+|[a-zA-Z0-9][a-zA-Z0-9-][a-zA-Z0-9])(?:(?:.(?:[a-zA-Z0-9]+|[a-zA-Z0-9][a-zA-Z0-9-][a-zA-Z0-9]))+)?(?::[0-9]+)?)/)?',

not this: 'domain': r'(?:(?P(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-][a-zA-Z0-9])(?:(?:.(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-][a-zA-Z0-9]))+)?(?::[0-9]+)?)/)?',