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

Add redactedKeys for removing sensitive values from metadata #540

Merged
merged 4 commits into from
Apr 16, 2020

Conversation

fractalwrench
Copy link
Contributor

Goal

Adds the redactedKeys property to Configuration which allows a user to specify sensitive keys. Any sensitive values present in the metadata of BugsnagEvent will be replaced by "[REDACTED]" when serialized to JSON.

Changeset

  • Added redactedKeys property to Configuration, which by default is an array of "password"
  • Set the redactedKeys on each BugsnagEvent using the Configuration value
  • Sanitised the metadata at the point of JSON serialization when
  • BugsnagEvent now redacts sensitive values with any key that is considered redacted

Tests

  • Added unit tests to verify the default value of redactedKeys and its effect on JSON serialization
  • Added tests to macOS/tvOS projects which already existed on the file system but which were not part of the xcodeproj file

@fractalwrench fractalwrench marked this pull request as ready for review April 15, 2020 14:00
Copy link
Contributor

@robinmacharg robinmacharg left a comment

Choose a reason for hiding this comment

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

A couple of minor nits, and a query over whether we should also be checking for Regular Expressions (regex inclusion discussed offline).

Copy link
Contributor

@robinmacharg robinmacharg left a comment

Choose a reason for hiding this comment

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

Thanks for the changes. LGTM. 👍

@fractalwrench fractalwrench merged commit c5bf068 into v6 Apr 16, 2020
@fractalwrench fractalwrench deleted the v6-redaction branch April 16, 2020 14:39
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.

2 participants