Skip to content

Commit f511c6e

Browse files
committed
feat: Added nosec G115
Signed-off-by: Akhil Repala <arepala@blinklabs.io>
1 parent 9a6473e commit f511c6e

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
@@ -412,7 +412,7 @@ func (s *TransactionMetadataSet) UnmarshalCBOR(cborData []byte) error {
412412
if err != nil {
413413
return fmt.Errorf("decode metadata list item %d: %w", i, err)
414414
}
415-
out[uint64(i)] = md // #nosec G115 — i is 0..len(arr)-1
415+
out[uint64(i)] = md // #nosec G115
416416
}
417417
*s = out
418418
return nil
@@ -438,7 +438,7 @@ func (s TransactionMetadataSet) MarshalCBOR() ([]byte, error) {
438438
if expectedCount64 > uint64(math.MaxInt) {
439439
return nil, errors.New("metadata set too large to encode as array")
440440
}
441-
expectedCount := int(expectedCount64) // #nosec G115 — bounded by check above
441+
expectedCount := int(expectedCount64) // #nosec G115
442442
if len(s) != expectedCount {
443443
contiguous = false
444444
} else {

0 commit comments

Comments
 (0)