dd_sds/
lib.rs

1// This blocks accidental use of `println`. If one is actually needed, you can
2// override with `#[allow(clippy::print_stdout)]`.
3#![deny(clippy::print_stdout)]
4#![allow(clippy::new_without_default)]
5
6mod encoding;
7mod event;
8mod match_action;
9
10#[cfg(any(test, feature = "testing", feature = "bench"))]
11mod event_json;
12mod match_validation;
13mod normalization;
14mod observability;
15mod parser;
16mod path;
17mod proximity_keywords;
18mod rule_match;
19mod scanner;
20mod scoped_ruleset;
21mod secondary_validation;
22mod simple_event;
23mod stats;
24mod validation;
25
26pub use simple_event::SimpleEvent;
27
28// This is the public API of the SDS core library
29pub use encoding::{EncodeIndices, Encoding, Utf8Encoding};
30pub use event::{Event, EventVisitor, VisitStringResult};
31pub use match_action::{MatchAction, PartialRedactDirection};
32
33pub use match_validation::{
34    config::AwsConfig, config::AwsType, config::CustomHttpConfig, config::HttpMethod,
35    config::HttpStatusCodeRange, config::HttpValidatorOption, config::InternalMatchValidationType,
36    config::MatchValidationType, config::RequestHeader, match_status::MatchStatus,
37};
38pub use observability::labels::Labels;
39pub use path::{Path, PathSegment};
40pub use rule_match::{ReplacementType, RuleMatch};
41pub use scanner::shared_pool::{SharedPool, SharedPoolGuard};
42
43pub use scanner::error::MatchValidationError;
44pub use scanner::{
45    config::RuleConfig,
46    error::CreateScannerError,
47    regex_rule::config::{ProximityKeywordsConfig, RegexRuleConfig, SecondaryValidator},
48    regex_rule::RegexCaches,
49    scope::Scope,
50    CompiledRule, MatchEmitter, RootCompiledRule, RootRuleConfig, ScanOptionBuilder, Scanner,
51    ScannerBuilder, SharedData, StringMatch,
52};
53pub use scoped_ruleset::ExclusionCheck;
54pub use validation::{
55    get_regex_complexity_estimate_very_slow, validate_regex, RegexValidationError,
56};
57
58#[cfg(any(feature = "testing", feature = "bench"))]
59pub use crate::{
60    scoped_ruleset::{ContentVisitor, RuleIndexVisitor, ScopedRuleSet},
61    secondary_validation::{LuhnChecksum, Validator},
62};