pub struct SarifValidator {
    pub level: ValidationLevel,
    pub deep_validation: bool,
    pub validate_references: bool,
    pub validate_uris: bool,
    pub validate_schema: bool,
    pub allow_unknown_properties: bool,
    pub max_depth: Option<usize>,
}Expand description
Comprehensive SARIF validator
Fields§
§level: ValidationLevelValidation strictness level
deep_validation: boolWhether to perform deep validation
validate_references: boolWhether to validate cross-references
validate_uris: boolWhether to validate URIs
validate_schema: boolWhether to validate against JSON schema
allow_unknown_properties: boolWhether to allow unknown properties
max_depth: Option<usize>Maximum allowed nesting depth
Implementations§
Source§impl SarifValidator
 
impl SarifValidator
Sourcepub fn with_level(self, level: ValidationLevel) -> Self
 
pub fn with_level(self, level: ValidationLevel) -> Self
Set validation level
Sourcepub fn with_deep_validation(self, deep: bool) -> Self
 
pub fn with_deep_validation(self, deep: bool) -> Self
Set whether to perform deep validation
Sourcepub fn with_reference_validation(self, validate: bool) -> Self
 
pub fn with_reference_validation(self, validate: bool) -> Self
Set whether to validate cross-references
Sourcepub fn with_uri_validation(self, validate: bool) -> Self
 
pub fn with_uri_validation(self, validate: bool) -> Self
Set whether to validate URIs
Sourcepub fn with_schema_validation(self, validate: bool) -> Self
 
pub fn with_schema_validation(self, validate: bool) -> Self
Set whether to validate against JSON schema
Sourcepub fn with_max_depth(self, depth: Option<usize>) -> Self
 
pub fn with_max_depth(self, depth: Option<usize>) -> Self
Set maximum nesting depth
Sourcepub fn validate_sarif_log(&self, sarif: &SarifLog) -> ValidationResult<()>
 
pub fn validate_sarif_log(&self, sarif: &SarifLog) -> ValidationResult<()>
Validate a SARIF log
Sourcepub fn validate_run(&self, run: &Run) -> ValidationResult<()>
 
pub fn validate_run(&self, run: &Run) -> ValidationResult<()>
Validate a run object
Sourcepub fn validate_tool(&self, tool: &Tool) -> ValidationResult<()>
 
pub fn validate_tool(&self, tool: &Tool) -> ValidationResult<()>
Validate a tool object
Sourcepub fn validate_tool_component(
    &self,
    component: &ToolComponent,
) -> ValidationResult<()>
 
pub fn validate_tool_component( &self, component: &ToolComponent, ) -> ValidationResult<()>
Validate a tool component
Sourcepub fn validate_result(&self, result: &Result) -> ValidationResult<()>
 
pub fn validate_result(&self, result: &Result) -> ValidationResult<()>
Validate a result object
Sourcepub fn validate_message(&self, message: &Message) -> ValidationResult<()>
 
pub fn validate_message(&self, message: &Message) -> ValidationResult<()>
Validate a message object
Sourcepub fn validate_location(&self, location: &Location) -> ValidationResult<()>
 
pub fn validate_location(&self, location: &Location) -> ValidationResult<()>
Validate a location object
Sourcepub fn validate_physical_location(
    &self,
    location: &PhysicalLocation,
) -> ValidationResult<()>
 
pub fn validate_physical_location( &self, location: &PhysicalLocation, ) -> ValidationResult<()>
Validate a physical location
Sourcepub fn validate_artifact_location(
    &self,
    location: &ArtifactLocation,
) -> ValidationResult<()>
 
pub fn validate_artifact_location( &self, location: &ArtifactLocation, ) -> ValidationResult<()>
Validate an artifact location
Sourcepub fn validate_region(&self, region: &Region) -> ValidationResult<()>
 
pub fn validate_region(&self, region: &Region) -> ValidationResult<()>
Validate a region with enhanced SARIF-specific constraints
Sourcepub fn validate_logical_location(
    &self,
    _location: &LogicalLocation,
) -> ValidationResult<()>
 
pub fn validate_logical_location( &self, _location: &LogicalLocation, ) -> ValidationResult<()>
Validate a logical location
Sourcepub fn validate_artifact(&self, artifact: &Artifact) -> ValidationResult<()>
 
pub fn validate_artifact(&self, artifact: &Artifact) -> ValidationResult<()>
Validate an artifact
Sourcepub fn validate_invocation(
    &self,
    _invocation: &Invocation,
) -> ValidationResult<()>
 
pub fn validate_invocation( &self, _invocation: &Invocation, ) -> ValidationResult<()>
Validate an invocation
Sourcepub fn validate_reporting_descriptor(
    &self,
    descriptor: &ReportingDescriptor,
) -> ValidationResult<()>
 
pub fn validate_reporting_descriptor( &self, descriptor: &ReportingDescriptor, ) -> ValidationResult<()>
Validate a reporting descriptor
Sourcepub fn validate_code_flow(&self, code_flow: &CodeFlow) -> ValidationResult<()>
 
pub fn validate_code_flow(&self, code_flow: &CodeFlow) -> ValidationResult<()>
Validate a code flow
Sourcepub fn validate_thread_flow(
    &self,
    thread_flow: &ThreadFlow,
) -> ValidationResult<()>
 
pub fn validate_thread_flow( &self, thread_flow: &ThreadFlow, ) -> ValidationResult<()>
Validate a thread flow
Sourcepub fn validate_thread_flow_location(
    &self,
    _location: &ThreadFlowLocation,
) -> ValidationResult<()>
 
pub fn validate_thread_flow_location( &self, _location: &ThreadFlowLocation, ) -> ValidationResult<()>
Validate a thread flow location
Sourcepub fn validate_fix(&self, fix: &Fix) -> ValidationResult<()>
 
pub fn validate_fix(&self, fix: &Fix) -> ValidationResult<()>
Validate a fix
Sourcepub fn validate_artifact_change(
    &self,
    change: &ArtifactChange,
) -> ValidationResult<()>
 
pub fn validate_artifact_change( &self, change: &ArtifactChange, ) -> ValidationResult<()>
Validate an artifact change
Sourcepub fn validate_replacement(
    &self,
    replacement: &Replacement,
) -> ValidationResult<()>
 
pub fn validate_replacement( &self, replacement: &Replacement, ) -> ValidationResult<()>
Validate a replacement
Sourcepub fn validate_version(&self, version: &str) -> ValidationResult<()>
 
pub fn validate_version(&self, version: &str) -> ValidationResult<()>
Validate a SARIF version string
Sourcepub fn validate_version_with_compatibility(
    &self,
    version: &str,
    strict_compatibility: bool,
) -> ValidationResult<()>
 
pub fn validate_version_with_compatibility( &self, version: &str, strict_compatibility: bool, ) -> ValidationResult<()>
Validate version with compatibility options
Sourcepub fn validate_uri(&self, uri: &str) -> ValidationResult<()>
 
pub fn validate_uri(&self, uri: &str) -> ValidationResult<()>
Validate a URI string with enhanced checks
Sourcepub fn validate_uri_with_context(
    &self,
    uri: &str,
    context: &ValidationContext,
) -> ValidationResult<()>
 
pub fn validate_uri_with_context( &self, uri: &str, context: &ValidationContext, ) -> ValidationResult<()>
Validate URI with context (base URIs)
Sourcepub fn validate_run_references(&self, run: &Run) -> ValidationResult<()>
 
pub fn validate_run_references(&self, run: &Run) -> ValidationResult<()>
Validate cross-references within a run with enhanced checks