Skip to content

Commit

Permalink
fixed issue flagged by gosec
Browse files Browse the repository at this point in the history
  • Loading branch information
joreiche committed Apr 12, 2024
1 parent da5e05b commit 3aa5fc7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/script/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
)

func main() {
scriptFilename := filepath.Join("test", "risk-category.yaml")
scriptFilename := filepath.Clean(filepath.Join("test", "risk-category.yaml"))
ruleData, ruleReadError := os.ReadFile(scriptFilename)
if ruleReadError != nil {
fmt.Printf("error reading risk category: %v\n", ruleReadError)
Expand All @@ -23,7 +23,7 @@ func main() {
return
}

modelFilename := filepath.Join("test", "parsed-model.yaml")
modelFilename := filepath.Clean(filepath.Join("test", "parsed-model.yaml"))
modelData, modelReadError := os.ReadFile(modelFilename)
if modelReadError != nil {
fmt.Printf("error reading model: %v\n", modelReadError)
Expand Down

0 comments on commit 3aa5fc7

Please sign in to comment.