feat(findings): keyed by the code they flag, not its line number (#491) (#497)
CI / Check (push) Skipped
CI / Detect Changes (push) Successful in 3s
CI / Deploy Docs (push) Successful in 1m12s
CI / Deploy MCP (push) Successful in 5m29s
CI / Deploy Dashboard (push) Successful in 7m31s
CI / Deploy Agent (push) Successful in 9m24s

This commit was merged in pull request #497.
This commit is contained in:
sharang committed 2026-10-06 10:35:14 +00:00
1 parent bdf7fa4268
commit ece992da32
8 files changed
+531 -8

No files matched your search

+11
View File
@@ -234,6 +234,15 @@ pub struct Finding {
/// repository has several; for a group, the variant all its places share.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub variant: Option<String>,
/// Fingerprints this finding was stored under before (the line-based ones
/// before #491), so a later scan still recognises it.
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub legacy_fingerprints: Vec<String>,
/// What identifies the flagged code when the scanner knows it better than
/// the line in the tree does (the matched secret of a finding from the
/// git history); never stored.
#[serde(skip)]
pub fingerprint_content: Option<String>,
#[serde(with = "super::serde_helpers::bson_datetime")]
pub created_at: DateTime<Utc>,
#[serde(with = "super::serde_helpers::bson_datetime")]
@@ -282,6 +291,8 @@ impl Finding {
status_history: Vec::new(),
occurrences: Vec::new(),
variant: None,
legacy_fingerprints: Vec::new(),
fingerprint_content: None,
created_at: now,
updated_at: now,
}