Skip to content

Commit

Permalink
Fix Case of Arbitrary File Overwrite while scanning malicious repo (#225
Browse files Browse the repository at this point in the history
)
  • Loading branch information
dcRUSTy authored Aug 15, 2020
1 parent f0917da commit 1fecebc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion report/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ func GenerateReport(r *helpers.DetectionResults, directory string) (path string,
return "", fmt.Errorf("error copying reports: %v", err)
}
} else {
path = filepath.Join(directory, "talisman_reports", "/data")
path = filepath.Join(directory, "talisman_reports")
_ = os.RemoveAll(path)
path = filepath.Join(path, "data")
jsonFilePath = filepath.Join(path, jsonFileName)
}

Expand Down

0 comments on commit 1fecebc

Please sign in to comment.