crawlkit_plugin_sdk/
finding.rs1use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
7pub enum Severity {
8 Critical,
9 Error,
10 Warning,
11 Info,
12}
13
14impl Severity {
15 pub fn as_str(&self) -> &'static str {
17 match self {
18 Severity::Critical => "critical",
19 Severity::Error => "error",
20 Severity::Warning => "warning",
21 Severity::Info => "info",
22 }
23 }
24}
25
26#[derive(Debug, Clone, Serialize, Deserialize)]
28pub struct Finding {
29 pub severity: Severity,
31 pub category: String,
33 pub code: String,
35 pub title: String,
37 pub description: String,
39 pub url: String,
41 pub recommendation: String,
43}