Skip to content

Commit

Permalink
nosec on integer overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-mwangi committed Sep 19, 2024
1 parent e189fd1 commit 5f22ac1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion processors/ratelimiter/ratelimiterprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ func (p *rateLimiterProcessor) ConsumeTraces(ctx context.Context, traces ptrace.
}
ctx, _ = tag.New(ctx,
tag.Insert(tagTenantID, tenantId))
spanCount := uint32(traces.SpanCount())
// G115 (CWE-190): integer overflow conversion int -> uint32 (Confidence: MEDIUM, Severity: HIGH)
// This is a false positive we can ignore.
spanCount := uint32(traces.SpanCount()) // #nosec G115
stats.Record(ctx, rateLimitServiceCallsCount.M(int64(1)))
response, err := p.rateLimitServiceClient.ShouldRateLimit(
ctx,
Expand Down

0 comments on commit 5f22ac1

Please sign in to comment.