snyk / leaky-vessels-static-detector

Static detection tool for runc and Docker "Leaky Vessels" vulnerabilities
https://snyk.io/blog/leaky-vessels-docker-runc-container-breakout-vulnerabilities/
Apache License 2.0
94 stars 17 forks source link

Support repositories in image names #3

Open bowdens opened 5 months ago

bowdens commented 5 months ago

The current regex for parsing an image name doesn't allow repository names to be included (for instance, in my use case most images are prefixed with repository:5000, ie repository:5000/<image name>:tag).

I propose altering the current regex from ^([\w.\-\/]+)(?::([\w.\-]+))?(?:@([\w:]+))?$ to ^((?:[\w:]+\/)?[\w.\-\/]+)(?::([\w.\-]+))?(?:@([\w:]+))?$ which will allow repository names to optionally be included.

I have forked this repository with the proposed alteration .