Skip to content
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

Suppress false positive in gosec #118

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

denyeart
Copy link
Contributor

@denyeart denyeart commented Sep 9, 2024

New versions of gosec implemented stricter type conversion. Since the integer values will be small in the conversions in this codebase, it is safe to suppress these gosec warnings.

@denyeart denyeart requested a review from a team as a code owner September 9, 2024 16:30
@pfi79
Copy link

pfi79 commented Sep 9, 2024

@denyeart maybe it's better to do it this way.
Add a section in .golangci.yml:

linters-settings:
  gosec:
    excludes:
      - 'G115'

New versions of gosec implemented stricter type conversion.
Since the integer values will be small in the conversions in this codebase,
it is safe to suppress these gosec warnings.

Signed-off-by: David Enyeart <[email protected]>
@denyeart
Copy link
Contributor Author

denyeart commented Sep 9, 2024

@denyeart maybe it's better to do it this way. Add a section in .golangci.yml:

linters-settings:
  gosec:
    excludes:
      - 'G115'

Makes sense @pfi79 , done!

@denyeart denyeart merged commit d3135c4 into hyperledger:main Sep 9, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants