Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
class Entity
include RMachine
r_machine do |state|
state.field = :status
state.initial = :created
state.on :event_without_param do |event|
event.change_to :second_state, from: :created
event.change_to :third_state, from: :second_state
event.change_to :fourth_state, from: :third_state, if: :is_this_true?
end
state.on :event_with_param do |event|
event.change_to :second_state, from: :created
event.change_to :third_state, from: :second_state
event.change_to :fourth_state, from: :third_state, if: :is_param_correct?
end
end
def event_without_param
super
end
def event_with_param(param_to_verify)
super
end
def is_this_true?
true
end
def is_param_correct?(param_to_verify)
if param_to_verify == :expected
true
else
false
end
end
end
entity = Entity.new
puts entity.status # :created
entity.event_without_param
puts entity.status # :second_state
entity.event_with_param(:any)
puts entity.status # :third_state
entity.event_with_param(:any) # raises StateTransactionNotPermittedError
entity.event_with_param(:expected)
puts entity.status # :fourth_state
entity.status = :created
puts entity.status # :created
FAQs
Unknown package
We found that r_machine 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
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.