Skip to main content

Crate guardrail

Crate guardrail 

Source

Re-exports§

pub use cache::FsCache;
pub use cache::FsFingerprinter;
pub use config::DefaultsProvider;
pub use config::DirectoryProvider;
pub use config::MockProvider;
pub use config::RuleProvider;
pub use engine::NixStoreNormalizer;
pub use engine::PrefixPrefilter;
pub use engine::ProductionNormalizer;
pub use engine::RegexEngine;
pub use engine::RuleEngine;
pub use engine::SqlCommentStripper;
pub use model::Category;
pub use model::Decision;
pub use model::GuardrailConfig;
pub use model::ParseEnumError;
pub use model::Rule;
pub use model::RuleBuilder;
pub use model::Severity;

Modules§

biometric
Biometric authentication for guardrail bypass on macOS.
cache
config
engine
hook
journal
Write journal — tracks recently written files for chaining detection.
model
testing

Structs§

ChainedNormalizer
Generic normalizer combinator: applies A then B.
FixedFingerprinter
Fixed fingerprint for testing.
IdentityNormalizer
No-op normalizer — returns input unchanged.
MemCache
Thread-safe in-memory cache.
NullPrefilter
No-op prefilter — nothing is safe, all inputs reach the DFA.
PathNormalizer
Strips absolute path prefixes from inputs:

Traits§

CacheStore
Trait for cache storage — abstracts filesystem for testability.
Fingerprinter
Trait for fingerprinting — abstracts input to a hash.
Normalizer
Abstracts input normalization (e.g. stripping path prefixes).
Prefilter
Abstracts the fast-reject prefilter that skips DFA matching for inputs that are definitely safe.