hyperledger / fabric-chaincode-go

Hyperledger Fabric Packages for Go Chaincode
https://pkg.go.dev/github.com/hyperledger/fabric-chaincode-go
Apache License 2.0
141 stars 132 forks source link

Suppress false positive in gosec #118

Closed denyeart closed 2 months ago

denyeart commented 2 months ago

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.

pfi79 commented 2 months ago

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

linters-settings:
  gosec:
    excludes:
      - 'G115'
denyeart commented 2 months ago

@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!