Skip to main content

exarch_core/security/
mod.rs

1//! Security validation modules.
2
3pub(crate) mod boundary;
4pub(crate) mod context;
5pub(crate) mod hardlink;
6pub(crate) mod path;
7pub(crate) mod permissions;
8pub(crate) mod quota;
9pub(crate) mod symlink;
10pub mod validator;
11pub(crate) mod zipbomb;
12
13// Re-export public API types
14pub use validator::EntryValidator;
15pub use validator::ValidatedEntry;
16pub use validator::ValidatedEntryType;
17pub use validator::ValidationReport;
18
19// QuotaPermit rides inside the unconditionally-public
20// ValidatedEntryType::File, so it must be exported ungated: a
21// `#[cfg(feature = "testing")]` re-export (as `QuotaTracker` gets below)
22// would be a private-type-in-public-interface compile error.
23pub use quota::QuotaPermit;
24
25// Security primitives exposed under the `testing` feature for external
26// benchmarks and integration tests that cannot access pub(crate) items.
27#[cfg(feature = "testing")]
28pub use hardlink::HardlinkTracker;
29#[cfg(feature = "testing")]
30pub use path::validate_path;
31#[cfg(feature = "testing")]
32pub use permissions::sanitize_permissions;
33#[cfg(feature = "testing")]
34pub use quota::QuotaTracker;
35#[cfg(feature = "testing")]
36pub use symlink::validate_symlink;
37#[cfg(feature = "testing")]
38pub use zipbomb::validate_compression_ratio;