-
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
Changes from 6 commits
e92ff81
f5b6769
50c291a
9de4395
e20f3da
b7eaa2c
54f1c83
007ad28
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,5 +13,5 @@ up: | |
- shfmt | ||
- yamllint | ||
- go: | ||
version: 1.19 | ||
version: 1.22.1 | ||
modules: true |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe reason will be displayed to describe this comment to others. Learn more. Adding the comment in the standard way as mentioned in the documentation. |
||
delay += rand.Int63n(jitter*2) - jitter | ||
} | ||
return time.Duration(delay) * time.Millisecond | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,9 +38,9 @@ func (t *SlicerToxic) chunk(start int, end int) []int { | |
} | ||
|
||
mid := start + (end-start)/2 | ||
//#nosec | ||
|
||
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 commentThe 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 |
||
} | ||
left := t.chunk(start, mid) | ||
right := t.chunk(mid, end) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 commentThe 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 |
||
if randomToxicity < toxic.Toxicity { | ||
toxic.Pipe(s) | ||
} else { | ||
new(NoopToxic).Pipe(s) | ||
|
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