pub struct RuleMeta {
pub sarif_id: &'static str,
pub name: &'static str,
pub short_description: &'static str,
pub default_severity: ViolationSeverity,
pub refs: &'static [(StandardKind, &'static str)],
pub remediation: &'static str,
}Expand description
Static metadata attached to a compliance rule. The rule_id on every
[Violation] indexes into rule_meta; the registry — not the
human-readable message — is the single source of truth for the
externally-visible SARIF rule ID, the harmonised-standard cross-references,
and the remediation text. Rewording a message can no longer silently
re-bucket a GitHub code-scanning rule or drop a prEN/BSI reference.
Fields§
§sarif_id: &'static strExternally-visible SARIF rule ID (e.g., SBOM-CRA-MACHINE-READABLE).
GitHub code scanning dedups on this value, so it must stay stable.
name: &'static strPascalCase SARIF reportingDescriptor.name for the externally-visible
rule identified by RuleMeta::sarif_id. Internal keys that alias to
a shared SARIF rule (key != sarif_id) carry the canonical
descriptor’s name, so every alias renders identically.
short_description: &'static strSARIF reportingDescriptor.shortDescription text for the
externally-visible rule. Like RuleMeta::name, aliased keys share
the canonical descriptor’s text.
default_severity: ViolationSeverityDocumentation-default severity for the rule. Push sites may still
escalate/relax the concrete [Violation::severity] by product class or
CRA phase. The SARIF rule catalogue is generated from this value (see
registry_severity_matches_sarif_catalogue in
tests/sarif_rule_catalogue_tests.rs).
refs: &'static [(StandardKind, &'static str)]Harmonised-standard / regulation cross-references, in display order.
remediation: &'static strRemediation guidance shown in reports and the TUI.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for RuleMeta
impl RefUnwindSafe for RuleMeta
impl Send for RuleMeta
impl Sync for RuleMeta
impl Unpin for RuleMeta
impl UnsafeUnpin for RuleMeta
impl UnwindSafe for RuleMeta
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more