Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
EventLogger allows you to log events from anywhere in you Rails appliaction. Once logged these events can be used to run statistics on the types of events logged. Each event can store a seralized ruby object so you have access to detailed information regarding your event.
Add this line to your application's Gemfile:
gem 'event_logger'
And then execute:
$ bundle
Generate the event_logs table migration
$ rake g event_logger
Run the migration
$ rake db:migrate
All controllers have access to the log_event
method. This method takes two arguments
Anytime you wish to track an event use this method. For example if we want to track failed user signups we would do this
class RegistrationsController < ApplicationController
def create
...
log_event('user_signup_failed', current_user)
...
end
end
This will later allow us to run analytics on these events. If we want to know the number of failed signups we just need to ask
EventLogger::EventLog.where(:event => 'user_signup_failed').count
We also have full acess to the objects within the event
event = EventLogger::EventLog.where(:event => 'user_signup_failed').last
event.object
=> #<User first_name: "Ryan", last_name: "Howard">
event.object.first_name
=> "Ryan"
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that event_logger 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’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.