pub struct VerificationReport {
pub status: VerificationStatus,
pub integrity_status: CheckStatus,
pub security_status: CheckStatus,
pub issues: Vec<VerificationIssue>,
pub total_entries: usize,
pub suspicious_entries: usize,
pub total_size: u64,
pub format: ArchiveType,
}Expand description
Result of archive verification.
Generated by verify_archive(), contains security and integrity checks
performed without extracting files to disk.
§Examples
use exarch_core::SecurityConfig;
use exarch_core::VerificationStatus;
use exarch_core::verify_archive;
let config = SecurityConfig::default();
let report = verify_archive("archive.tar.gz", &config)?;
if report.status == VerificationStatus::Pass {
println!("Archive is safe to extract");
} else {
eprintln!("Security issues found:");
for issue in report.issues {
eprintln!(" [{}] {}", issue.severity, issue.message);
}
}Fields§
§status: VerificationStatusOverall verification status
integrity_status: CheckStatusIntegrity check result
security_status: CheckStatusSecurity check result
issues: Vec<VerificationIssue>List of all issues found (sorted by severity)
total_entries: usizeTotal entries scanned
suspicious_entries: usizeEntries flagged as suspicious
total_size: u64Total uncompressed size
format: ArchiveTypeArchive format
Implementations§
Source§impl VerificationReport
impl VerificationReport
Sourcepub fn is_safe(&self) -> bool
pub fn is_safe(&self) -> bool
Returns true if the archive is safe (no critical or high severity issues).
Sourcepub fn has_critical_issues(&self) -> bool
pub fn has_critical_issues(&self) -> bool
Returns true if there are any critical severity issues.
Sourcepub fn issues_by_severity(
&self,
severity: IssueSeverity,
) -> Vec<&VerificationIssue>
pub fn issues_by_severity( &self, severity: IssueSeverity, ) -> Vec<&VerificationIssue>
Returns issues of a specific severity level.
Trait Implementations§
Source§impl Clone for VerificationReport
impl Clone for VerificationReport
Source§fn clone(&self) -> VerificationReport
fn clone(&self) -> VerificationReport
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 moreAuto Trait Implementations§
impl Freeze for VerificationReport
impl RefUnwindSafe for VerificationReport
impl Send for VerificationReport
impl Sync for VerificationReport
impl Unpin for VerificationReport
impl UnwindSafe for VerificationReport
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