@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/index.js CHANGED
@@ -44037,7 +44037,8 @@ var DEDUPE_MS = 10 * 6e4;
44037
44037
  var MAX_PER_HOUR = 6;
44038
44038
  function smshubText(event, host = (0, import_node_os13.hostname)()) {
44039
44039
  const evidence = event.details?.evidence?.message;
44040
- const text = `ThreatCrush ${event.severity.toUpperCase()} on ${host}: ${event.message}${evidence && !event.message.includes(evidence) ? ` | ${evidence}` : ""}`;
44040
+ const ip = event.source_ip && ![event.message, evidence ?? ""].some((t) => t.includes(event.source_ip)) ? ` from ${event.source_ip}` : "";
44041
+ const text = `ThreatCrush ${event.severity.toUpperCase()} on ${host}: ${event.message}${evidence && !event.message.includes(evidence) ? ` | ${evidence}` : ""}${ip}`;
44041
44042
  return text.replace(/\s+/g, " ").slice(0, 600);
44042
44043
  }
44043
44044
  function smshubChannel(config, opts = {}) {