Skip to content

Commit

Permalink
Adding the comment to ignore like in tests as its started to scan the…
Browse files Browse the repository at this point in the history
…se errors
  • Loading branch information
dianadevasia committed Mar 12, 2024
1 parent 9de4395 commit f495a8f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion toxics/latency.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
delay += rand.Int63n(jitter*2) - jitter
}
return time.Duration(delay) * time.Millisecond
Expand Down
2 changes: 1 addition & 1 deletion toxics/slicer.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (t *SlicerToxic) chunk(start int, end int) []int {
}

mid := start + (end-start)/2
//#nosec
// #nosec G404 -- was ignored before too
if t.SizeVariation > 0 {
mid += rand.Intn(t.SizeVariation*2) - t.SizeVariation

Check failure on line 43 in toxics/slicer.go

View workflow job for this annotation

GitHub Actions / linting

G404: Use of weak random number generator (math/rand instead of crypto/rand) (gosec)
}
Expand Down
2 changes: 1 addition & 1 deletion toxics/toxic.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ 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
// #nosec G404 -- was ignored before too
if rand.Float32() < toxic.Toxicity {

Check failure on line 85 in toxics/toxic.go

View workflow job for this annotation

GitHub Actions / linting

G404: Use of weak random number generator (math/rand instead of crypto/rand) (gosec)
toxic.Pipe(s)
} else {
Expand Down

0 comments on commit f495a8f

Please sign in to comment.