summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnjan Nath <kaludios@gmail.com>2022-05-21 12:56:33 +0530
committerAnjan Nath <kaludios@gmail.com>2022-05-21 13:03:37 +0530
commit26f0e7a80b5705e361d4d85defabb604e3123682 (patch)
treed0370f218f01cf52c2e72bd64ce722d267080e4d
parent182e3e76908f0824eac155b5e14775b50fe0aca5 (diff)
ignore gosec warning G304 for reading the config file path from variable
the path is needed to be read from the user and obfsproxy will be started with root privileges anyway, we can ignore this warning, more details about the warn at https://securego.io/docs/rules/g304.html
-rw-r--r--server/main.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/server/main.go b/server/main.go
index 5427184..66063c9 100644
--- a/server/main.go
+++ b/server/main.go
@@ -64,7 +64,8 @@ func main() {
}
var cfg Config
- fd, err := os.Open(cfgFile)
+
+ fd, err := os.Open(cfgFile) //#nosec G304
log.Println("opening:", cfgFile)
if err != nil {
logger.Fatalf("error opening config file: %v", err)