Skip to content

Conversation

@tobias-wilfert
Copy link
Member

Adds the logic to scrub the attachment body as well as the attachment meta.

@tobias-wilfert tobias-wilfert self-assigned this Dec 5, 2025
let ExpandedAttachment { meta, body } = attachment;

relay_pii::eap::scrub(
ValueType::Attachments, // TODO: How do we event want to allow people to filter here?
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if Span or Attachment makes more sense here for the user.

@tobias-wilfert tobias-wilfert marked this pull request as ready for review December 9, 2025 08:58
@tobias-wilfert tobias-wilfert requested a review from a team as a code owner December 9, 2025 08:58
Copy link
Member

@jjbayer jjbayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!


let processor = PiiAttachmentsProcessor::new(config.compiled());
let mut payload = body.to_vec();
if processor.scrub_attachment(filename, &mut payload) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should emit the timer(RelayTimers::AttachmentScrubbing) metric here, either directly or by calling processing::utils::attachments::scrub_attachment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants