From 26f0e7a80b5705e361d4d85defabb604e3123682 Mon Sep 17 00:00:00 2001 From: Anjan Nath Date: Sat, 21 May 2022 12:56:33 +0530 Subject: 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 --- server/main.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3