-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Address gosec G601 issues #210
Address gosec G601 issues #210
Conversation
$ gosec -version Version: 2.5.0 Git tag: v2.5.0 Build date: 2020-10-26T11:52:22Z On simple inspection the G601 issues from gosec looked innocuous enough but I decided to clean these up anyway. For the changes to router.go and template_helper.go I took the simplest approach of creating a new variable (and copy). I could have changed everything to be index based but I chose to go with the smallest change. PR inspired by openshift#208 It still leaves open the question asked in openshift#208 as to whether we will run this tool during builds and/or prior to a release.
2199026
to
d928435
Compare
/retest |
Are there any other gosec codes we should be worried about? |
Those were the immediate ones but there's a big list in #208 - some are more interesting than others (e.g., not handling errors from |
Maybe we should consider setting something up like this https://github.com/openshift/cluster-logging-operator/blob/master/golangci.yaml |
Depends on how many false positives all of those throw up. Often there's too much noise. I used to run |
/retest |
/retest |
1 similar comment
/retest |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: frobware, sgreene570 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
$ gosec -version
Version: 2.5.0
Git tag: v2.5.0
Build date: 2020-10-26T11:52:22Z
On simple inspection the G601 issues from gosec looked innocuous
enough but I decided to clean these up anyway.
For the changes to router.go and template_helper.go I took the
simplest approach of creating a new variable (and copy). I could have
changed everything to be index based but I chose to go with the
smallest change.
PR inspired by #208
It still leaves open the question asked in #208 on whether we will run
this tool as during build and/or prior to a release.