| 2 | import {SecurityEventInterface} from "./security-event" |
| 3 | |
| 4 | export class SuricataEvent implements SecurityEventInterface { |
| 5 | constructor(private r: zed.Record) {} |
| 6 | |
| 7 | getRecord() { |
| 8 | return this.r |
| 9 | } |
| 10 | |
| 11 | getTime() { |
| 12 | return this.r.get<zed.Time>("ts").toDate() |
| 13 | } |
| 14 | |
| 15 | getEndTime() { |
| 16 | return null |
| 17 | } |
| 18 | |
| 19 | getType() { |
| 20 | return this.r.get("event_type").toString() |
| 21 | } |
| 22 | |
| 23 | getSeverity(): number { |
| 24 | return Number(this.r.get<zed.Uint64>(["alert", "severity"]).toInt()) |
| 25 | } |
| 26 | } |
nothing calls this directly
no outgoing calls
no test coverage detected