@profullstack/threatcrush 0.13.67 → 0.13.68

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/daemon.js CHANGED
@@ -11677,7 +11677,8 @@ var DEDUPE_MS = 10 * 6e4;
11677
11677
  var MAX_PER_HOUR = 6;
11678
11678
  function smshubText(event, host = (0, import_node_os2.hostname)()) {
11679
11679
  const evidence = event.details?.evidence?.message;
11680
- const text = `ThreatCrush ${event.severity.toUpperCase()} on ${host}: ${event.message}${evidence && !event.message.includes(evidence) ? ` | ${evidence}` : ""}`;
11680
+ const ip = event.source_ip && ![event.message, evidence ?? ""].some((t) => t.includes(event.source_ip)) ? ` from ${event.source_ip}` : "";
11681
+ const text = `ThreatCrush ${event.severity.toUpperCase()} on ${host}: ${event.message}${evidence && !event.message.includes(evidence) ? ` | ${evidence}` : ""}${ip}`;
11681
11682
  return text.replace(/\s+/g, " ").slice(0, 600);
11682
11683
  }
11683
11684
  function smshubChannel(config, opts = {}) {