mirror of https://github.com/docker/cli.git
cli/command/image/build: G107: Potential HTTP request made with variable url (gosec)
cli/command/image/build/context.go:235: G107: Potential HTTP request made with variable url (gosec)
if resp, err = http.Get(url); err != nil {
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 0e4bd30cfe
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
f969531205
commit
acec6cb56f
|
@ -232,6 +232,7 @@ func GetContextFromURL(out io.Writer, remoteURL, dockerfileName string) (io.Read
|
||||||
// getWithStatusError does an http.Get() and returns an error if the
|
// getWithStatusError does an http.Get() and returns an error if the
|
||||||
// status code is 4xx or 5xx.
|
// status code is 4xx or 5xx.
|
||||||
func getWithStatusError(url string) (resp *http.Response, err error) {
|
func getWithStatusError(url string) (resp *http.Response, err error) {
|
||||||
|
// #nosec G107
|
||||||
if resp, err = http.Get(url); err != nil {
|
if resp, err = http.Get(url); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue