MCPcopy Create free account
hub / github.com/PierreGode/Ragnar / notify_new_vulnerabilities

Method notify_new_vulnerabilities

pushover_service.py:217–233  ·  view source on GitHub ↗

Notify about newly discovered vulnerabilities (compares against last notified count).

(self, new_total)

Source from the content-addressed store, hash-verified

215 threading.Thread(target=self.send, args=(msg, "Ragnar — Device Back Online"), daemon=True).start()
216
217 def notify_new_vulnerabilities(self, new_total):
218 """Notify about newly discovered vulnerabilities (compares against last notified count)."""
219 if not self.is_enabled():
220 return
221 if not self.shared_data.config.get("pushover_notify_new_vulnerability", True):
222 return
223 with self._lock:
224 if new_total <= self._last_notified_vuln_count:
225 return
226 delta = new_total - self._last_notified_vuln_count
227 self._last_notified_vuln_count = new_total
228 # Suppress notification during startup grace — just absorb the baseline
229 if self._in_startup_grace():
230 logger.debug(f"Pushover: suppressed vuln alert (delta={delta}) during startup grace")
231 return
232 msg = f"🔥 {delta} new vulnerability/vulnerabilities found! (total: {new_total})"
233 threading.Thread(target=self.send, args=(msg, "Ragnar — Vulnerability Alert", 1), daemon=True).start()
234
235 def notify_new_credentials(self, new_count, total):
236 """Notify when new credentials are captured."""

Callers 1

sync_vulnerability_countFunction · 0.95

Calls 5

is_enabledMethod · 0.95
_in_startup_graceMethod · 0.95
debugMethod · 0.80
getMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected