icmd: replace all usages of os/exec with golang.org/x/sys/execabs#218
Merged
dnephin merged 2 commits intogotestyourself:mainfrom May 15, 2021
Merged
icmd: replace all usages of os/exec with golang.org/x/sys/execabs#218dnephin merged 2 commits intogotestyourself:mainfrom
dnephin merged 2 commits intogotestyourself:mainfrom
Conversation
0bc7e7e to
762f31e
Compare
Member
|
https://blog.golang.org/path-security is interesting! #219 should fix the test-windows job. This is marked as a draft, but it seems to be working. Anything left to do? |
Project now started to do releases; this one was related to a security issue on Windows, replacing all usages of os/exec with golang.org/x/sys/execabs. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Contributor
Author
Nope! I just rebased to get rid of the other commits (well, doesn't really change, but it's confusing on GitHub otherwise); moving it out of draft |
Contributor
Author
|
Blogpost is indeed interesting; I was aware of similar things with dll's on Windows, but guess this one is a typical case of "common knowledge that we forgot about"; thought it wouldn't hurt to follow their recommendations (IMO, |
Contributor
Author
Following the changes in Go, and golang.org/x/tools themselves, this change ensures that packages using exec.LookPath or exec.Command to find or run binaries do not accidentally run programs from the current directory when they mean to run programs from the system PATH instead. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 task
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

go.mod: golang.org/x/tools v0.1.0
Project now started to do releases; this one was related to a
security issue on Windows, replacing all usages of os/exec with
golang.org/x/sys/execabs.
icmd: replace all usages of os/exec with golang.org/x/sys/execabs
Following the changes in Go, and golang.org/x/tools themselves, this change
ensures that packages using exec.LookPath or exec.Command to find or run
binaries do not accidentally run programs from the current directory when
they mean to run programs from the system PATH instead.