Skip to main content

hanzo_client/models/
finding_view.rs

1/*
2 * Hanzo Cloud API
3 *
4 * The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
5 *
6 * The version of the OpenAPI document: v1
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct FindingView {
16    /// CreatedAt is when the finding was recorded, in Unix milliseconds.
17    #[serde(rename = "createdAt", skip_serializing_if = "Option::is_none")]
18    pub created_at: Option<i32>,
19    /// Fingerprint is the SHA-256 of the raw secret. It is what makes the same secret recognisable across scans and after rotation without the secret ever being written down.
20    #[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")]
21    pub fingerprint: Option<String>,
22    /// ID addresses this finding.
23    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
24    pub id: Option<String>,
25    /// Line is where in that file.
26    #[serde(rename = "line", skip_serializing_if = "Option::is_none")]
27    pub line: Option<i32>,
28    /// Path is the file the secret was found in.
29    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
30    pub path: Option<String>,
31    /// Preview is the secret MASKED — first and last characters kept, the middle starred — so a reviewer can recognise it without it being disclosed.
32    #[serde(rename = "preview", skip_serializing_if = "Option::is_none")]
33    pub preview: Option<String>,
34    /// RuleID is the detection rule that fired.
35    #[serde(rename = "ruleId", skip_serializing_if = "Option::is_none")]
36    pub rule_id: Option<String>,
37    /// RuleName is that rule's human name.
38    #[serde(rename = "ruleName", skip_serializing_if = "Option::is_none")]
39    pub rule_name: Option<String>,
40    /// ScanID is the scan that produced it.
41    #[serde(rename = "scanId", skip_serializing_if = "Option::is_none")]
42    pub scan_id: Option<String>,
43    /// Severity ranks the finding: critical, high, medium or low.
44    #[serde(rename = "severity", skip_serializing_if = "Option::is_none")]
45    pub severity: Option<String>,
46}
47
48impl FindingView {
49    pub fn new() -> FindingView {
50        FindingView {
51            created_at: None,
52            fingerprint: None,
53            id: None,
54            line: None,
55            path: None,
56            preview: None,
57            rule_id: None,
58            rule_name: None,
59            scan_id: None,
60            severity: None,
61        }
62    }
63}
64