security(alerts,ai): fix secret exfiltration, ReDoS/redactor bypasses, probe double-counting & add Security Event Alerting

This commit is contained in:
tyuXX 2026-11-28 05:09:46 +00:00
parent 2b878c1d99
commit 67137056f8
11 changed files with 613 additions and 173 deletions

View file

@ -415,6 +415,19 @@ describe('Phase 4: AlertEngine, Webhooks, Silences & Maintenance Windows', () =>
expect(lockRes.data.state).toBe('locked');
expect(lockRes.data.runtimeReady).toBe(true);
// Default Zero-Trust egress policy blocks webhook dispatch to 127.0.0.1 until allowlisted
const deniedWebhook = await api('/api/alerts/channels/ch-discord/test', { method: 'POST' });
expect(deniedWebhook.data.ok).toBe(false);
expect(
(
await api('/api/auth/security-policy', {
method: 'PUT',
body: { egressAllowedCidrs: ['127.0.0.1/32'] },
})
).status,
).toBe(200);
// --- 1. Send Test Alert for all 4 channel types while Vault is write-locked ---
for (const chId of ['ch-discord', 'ch-tg', 'ch-ntfy', 'ch-generic']) {
const tRes = await api(`/api/alerts/channels/${chId}/test`, { method: 'POST' });