basecamp / basecamp/console1984
Avoid potential data corruption by allowing decryption by default
- Dominant language
- Ruby
- Stars
- 844
- Forks
- 44
- PR merge metrics
- No merged PRs in 30d
Description
In our app we have methods that read encrypted attributes from one record and save them in another record.
```
# first_name is encrypted
user = User.find(id)
other_user = User.find(other_id)
other_user.first_name = user.first_name
other_user.save!
```
My worry is that someone does this in a (production) console without running decrypt! first potentially corrupting other_user (which will now have the encrypted version of first_name encrypted again and saved instead of first_name).
How do you avoid this?
Potential solution could be to make encryption optional (we mainly use console1984 for the logging and auditing so we could turn it off).
Another solution could be to not decrypt console output but to still make any other output decrypted (maybe also make this a configuration option).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by examining console1984's handling of encrypted attribute reads and writes, using the User.find and attribute-assignment example as the reproduction. Determine whether the intended behavior is optional encryption or different console output handling, then verify that copying an encrypted attribute cannot save a doubly encrypted value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- devtools, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100