pub struct HostnameRecognizer;Expand description
Recognizes internal hostnames and machine names that can leak infrastructure.
§Examples
use cloakrs_core::{EntityType, Recognizer};
use cloakrs_patterns::HostnameRecognizer;
let findings = HostnameRecognizer.scan("connecting to db-prod-01.internal.company.com");
assert_eq!(findings[0].entity_type, EntityType::Hostname);
assert_eq!(findings[0].text, "db-prod-01.internal.company.com");Trait Implementations§
Source§impl Clone for HostnameRecognizer
impl Clone for HostnameRecognizer
Source§fn clone(&self) -> HostnameRecognizer
fn clone(&self) -> HostnameRecognizer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HostnameRecognizer
impl Debug for HostnameRecognizer
Source§impl Default for HostnameRecognizer
impl Default for HostnameRecognizer
Source§fn default() -> HostnameRecognizer
fn default() -> HostnameRecognizer
Returns the “default value” for a type. Read more
Source§impl Recognizer for HostnameRecognizer
impl Recognizer for HostnameRecognizer
Source§fn entity_type(&self) -> EntityType
fn entity_type(&self) -> EntityType
The entity type this recognizer detects.
Source§fn supported_locales(&self) -> &[Locale]
fn supported_locales(&self) -> &[Locale]
Locales this recognizer applies to. Empty means universal.
impl Copy for HostnameRecognizer
Auto Trait Implementations§
impl Freeze for HostnameRecognizer
impl RefUnwindSafe for HostnameRecognizer
impl Send for HostnameRecognizer
impl Sync for HostnameRecognizer
impl Unpin for HostnameRecognizer
impl UnsafeUnpin for HostnameRecognizer
impl UnwindSafe for HostnameRecognizer
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