Skip to content

Commit

Permalink
Chore: Bump versions
Browse files Browse the repository at this point in the history
- Fix lint/staticcheck issues

Signed-off-by: Anoop Gopalakrishnan <[email protected]>
  • Loading branch information
anoop2811 committed Jul 10, 2024
1 parent 76111fc commit 5e1b172
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/server/domain/service/application.go
Original file line number Diff line number Diff line change
Expand Up @@ -1669,12 +1669,13 @@ func (c *applicationServiceImpl) DryRunAppOrRevision(ctx context.Context, appMod
}

func genWebhookToken() string {
rand.Seed(time.Now().UnixNano())
source := rand.NewSource(time.Now().UnixNano())
rng := rand.New(source)

Check failure on line 1673 in pkg/server/domain/service/application.go

View workflow job for this annotation

GitHub Actions / check

G404: Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand) (gosec)
runes := []rune("abcdefghijklmnopqrstuvwxyz0123456789")

b := make([]rune, defaultTokenLen)
for i := range b {
b[i] = runes[rand.Intn(len(runes))] // #nosec
b[i] = runes[rng.Intn(len(runes))] // #nosec
}
return string(b)
}
Expand Down

0 comments on commit 5e1b172

Please sign in to comment.