Skip to content

Commit

Permalink
chore: upgrade ci lint version (#136)
Browse files Browse the repository at this point in the history
* chore: upgrade ci lint version

* remove unused skip-pkg-cache option

* golangci lint v1.61.0

* nosec on integer overflow
  • Loading branch information
tim-mwangi authored Sep 19, 2024
1 parent facc7ee commit b6894eb
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@ jobs:
name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.59.0
skip-pkg-cache: true
version: v1.61.0
only-new-issues: true
- name: Run unit tests
run: make test
Expand All @@ -52,7 +50,7 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Build and push image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
# this workflow runs on PRs, it only tests if the image can be built
push: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_PUBLISH_TOKEN }}

- name: Build and push image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
push: true
context: .
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: echo "VERSION=${GITHUB_REF##*/}" >> $GITHUB_ENV

- name: Build and push image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
push: true
context: .
Expand Down
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 b6894eb

Please sign in to comment.