4 Commits
Author SHA1 Message Date
Sebastiaan van Stijn 92c1f57e85 switch back from golang.org/x/sys/execabs to os/exec (go1.19)
This reverts commit f2a56450f4, which switched
from os/exec to the golang.org/x/sys/execabs package to mitigate security
issues (mainly on Windows) with lookups resolving to binaries in the current
directory.

from the go1.19 release notes https://go.dev/doc/go1.19#os-exec-path

> ## PATH lookups
>
> Command and LookPath no longer allow results from a PATH search to be found
> relative to the current directory. This removes a common source of security
> problems but may also break existing programs that depend on using, say,
> exec.Command("prog") to run a binary named prog (or, on Windows, prog.exe) in
> the current directory. See the os/exec package documentation for information
> about how best to update such programs.
>
> On Windows, Command and LookPath now respect the NoDefaultCurrentDirectoryInExePath
> environment variable, making it possible to disable the default implicit search
> of “.” in PATH lookups on Windows systems.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-04-22 20:31:03 +02:00
Sebastiaan van Stijn f2a56450f4 Use golang.org/x/sys/execabs instead of os/exec
On Windows, the os/exec.{Command,CommandContext,LookPath} functions resolve command
names that have neither path separators nor file extension (e.g., "git") by first
looking in the current working directory before looking in the PATH environment
variable.
Go maintainers intended to match cmd.exe's historical behavior.

However, this is pretty much never the intended behavior and as an abundance of
precaution this patch prevents that when executing commands.

This patch was prompted by the [Go 1.15.7 security fixes](https://blog.golang.org/path-security).

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-10 09:21:40 +01:00
Sebastiaan van Stijn 6734ca5406 go.mod: sirupsen/logrus v1.7.0, golang.org/x/sys
full diff: https://github.com/sirupsen/logrus/compare/v1.4.2...v1.7.0

logrus v1.7.0 removes dependency on github.com/konsorten/go-windows-terminal-sequences

Features:

* a new buffer pool management API has been added
* a set of `<LogLevel>Fn()` functions have been added

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-02-09 11:02:59 +01:00
Sebastiaan van Stijn 00446faf93 go.mod: github.com/pkg/errors v0.9.1
update to pkg/errors v0.9.1 for compatibility with Go 1.13
error (un)wrapping.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2020-11-23 21:09:12 +01:00