-
Notifications
You must be signed in to change notification settings - Fork 105
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
fix: gosec warnings #1785
fix: gosec warnings #1785
Conversation
protocol/v2/types/ssvshare.go
Outdated
@@ -157,7 +157,7 @@ func ComputeCommitteeID(committee []spectypes.OperatorID) spectypes.CommitteeID | |||
// Convert to bytes | |||
bytes := make([]byte, len(committee)*4) | |||
for i, v := range committee { | |||
binary.LittleEndian.PutUint32(bytes[i*4:], uint32(v)) // nolint:gosec | |||
binary.LittleEndian.PutUint32(bytes[i*4:], uint32(v)) // #nosec |
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.
let's please disable only the specific rule to avoid missing any future rules
eth/eventhandler/handlers.go
Outdated
@@ -95,6 +95,7 @@ func (eh *EventHandler) handleOperatorAdded(txn basedb.Txn, event *contract.Cont | |||
return nil | |||
} | |||
|
|||
// This function is currently no-op and it will do nothing. Operator removed event is not used in the current implementation. |
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.
i think we can remove the commented code inside and move this comment there instead, also clarifying that it will do nothing - beyond validating the operator exists, and that we should consider removing the operator and updating the shares in the future
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.
also opened an issue #1786
* resolve gosec issues * add comment to clarify handleOperatorRemoved implementation * fix review comments
No description provided.