Class: LogStruct::ConfigStruct::Filters
- Inherits:
-
T::Struct
- Object
- T::Struct
- LogStruct::ConfigStruct::Filters
- Includes:
- Sorbet::SerializeSymbolKeys
- Defined in:
- lib/log_struct/config_struct/filters.rb
Constant Summary collapse
- DEFAULT_SENSITIVE_KEY_PATTERN =
Default regex pattern for matching sensitive keys. Matches keys containing: password, token, secret, auth, cred Also matches specific key patterns: api_key, secret_key, private_key, access_key, encryption_key Examples: access_token, api_key, auth_header, credentials Uses start/end of string or underscore/hyphen boundaries to prevent false positives like "keyboard" or "turkey" (which contain "key" mid-word) Note: "key" alone is too broad (matches cron_key, primary_key), so we only match specific sensitive key patterns
T.let( /(^|[_-])(password|token|secret|auth|cred)([_-]|$)|(^|[_-])(api|secret|private|access|encryption)_key([_-]|$)/i, Regexp )