pub struct Finding {
pub kind: &'static str,
pub source: FindingSource,
pub span: (usize, usize),
pub confidence: f32,
pub risk_delta: u32,
}Expand description
统一 finding 结构;Hard 和 Model 使用同一类型,merge 后 caller 按 source 区分
需要时的差异化处理(如审计展现 / risk 加权)。
Fields§
§kind: &'static strlabel 字面量(Hard 侧:见 HARD_RULES name;Model 侧:private_* / secret / account_number)
source: FindingSource来源层
span: (usize, usize)byte 区间 [start, end)(UTF-8 offset,与 tokenizer offsets 对齐)
confidence: f32置信度 [0.0, 1.0];Hard 总为 1.0(正则命中即确定);Model 为 softmax
risk_delta: u32风险加权基础值(ADR 0012 §1.3 风险分级);merge 后 caller 累加
Implementations§
Trait Implementations§
impl StructuralPartialEq for Finding
Auto Trait Implementations§
impl Freeze for Finding
impl RefUnwindSafe for Finding
impl Send for Finding
impl Sync for Finding
impl Unpin for Finding
impl UnsafeUnpin for Finding
impl UnwindSafe for Finding
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