Commit 953d1fec authored by Roland Shoemaker's avatar Roland Shoemaker
Browse files

all: introduce and use internal/execabs

Introduces a wrapper around os/exec, internal/execabs, for use in
all commands. This wrapper prevents exec.LookPath and exec.Command from
running executables in the current directory.

All imports of os/exec in non-test files in cmd/ are replaced with
imports of internal/execabs.

This issue was reported by RyotaK.

Fixes CVE-2021-3115
Fixes #43783

Change-Id: I0423451a6e27ec1e1d6f3fe929ab1ef69145c08f
Reviewed-on: https://team-review.git.corp.google.com/c/golang/go-private/+/955304


Reviewed-by: default avatarRuss Cox <rsc@google.com>
Reviewed-by: default avatarKatie Hockman <katiehockman@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/284783


Run-TryBot: Roland Shoemaker <roland@golang.org>
Reviewed-by: default avatarKatie Hockman <katie@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
parent b186e4d7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment