Skip to content

Commit

Permalink
Fix for the G115: integer overflow conversion int64 -> uint64 (gosec)…
Browse files Browse the repository at this point in the history
… for uint64(capacity)
  • Loading branch information
WilsonRadadia20 committed Sep 17, 2024
1 parent 62795f9 commit c5f2339
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion service/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ func (s *service) ControllerExpandVolume(ctx context.Context, req *csi.Controlle
}

// Idempotency check
if filesystem.FileContent.SizeTotal >= uint64(capacity) { // #nosec G115 - This is a false positive
if filesystem.FileContent.SizeTotal >= uint64(capacity) /* #nosec G115 -- This is a false positive */ {
log.Infof("New Filesystem size (%d) is lower or same as existing Filesystem size. Ignoring expand volume operation.", filesystem.FileContent.SizeTotal)
expandVolumeResp.NodeExpansionRequired = false
return expandVolumeResp, nil
Expand Down

0 comments on commit c5f2339

Please sign in to comment.