mirror of
https://github.com/coredns/coredns.git
synced 2025-12-31 22:11:22 -05:00
chore(lint): enable gosec (#7792)
Enable "gosec" linter.
Exclude:
- All G115 (integer overflow) findings, to be fixed separately.
Add targeted gosec annotations for:
- non-crypto math/rand usage
- md5 used only for file change detection
- G114 ("net/http serve with no timeout settings"), to be fixed
separately.
Other findings fixed.
Signed-off-by: Ville Vesilehto <ville@vesilehto.fi>
This commit is contained in:
@@ -62,8 +62,8 @@ func parse(c *caddy.Controller) (*Sign, error) {
|
||||
signers[i] = &Signer{
|
||||
dbfile: dbfile,
|
||||
origin: origins[i],
|
||||
jitterIncep: time.Duration(float32(durationInceptionJitter) * rand.Float32()),
|
||||
jitterExpir: time.Duration(float32(durationExpirationDayJitter) * rand.Float32()),
|
||||
jitterIncep: time.Duration(float32(durationInceptionJitter) * rand.Float32()), // #nosec G404 -- non-cryptographic jitter.
|
||||
jitterExpir: time.Duration(float32(durationExpirationDayJitter) * rand.Float32()), // #nosec G404 -- non-cryptographic jitter.
|
||||
directory: "/var/lib/coredns",
|
||||
stop: make(chan struct{}),
|
||||
signedfile: fmt.Sprintf("db.%ssigned", origins[i]), // origins[i] is a fqdn, so it ends with a dot, hence %ssigned.
|
||||
|
||||
Reference in New Issue
Block a user