MCPcopy Create free account
hub / github.com/TheSecuredAnalyst/security-suite / from_finding

Method from_finding

modules/siem/base.py:76–89  ·  view source on GitHub ↗

Create event from a Finding.

(cls, finding: Finding, target: str = "")

Source from the content-addressed store, hash-verified

74 @classmethod
75 def from_finding(cls, finding: Finding, target: str = "") -> "SIEMEvent":
76 """Create event from a Finding."""
77 return cls(
78 event_type=EventType.FINDING_DETECTED,
79 timestamp=datetime.now(),
80 severity=finding.severity.value,
81 message=finding.title,
82 target=target,
83 module=finding.source,
84 finding_title=finding.title,
85 finding_description=finding.description,
86 raw_data=finding.data,
87 tags=finding.references[:5] if finding.references else [],
88 )
89
90 @classmethod
91 def from_scan_result(cls, result: ScanResult) -> list["SIEMEvent"]:
92 """Create events from a ScanResult."""

Callers 1

from_scan_resultMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected