From 98ab90ef75db2e3f58782338179afb198b44ed2f Mon Sep 17 00:00:00 2001 From: DecFox <33030671+DecFox@users.noreply.github.com> Date: Wed, 7 Aug 2024 23:57:16 +0530 Subject: [PATCH] chore: address gosec warnings (#1648) ## Checklist - [x] I have read the [contribution guidelines](https://github.com/ooni/probe-cli/blob/master/CONTRIBUTING.md) - [x] reference issue for this pull request: https://github.com/ooni/probe/issues/2783 - [ ] if you changed anything related to how experiments work and you need to reflect these changes in the ooni/spec repository, please link to the related ooni/spec pull request: - [ ] if you changed code inside an experiment, make sure you bump its version number ## Description This diff addresses gosec warnings and tries to minimise them as much as possible. The gosec warnings for the current `master` branch can be found here: https://github.com/ooni/probe-cli/actions/runs/10286957901/job/28468879578#step:6:1153. --- internal/testingx/oonibackendwithlogin.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/testingx/oonibackendwithlogin.go b/internal/testingx/oonibackendwithlogin.go index 1cb3fede6..ac0398551 100644 --- a/internal/testingx/oonibackendwithlogin.go +++ b/internal/testingx/oonibackendwithlogin.go @@ -234,7 +234,7 @@ func (h *OONIBackendWithLoginFlow) handleOpenVPNConfig() http.Handler { // we must lock because of SetOpenVPNConfig h.mu.Lock() - w.Write(h.openVPNConfig) + _, _ = w.Write(h.openVPNConfig) h.mu.Unlock() }) }