Skip to content

Commit d664391

Browse files
committed
Resolve CodeQL Incomplete RegEx
1 parent be5d0ad commit d664391

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

pkg/client/docker/path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
var (
9-
dockerReg = regexp.MustCompile(`(^(.*\.)?docker.com$)|(^(.*\.)?docker.io$)`)
9+
dockerReg = regexp.MustCompile(`(^(.*\.)?docker\.com$)|(^(.*\.)?docker\.io$)`)
1010
)
1111

1212
func (c *Client) IsHost(host string) bool {

pkg/client/gcr/path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
var (
9-
reg = regexp.MustCompile(`(^(.*\.)?gcr.io$|^(.*\.)?k8s.io$|^(.+)-docker.pkg.dev$)`)
9+
reg = regexp.MustCompile(`(^(.*\.)?gcr\.io$|^(.*\.)?k8s\.io$|^(.+)-docker\.pkg\.dev$)`)
1010
)
1111

1212
func (c *Client) IsHost(host string) bool {

pkg/client/quay/path.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
var (
9-
reg = regexp.MustCompile(`(^(.*\.)?quay.io$)`)
9+
reg = regexp.MustCompile(`(^(.*\.)?quay\.io$)`)
1010
)
1111

1212
func (c *Client) IsHost(host string) bool {

0 commit comments

Comments
 (0)