-
Notifications
You must be signed in to change notification settings - Fork 449
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updated go version to fix 3 CVEs #559
Conversation
…able to load rules.
…gci-lint requires list of acceptable packages.
d177571
to
9de4395
Compare
26ba3e4
to
b7eaa2c
Compare
@@ -23,7 +23,7 @@ jobs: | |||
- name: golangci-lint | |||
uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc | |||
with: | |||
version: v1.52.2 | |||
version: v1.56.2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the golangci-lint needed to be updated as depguard import rule was enabled and fails without a configuration file - atc0005/go-ci#1024
@@ -21,7 +21,7 @@ func (t *LatencyToxic) delay() time.Duration { | |||
delay := t.Latency | |||
jitter := t.Jitter | |||
if jitter > 0 { | |||
//#nosec | |||
// #nosec G404 -- was ignored before too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding the comment in the standard way as mentioned in the documentation.
if t.SizeVariation > 0 { | ||
mid += rand.Intn(t.SizeVariation*2) - t.SizeVariation | ||
mid += rand.Intn(t.SizeVariation*2) - t.SizeVariation // #nosec G404 -- was ignored before too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golangci-lint was failing so had to add the comment on the same line
@@ -81,8 +81,8 @@ func NewToxicStub(input <-chan *stream.StreamChunk, output chan<- *stream.Stream | |||
func (s *ToxicStub) Run(toxic *ToxicWrapper) { | |||
s.running = make(chan struct{}) | |||
defer close(s.running) | |||
//#nosec | |||
if rand.Float32() < toxic.Toxicity { | |||
randomToxicity := rand.Float32() // #nosec G404 -- was ignored before too |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
golangci-lint was failing so had to add the comment on the same line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good. I notice the .golangci.yml
file appears to be referencing an older version of go. It might be good to update that as well so everything is consistent.
Also don't forget to update the changelog.
e19a764
to
6ea89cc
Compare
…ded unreleased changelog
6ea89cc
to
54f1c83
Compare
Resolves issue
Will create a release after this PR is merged
References for updating golangci version and depguard changes:
go-critic/go-critic#1359
golangci/golangci-lint#3877
atc0005/go-ci#1024