checkTLSExpiry() in internal/watcher/watcher.go sends a notification every time a TLS check runs if the certificate is within the warning window:
func(w*Watcher)checkTLSExpiry(...){daysLeft:=time.Until(cert.NotAfter).Hours()/hoursPerDayifdaysLeft>warningDays{return}w.notify.SendNotification(...)// fires EVERY cycle}
There is no state tracking whether a warning has already been sent for this certificate. With the default 12h TLS interval, this means 2 warnings per day, every day, until the cert is renewed.
Impact
Notification spam to Slack/Mattermost/ntfy. Users will mute the channel, defeating the purpose of monitoring.
Fix
Track last-warned state (e.g., in CertificateState) and only re-send if the expiry crosses a new threshold (e.g., 7 days, 3 days, 1 day, expired) or if the certificate changed.
## Bug
`checkTLSExpiry()` in `internal/watcher/watcher.go` sends a notification every time a TLS check runs if the certificate is within the warning window:
```go
func (w *Watcher) checkTLSExpiry(...) {
daysLeft := time.Until(cert.NotAfter).Hours() / hoursPerDay
if daysLeft > warningDays {
return
}
w.notify.SendNotification(...) // fires EVERY cycle
}
```
There is no state tracking whether a warning has already been sent for this certificate. With the default 12h TLS interval, this means 2 warnings per day, every day, until the cert is renewed.
## Impact
Notification spam to Slack/Mattermost/ntfy. Users will mute the channel, defeating the purpose of monitoring.
## Fix
Track last-warned state (e.g., in `CertificateState`) and only re-send if the expiry crosses a new threshold (e.g., 7 days, 3 days, 1 day, expired) or if the certificate changed.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Bug
checkTLSExpiry()ininternal/watcher/watcher.gosends a notification every time a TLS check runs if the certificate is within the warning window:There is no state tracking whether a warning has already been sent for this certificate. With the default 12h TLS interval, this means 2 warnings per day, every day, until the cert is renewed.
Impact
Notification spam to Slack/Mattermost/ntfy. Users will mute the channel, defeating the purpose of monitoring.
Fix
Track last-warned state (e.g., in
CertificateState) and only re-send if the expiry crosses a new threshold (e.g., 7 days, 3 days, 1 day, expired) or if the certificate changed.