Skip to content

Commit

Permalink
security: fix vulnerability on Windows where an exe in a malicious re…
Browse files Browse the repository at this point in the history
…pository could run arbitrary code

Special thanks to RyotaK - https://github.com/Ry0taK for identifying this vulnerability
  • Loading branch information
chriswalz committed Mar 20, 2021
1 parent 83f458c commit dc4715d
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/gh.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package cmd

import (
"os/exec"
exec "golang.org/x/sys/execabs"
"strconv"
"strings"

Expand Down
2 changes: 1 addition & 1 deletion cmd/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package cmd

import (
"fmt"
exec "golang.org/x/sys/execabs"
"os"
"os/exec"
"strings"

"github.com/rs/zerolog/log"
Expand Down
2 changes: 1 addition & 1 deletion cmd/release.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package cmd

import (
"fmt"
"os/exec"
exec "golang.org/x/sys/execabs"

"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
Expand Down
2 changes: 1 addition & 1 deletion cmd/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package cmd

import (
"fmt"
exec "golang.org/x/sys/execabs"
"os"
"os/exec"
"path/filepath"
"runtime"
"strings"
Expand Down
2 changes: 1 addition & 1 deletion cmd/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"errors"
"fmt"
"github.com/chriswalz/complete/v3"
exec "golang.org/x/sys/execabs"
"os"
"os/exec"
"regexp"
"runtime"
"runtime/debug"
Expand Down
1 change: 1 addition & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,6 @@ require (
github.com/thoas/go-funk v0.7.0
github.com/tj/go-update v2.2.4+incompatible
github.com/ulikunitz/xz v0.5.8 // indirect
golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d

)
3 changes: 2 additions & 1 deletion go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,9 @@ golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200909081042-eff7692f9009/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200918174421-af09f7315aff h1:1CPUrky56AcgSpxz/KfgzQWzfG09u5YOL8MvPYBlrL8=
golang.org/x/sys v0.0.0-20200918174421-af09f7315aff/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d h1:jbzgAvDZn8aEnytae+4ou0J0GwFZoHR0hOrTg4qH8GA=
golang.org/x/sys v0.0.0-20210319071255-635bc2c9138d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs=
Expand Down

0 comments on commit dc4715d

Please sign in to comment.