praetorian-inc / gokart

A static analysis tool for securing Go code
Apache License 2.0
2.18k stars 110 forks source link

I dont know how to get rid of CWE-22: Path Traversal #65

Open ignishub opened 2 years ago

ignishub commented 2 years ago

configPath recieved from flag, Am i doing something wrong?

clean := filepath.Clean(configPath)

file, err := os.Open(clean)