securego / gosec

Go security checker
https://securego.io
Apache License 2.0
7.8k stars 611 forks source link

Allow excluding analyzers globally #1180

Closed Rgvs closed 2 months ago

Rgvs commented 2 months ago

fixes #1175

ccojocar commented 2 months ago

I would also recommend to rebase this since there are some updates in the main. Thanks

Rgvs commented 2 months ago

Thanks for quick feedback. The analyzerslist.go code i wrote is technically a copy of rulelist.go. Some of your comments would deviate from rulelist.go. In view of that, would you still like me to go ahead and make those changes?

ccojocar commented 2 months ago

The analyzerslist.go code i wrote is technically a copy of rulelist.go. Some of your comments would deviate from rulelist.go. In view of that, would you still like me to go ahead and make those changes?

Please go ahead. It's fine they don't need to be identical. These are anyhow small things. Thanks for addressing my comments!

ccojocar commented 2 months ago

Is this fixing #1175 issue?

Rgvs commented 2 months ago

Yes, but partly. Allows to exclude analyzers using -exclude option in cmd line. This does not fix skipping code by comments like // #nosec G602

Rgvs commented 2 months ago

Addressed the Comments. Please Re-review. Thank you.

codecov-commenter commented 2 months ago

:warning: Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 60.86957% with 27 lines in your changes missing coverage. Please review.

Project coverage is 67.15%. Comparing base (18135b4) to head (889dcf0). Report is 1 commits behind head on master.

Files Patch % Lines
cmd/gosec/main.go 0.00% 27 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1180 +/- ## ========================================== - Coverage 67.53% 67.15% -0.38% ========================================== Files 72 74 +2 Lines 3933 3992 +59 ========================================== + Hits 2656 2681 +25 - Misses 1160 1189 +29 - Partials 117 122 +5 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.