feat: fleet ops, KEV scan, tunnels, beacon fallback, persistence
Extend owned-fleet control with scheduled tasks, audit log, file browser, HTTPS beacon when WS drops, protocol tunnels, registry/autostart forge options, KEV exposure in full sys check with Telegram alerts, and UI/tests.
This commit is contained in:
18
server/internal/alerts/kev_notify_test.go
Normal file
18
server/internal/alerts/kev_notify_test.go
Normal file
@@ -0,0 +1,18 @@
|
||||
package alerts
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestNotifyKEVFromSysCheckNoPanic(t *testing.T) {
|
||||
n := NewNotifier(func() Settings {
|
||||
return NewSettings(NotifyConfig{}, EventToggles{KEVExposure: true})
|
||||
})
|
||||
msg := `{"kev_exposure":{"exposed_count":1,"critical_count":1,"summary":"test","findings":[{"cve":"CVE-2021-26855","name":"ProxyLogon","status":"exposed","severity":"critical"}]}}`
|
||||
NotifyKEVFromSysCheck(n, "worker-1", msg)
|
||||
}
|
||||
|
||||
func TestNotifyKEVSkipsWhenClear(t *testing.T) {
|
||||
n := NewNotifier(func() Settings {
|
||||
return NewSettings(NotifyConfig{TelegramBotToken: "x", TelegramChatID: "1"}, EventToggles{KEVExposure: true})
|
||||
})
|
||||
NotifyKEVFromSysCheck(n, "w", `{"kev_exposure":{"exposed_count":0,"critical_count":0}}`)
|
||||
}
|
||||
Reference in New Issue
Block a user