-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Linter: gosec, Rule: G104 - Audit errors not checked. Should we enable it? #12892
Comments
I think this one can even replace the existing err check linter. As here we can tell to ignore for example buffer.WriteByte which is never going to return an error. |
+1 |
With
After adding
Currently they are excluded by default by:
|
More info: https://securego.io/docs/rules/g104.html |
I reviewed findings and I didn't find anything which hadn't been found by
Moreover, ignoring some functions in To sum up:
|
Agreed on not doing, so does that mean we should close this issue as not in plan? |
Closing as not in plan. :) |
Use Case
This issue starts discussion about enabling:
Rule is mapped to CWE-703: Improper Check or Handling of Exceptional Conditions.
Expected behavior
Decision if rule should be enabled or not.
Actual behavior
For this rule no findings were found in current code.
Probably, because other linter guards checking errors. However, nothing prevents us from turning also G104 on.
Additional info
For this rule additional configuration can be provided:
The text was updated successfully, but these errors were encountered: