pub mod allowlist;
pub mod banner;
pub mod config;
mod dedup;
mod finding;
pub mod report;
mod source;
mod spec;
use std::borrow::Cow;
pub mod registry;
pub use allowlist::*;
pub use config::*;
pub use dedup::*;
pub use finding::*;
pub use report::*;
pub use source::*;
pub use spec::*;
mod embedded {
include!(concat!(env!("OUT_DIR"), "/embedded_detectors.rs"));
}
pub fn embedded_detector_tomls() -> &'static [(&'static str, &'static str)] {
embedded::EMBEDDED_DETECTORS
}
pub fn redact(s: &str) -> Cow<'static, str> {
let char_count = s.chars().count();
if char_count <= 8 {
return Cow::Borrowed("****");
}
let first_four: String = s.chars().take(4).collect();
let last_four: String = s.chars().skip(char_count.saturating_sub(4)).collect();
Cow::Owned(format!("{}...{}", first_four, last_four))
}