Class: Dependabot::Shared::SharedFileParser

Inherits:
FileParsers::Base
  • Object
show all
Extended by:
T::Helpers, T::Sig
Defined in:
lib/dependabot/shared/shared_file_parser.rb

Direct Known Subclasses

Docker::FileParser

Constant Summary collapse

DOMAIN_COMPONENT =

Details of Docker regular expressions is at github.com/docker/distribution/blob/master/reference/regexp.go

/(?:[[:alnum:]]|[[:alnum:]][[[:alnum:]]-]*[[:alnum:]])/
DOMAIN =
/(?:#{DOMAIN_COMPONENT}(?:\.#{DOMAIN_COMPONENT})+)/
REGISTRY =
/(?<registry>#{DOMAIN}(?::\d+)?)/
NAME_COMPONENT =
/(?:[a-z\d]+(?:(?:[._]|__|[-]*)[a-z\d]+)*)/
IMAGE =
%r{(?<image>#{NAME_COMPONENT}(?:/#{NAME_COMPONENT})*)}
TAG =
/:(?<tag>[\w][\w.-]{0,127})/
DIGEST =
/@(?<digest>[^\s]+)/
NAME =
/\s+AS\s+(?<name>[\w-]+)/