
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
active_model_coercions
Advanced tools
Currently, it's just an experimental coercion proof of concept for ActiveModel objects. However if you see some areas of improvement or want to discuss some stuff - feel free to open an issue/pull request.
Add this line to your application's Gemfile:
gem 'active_model_coercions'
And then execute:
$ bundle
Or install it yourself as:
$ gem install active_model_coercions
class TestModel
include ActiveModel::Model
include ActiveModel::Coercions
attr_accessor :number, :date, :state
attribute :number, :integer
attribute :state, :symbol
end
params = {number: '1', state: 'active'}
model = TestModel.new(params)
model.number # => 1
model.state # => :active
model.attributes # => {number: 1, state: :active}
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that active_model_coercions 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.