
Security News
Nx npm Packages Compromised in Supply Chain Attack Weaponizing AI CLI Tools
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
encookie
is a Ruby gem that provides a Rack session middleware implementation.
This implementation stores all data in the HTTP cookies - like Rack::Session::Cookie
,
but also encrypts the contents of the cookies so it cannot be read by the user.
Encryption and authentication is provided by OpenSSL's aes-128-gcm
cipher.
This means that there is no need for a separate MAC step or a second key.
# Gemfile
gem 'encookie'
# config.ru
require 'encookie'
key = ['7881e46e1e40484756485019038703c2'].pack 'H*'
use Rack::Session::Encookie, key: key
# app.rb
get '/' do
session[:yourdata] = 'super secret persistent data'
end
Bug reports and pull requests are welcome on GitHub at https://github.com/glassechidna/encookie.
FAQs
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
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.
Security News
A clarification on our recent research investigating 60 malicious Ruby gems.