Skip to content

Commit

Permalink
Bug 170 fix gosec issue (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
shanmydell committed Jan 31, 2022
1 parent 57ecefc commit 88d3713
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/semver/semver.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"io/ioutil"
"os"
"os/exec"
"path/filepath"
"regexp"
"runtime"
"strconv"
Expand Down Expand Up @@ -84,7 +85,7 @@ func main() {

var w io.Writer = os.Stdout
if len(output) > 0 {
fout, err := os.Create(output)
fout, err := os.Create(filepath.Clean(output))
if err != nil {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1)
Expand Down

0 comments on commit 88d3713

Please sign in to comment.