pub struct BaselineFinding {
pub fingerprint: String,
pub rule_id: String,
pub severity: Severity,
pub first_seen_at: DateTime<Utc>,
pub reason_waived: Option<String>,
pub severity_override: Option<Severity>,
pub expires_at: Option<DateTime<Utc>>,
}Expand description
One entry in a baseline. Keyed on fingerprint (16-hex SHA-256 truncation
computed by compute_fingerprint).
Two waiver shapes:
- Plain pre-existing finding.
reason_waived,severity_override,expires_atallNone. The finding existed atinittime; it is reported as “pre-existing” rather than a regression. Critical findings in this shape STILL fail exit-1. - Explicit waiver.
reason_waivedpopulated. If the original severity was Critical,severity_override: "critical"andexpires_at <= accepted_at + 90dare mandatory; otherwise the waiver is rejected at load time and the critical falls through to exit 1.
Fields§
§fingerprint: String16-hex SHA-256 fingerprint matching the SARIF/JSON/CloudEvents value.
rule_id: StringSnake-case rule id (custom rule id if present, else
FindingCategory snake_case form).
severity: SeveritySeverity captured at init time. Used for the critical-bypass check.
first_seen_at: DateTime<Utc>When this entry was first added to the baseline (init or accept).
reason_waived: Option<String>Free-form justification. Required on accept (>=10 chars). None
when the entry was bulk-added by init.
severity_override: Option<Severity>Acknowledges that the original severity was Critical and the waiver is intentional. Council’s hard rule: any critical bypass must declare itself with this field; missing == critical falls through to exit 1.
expires_at: Option<DateTime<Utc>>Hard deadline. Mandatory for severity_override: critical. After
this timestamp the waiver is treated as expired (logs a warning and
the underlying finding counts toward exit-1 again).
Implementations§
Source§impl BaselineFinding
impl BaselineFinding
Sourcepub fn is_valid_critical_waiver(&self, now: DateTime<Utc>) -> bool
pub fn is_valid_critical_waiver(&self, now: DateTime<Utc>) -> bool
True iff this entry waives a critical via the explicit-override shape (severity_override + reason + expires_at <= 90d).
Sourcepub fn is_expired(&self, now: DateTime<Utc>) -> bool
pub fn is_expired(&self, now: DateTime<Utc>) -> bool
True iff this waiver carries an expires_at that has already passed.
Trait Implementations§
Source§impl Clone for BaselineFinding
impl Clone for BaselineFinding
Source§fn clone(&self) -> BaselineFinding
fn clone(&self) -> BaselineFinding
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BaselineFinding
impl Debug for BaselineFinding
Source§impl<'de> Deserialize<'de> for BaselineFinding
impl<'de> Deserialize<'de> for BaselineFinding
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for BaselineFinding
impl PartialEq for BaselineFinding
Source§impl Serialize for BaselineFinding
impl Serialize for BaselineFinding
impl Eq for BaselineFinding
impl StructuralPartialEq for BaselineFinding
Auto Trait Implementations§
impl Freeze for BaselineFinding
impl RefUnwindSafe for BaselineFinding
impl Send for BaselineFinding
impl Sync for BaselineFinding
impl Unpin for BaselineFinding
impl UnsafeUnpin for BaselineFinding
impl UnwindSafe for BaselineFinding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.