Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attempt to scrub all Plug.Conns in Sentry.PlugCapture #619

Merged
merged 2 commits into from Oct 4, 2023

Conversation

whatyouhide
Copy link
Collaborator

Closes #477.

This is not foolproof, but I think it's pretty effective.

# We can't pattern match here, because we're not guaranteed to have
# Phoenix available.
exception =
if is_struct(exception, Phoenix.ActionClauseError) do
Copy link
Member

Choose a reason for hiding this comment

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

isn't doing this just for ActionClauseError too limited?
like it solves the issue but similar leakage could happen in other exceptions too right?

Copy link
Member

@sl0thentr0py sl0thentr0py left a comment

Choose a reason for hiding this comment

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

left a comment if we want to add other exception types, make that list configurable?
otherwise lgtm

@whatyouhide
Copy link
Collaborator Author

@sl0thentr0py sadly we can't really do that, because we're being very specific with the shape of the Phoenix.ActionClauseError exception here. This exception has a args field that other exceptions might not. In any case, users can always filter or change reported events with :before_send_event, so this is mostly a convenience so that Phoenix user get this scrubbing done out of the box.

@whatyouhide whatyouhide merged commit 1fc0c5e into master Oct 4, 2023
3 checks passed
@whatyouhide whatyouhide deleted the al/scrub-everywhere branch October 4, 2023 20:44
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.

Sensitive data not scrubbed out of Phoenix.ActionClauseError
2 participants