Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
An action based auditor, which has internal as well as outgoing link tracking.
It is inspired from many great audit gems in rails community that audits model and I was looking for a gem which can audit based on actions as well as can audit link tracking. This gem just serve this purpose.
Roughly it is doing similar to what Omniture does, but has very minimum features for now.
Now also has analytics(charts) for User counts
For rails 4.0 & 3.2.6 + and ruby>1.9.2:
gem install audit_rails
or in application’s Gemfile add:
gem ‘audit_rails’
rails g audit_rails:install
rake audit_rails:install:migrations
Add attributes to migration generated from above rake task
Inherit from AuditRails::Audit:
# MyApp/app/models/audit.rb
class Audit < AuditRails::Audit
# attr_accessible is only needed for Rails 3.2.6+ not needed for Rails 4+
attr_accessible :action, :controller, :description, :user_name,
:book_id
# add associations as usual:
belongs_to :book
end
Simply call 'add_to_audit' with desired parameters in any controller (as this is now a helper method included in application_controller.rb of application)
Simply re-implement in application_controller.rb
Override current_user method in application controller, e.g.:
def current_user
add_to_audit('login', 'sessions', "John Smith")
super
end
Go to <app-url>/audit_rails/audits/analytics
Add this to initializers/mime_types.rb
Mime::Type.register "application/vnd.ms-excel", :xls
Use below link in views:
link_to audit_rails.audits_path(:format => "xls")
https://github.com/gouravtiwari/audit_rails/blob/master/CHANGELOG.rdoc
You are welcome to contribute and add more feature to this gem. I have added rspec and guard to it to run tests quickly. So running specs shouldn't be a problem.
Please fork it, add specs and send a pull request!
This project rocks and uses MIT-LICENSE.
FAQs
Unknown package
We found that audit_rails 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
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.