pub struct FalsePositiveReport {
pub rule_id: String,
pub extension: Option<String>,
pub matched_pattern: Option<String>,
pub description: Option<String>,
pub anonymous_id: Option<String>,
pub version: String,
pub reported_at: String,
}Expand description
A false positive report for submission.
Fields§
§rule_id: StringThe rule ID that triggered the false positive (e.g., “SL-001”)
extension: Option<String>File extension where the false positive occurred (optional, for patterns)
matched_pattern: Option<String>The pattern that matched (optional, redacted for privacy)
description: Option<String>User description of why this is a false positive
anonymous_id: Option<String>Anonymous identifier (SHA256 hash) for deduplication
version: Stringcc-audit version
reported_at: StringReport timestamp (ISO 8601)
Implementations§
Source§impl FalsePositiveReport
impl FalsePositiveReport
Sourcepub fn with_extension(self, ext: impl Into<String>) -> Self
pub fn with_extension(self, ext: impl Into<String>) -> Self
Set the file extension.
Sourcepub fn with_pattern(self, pattern: impl Into<String>) -> Self
pub fn with_pattern(self, pattern: impl Into<String>) -> Self
Set the matched pattern (will be redacted for privacy).
Sourcepub fn with_description(self, desc: impl Into<String>) -> Self
pub fn with_description(self, desc: impl Into<String>) -> Self
Set the user description.
Sourcepub fn with_anonymous_id(self, seed: impl AsRef<[u8]>) -> Self
pub fn with_anonymous_id(self, seed: impl AsRef<[u8]>) -> Self
Generate and set an anonymous ID from machine-specific data.
Sourcepub fn to_github_issue_body(&self) -> String
pub fn to_github_issue_body(&self) -> String
Format the report as a GitHub Issue body.
Sourcepub fn to_github_issue_title(&self) -> String
pub fn to_github_issue_title(&self) -> String
Format the report as a GitHub Issue title.
Trait Implementations§
Source§impl Clone for FalsePositiveReport
impl Clone for FalsePositiveReport
Source§fn clone(&self) -> FalsePositiveReport
fn clone(&self) -> FalsePositiveReport
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FalsePositiveReport
impl Debug for FalsePositiveReport
Source§impl<'de> Deserialize<'de> for FalsePositiveReport
impl<'de> Deserialize<'de> for FalsePositiveReport
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FalsePositiveReport
impl RefUnwindSafe for FalsePositiveReport
impl Send for FalsePositiveReport
impl Sync for FalsePositiveReport
impl Unpin for FalsePositiveReport
impl UnwindSafe for FalsePositiveReport
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
Mutably borrows from an owned value. Read more