-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
gosec: add G115 to default exclusions #4941
Conversation
Thanks, it will help a lot until gosec discussion ends |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, is this a good idea? In general I really don't like exclude-use-default
(all rules should be up to the user to configure) and to me that's legacy that should be removed. It's been brought up in previous discussions (such as #4323, #2239 and #456).
As far as I can tell, G115 is a valid check given it doesn't have false positives. So if this gets excluded by default and then gets fixed upstream we'd no longer warn about actual overflow and instead hide them from users that enables gosec
.
And as far as I can tell from the linked issues, since we don't change existing exclusions due to backwards compatibility reasons that means that if we add this we can't remove it until a new major version.
Also, isn't this (partly) fixed by securego/gosec#1188 and more fixes are to come upstream?
We have no choice if we want to disable a rule inside gosec rather than using default exclusion.
Currently, it has false positives: But securego/gosec#1188 can reduce the problem. |
Closed in favor of #4943 |
Alright, thanks for clarifying! I get that the noise can be annoying but it looks like I'm open to reconsidering this but if the manual bumping you just did solves the new false positives and the old ones stay the same (or will be fixed in the near future) I think it would be nice to avoid extending this list. |
I want to add a more detailed explanation of this sentence: But, for now, we have another solution, so we are "safe" 😸 |
Quite ironic that this was marked as I really fail to see your logic in this decision. |
I recommended disabling it as a workaround because of false positives just after the v1.60.2 release.
The logic in this decision is clear if you watch the chronology of the events.
There are over a hundred linters, so we can't follow every commit and every issue inside all those linters, we don't have the time to do it. Dependabot creates PRs automatically to update linters when they create a release, we review the changes (not just the PR content: I read every linter changelogs and every linter diff). Don't hesitate to donate to give us the time to watch every commit and every issue of the linters.
|
Fixes #4935, #4939
Related to #4927