OwlCyberSecurity - MANAGER
Edit File: scrubber.cpython-312.pyc
� G��g; � �p � d dl mZmZmZ d dlmZmZmZmZ erd dl m Z d dlmZ g d�Zg d�Z G d� d� Zy ) � )�capture_internal_exceptions�AnnotatedValue�iter_event_frames)� TYPE_CHECKING�cast�List�Dict)�Event)�Optional) �password�passwd�secret�api_key�apikey�auth�credentials� mysql_pwd� privatekey�private_key�token�session� csrftoken� sessionid�x_csrftoken�x_forwarded_for� set_cookie�cookie� authorization� x_api_key�aiohttp_sessionzconnect.sid� csrf_token�csrf�_csrf�_csrf_token� PHPSESSID�_session�symfony�user_session�_xsrfz XSRF-TOKEN)r � x_real_ip� ip_address�remote_addrc �L � e Zd Z dd�Zd� Zd� Zd� Zd� Zd� Zd� Z d � Z d � Zd� Zy) � EventScrubberNc � � |�t j � n|| _ |s-|�t j � n|}| xj |z c_ | j D �cg c] }|j � �� c}| _ || _ yc c}w )a A scrubber that goes through the event payload and removes sensitive data configured through denylists. :param denylist: A security denylist that is always scrubbed, defaults to DEFAULT_DENYLIST. :param recursive: Whether to scrub the event payload recursively, default False. :param send_default_pii: Whether pii is sending is on, pii fields are not scrubbed. :param pii_denylist: The denylist to use for scrubbing when pii is not sent, defaults to DEFAULT_PII_DENYLIST. N)�DEFAULT_DENYLIST�copy�denylist�DEFAULT_PII_DENYLIST�lower� recursive)�selfr2 r5 �send_default_pii�pii_denylist�xs �B/opt/hc_python/lib/python3.12/site-packages/sentry_sdk/scrubber.py�__init__zEventScrubber.__init__>