fix: gosec G304 file inclusion error
Part of KubeCon EU 2022 Bugbash
@@ -59,7 +59,7 @@ func Command() *cobra.Command {
}
var input interface{}
if filename != "" {
- f, err := ioutil.ReadFile(filename)
+ f, err := ioutil.ReadFile(filepath.Clean(filename))
if err != nil {
return fmt.Errorf("error opening input file: %w", err)
}
