
Security News
Follow-up and Clarification on Recent Malicious Ruby Gems Campaign
A clarification on our recent research investigating 60 malicious Ruby gems.
Add encrypted fields to ActiveRecord models easily
Add this line to your application's Gemfile:
gem 'action_encrypt'
And then execute:
$ bundle
Install migrations:
$ rails action_encrypt:install:migrations
Create action_encrypt.rb
in your initializers folder and set encryption keys. Generate them
using SecureRandom.hex(32)
. You can decide between storing the values in ENV or using rails encrypted credentials system.
ActionEncrypt.configure do |config|
config.key_encryption_key = ENV.fetch('KEY_ENCRYPTION_KEY')
config.blind_index_key = ENV.fetch('BLIND_INDEX_KEY')
end
Create a Data Encryption Key
$ ActionEncrypt::DataEncryptionKey.generate!(primary: true)
Add an encrypted field to your models
class User < ApplicationRecord
has_encrypted :ssn
end
Now you can use user.ssn as you would any other attribute, but it will be stored securely in the action_encrypt_encrypted_fields table.
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that action_encrypt demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.
Security News
ESLint now supports parallel linting with a new --concurrency flag, delivering major speed gains and closing a 10-year-old feature request.
Research
/Security News
A malicious Go module posing as an SSH brute forcer exfiltrates stolen credentials to a Telegram bot controlled by a Russian-speaking threat actor.