Skip to content

Commit 24cf723

Browse files
committed
feat: Added nosec G115
Signed-off-by: Akhil Repala <[email protected]>
1 parent ab68fa6 commit 24cf723

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ledger/common/tx.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ func (s *TransactionMetadataSet) UnmarshalCBOR(cborData []byte) error {
423423
if err != nil {
424424
return fmt.Errorf("decode metadata list item %d: %w", i, err)
425425
}
426-
out[uint64(i)] = md // #nosec G115 — i is 0..len(arr)-1
426+
out[uint64(i)] = md // #nosec G115
427427
}
428428
*s = out
429429
return nil
@@ -449,7 +449,7 @@ func (s TransactionMetadataSet) MarshalCBOR() ([]byte, error) {
449449
if expectedCount64 > uint64(math.MaxInt) {
450450
return nil, errors.New("metadata set too large to encode as array")
451451
}
452-
expectedCount := int(expectedCount64) // #nosec G115 — bounded by check above
452+
expectedCount := int(expectedCount64) // #nosec G115
453453
if len(s) != expectedCount {
454454
contiguous = false
455455
} else {

0 commit comments

Comments
 (0)