Repository navigation
fix: encrypt postal addresses with lockbox - #301
Open
jaspermayone wants to merge 3 commits into
Open
jaspermayone wants to merge 3 commits into
jaspermayone wants to merge 3 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Postal addresses were stored in plain text. This PR encrypts them with Lockbox, like the other personal data in Weave. It fixes code scanning alert #7.
line1toline3,city,postal_code,nickname, the contact name, email and phone,shipping_notes,latitudeandlongitude.stateandcountrystay in plain text, because residency checks and deletion aggregates read them in SQL.Addressignores the old plain-text columns, so new writes go only to ciphertext.filter_parametersnow filters*_address_attributes, so the address form does not reach the request log.Address.ransackable_attributesisidonly. No caller searched the street lines.Migrations
Address.restart: falsefills only rows with no ciphertext, so a second run does not wipe rows that the new code wrote.Checks
bundle exec rspec: 2890 examples, 0 failures. Address, migration and request specs ran again after the review fixes: 1105 examples, 0 failures.bin/rubocop: no offenses.bin/brakeman: no warnings.db/schema.rbis edited by hand to add only the new columns. The private test DB would also dump the queue tables.