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.
Adds tagging in context (and aggregation of those tags) to your MongoMapper models. Tag weight and distribution methods make it easy to find real-time taxonomical hotspots in datastore. Taggregator Uses MongoDB's increment/decrement ($inc
/$dec
) to keep real-time counts of individual tags in context with optional type. Based on Mongoid Taggable With Context.
Taggregator is easy to use. Just include the MongoMapper plugin in your model the normal way and call taggable
, like so:
class Article
include MongoMapper::Document
plugin MongoMapper::Plugins::Taggregator
key :title, String
key :body, String
taggable
taggable :keywords
taggable :ads, :separator => ','
end
a = Article.new
Tags are then set with a string by calling a.tags = 'space separated tags'
. The tag separator character defaults to the space character, but as you see in the above example, it can be overridden with any character or string of your choice. If we follow the lead of the example, we would set a.ads
by calling a.ads = 'comma,separated,tags'
. The call to taggable
injects an array representation of the model's taggable fields with context, accessible through a.tags_array
, a.keywords_array
, and a.ads_array
. If you have an array of tags (strings) and wish to set the tags array manually, you can (i.e., a.ads_array = ['xmas', 'shopping', 'books']
). When the string a.ads
is set, a.ads_array
is populated with the individual tags. Likewise, setting the tags array populates the string representation of the tag list for that context.
The call to taggable
will mixes in some cool stuff. You can get all articles tags with a call to Article.tags
and all tags (in the 'keywords' context) with Article.keywords
. If you would like to get a list of all keywords with the keyword's associated frequency/weight, try this:
Article.tags_with_weight_for :keywords
=> [["stocks", 4], ["finance", 4], ["banking", 3], ["bonds", 1]]
Copyright © 2011 Mark Coates and dtime, inc. (http://dtime.com). See LICENSE.txt for further details.
FAQs
Unknown package
We found that taggregator 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.