Skip to content

Commit

Permalink
commenting nosec before using it. This resolved it linter issue on th…
Browse files Browse the repository at this point in the history
…e local.
  • Loading branch information
dianadevasia committed Mar 12, 2024
1 parent 5837077 commit 1453dac
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion toxics/toxic.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +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)
if rand.Float32() < toxic.Toxicity { // #nosec G404 -- was ignored before too
// #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 {
new(NoopToxic).Pipe(s)
Expand Down

0 comments on commit 1453dac

Please sign in to comment.