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.
evilmarty_activity_stream
Advanced tools
Activity Stream will keep trace of your activity on the db.
This Gem is sutable for whom have installed the plugin activity_stream by evilmarty and want to use it with a Gem.
All tests are passing.
Add this line to your application's Gemfile:
gem 'activity_stream'
And then execute:
$ bundle
Or install it yourself as:
$ gem install activity_stream
See below original readme.
Contributions are welcome, but be aware that we're not the original developers of the code and our own part was to move the existing code into a Gem.
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)A dead easy way to log activity streams.
script/plugin install http://github.com/evilmarty/activity_stream
Then run...
script/generate activity_stream
this will create the Activity model and place it in your app/models path as a migration file.
DON'T FORGET to add :activity_observer to your config.active_record.observers in environments.rb like so...
config.active_record.observers = :activity_observer
For all the models you want to log an activity for do the following...
class Comment < ActiveRecord::Base log_activities end
this will log an activity for :create, :update and :destroy. To only log an activity for :create simply say so...
class Comment < ActiveRecord::Base log_activities :create end
You can also pass a Proc which can be used to check whether to log the activity or not, just return false
class Comment < ActiveRecord::Base log_activities :create, :destroy log_activities :update do |record| record.status == 1 end end
and you can call it multiple times for different actions with different Procs
Now once your done with your logging, it's time to define your actors. Like so...
class User < ActiveRecord::Base acts_as_actor end
and now when you want to log activities simply do the following in your controllers or wherever you please
class CommentsController < ApplicationController def create current_user.log_activity('web') do Comment.create params[:comment] end end end
that little argument for log_activity is the context of the activity but you can omit it should you feel so.
Copyright (c) 2009 Marty Zalega (evil.marty@gmail.com), released under the MIT license
FAQs
Unknown package
We found that evilmarty_activity_stream 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.