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.
This tracks the number of active objects during a certain time period in a Redis sorted set. Object activity is defined by your application, and is out of the scope of this library.
gem install active_set
When an object is active, it gets added to a Redis set with a timestamp.
set = ActiveSet.new(:objects)
set.add(1, Time.now) # Time.now is default if no time is given.
This is equivalent to the following Redis command:
ZADD active:objects 1305054408 "1"
We can count the number of items in the set:
set.count # => 1
# ZCARD active:objects
You can also count the active items since a given time:
set.count(1302462660)
# ZCOUNT active:objects 1302462660 +inf
The set should be trimmed periodically so that old objects aren't counted.
set.trim(1302462660)
# ZREMRANGEBYSCORE active:objects -inf (1302462660
If no trim date is given, 30 days is assumed.
You can also check if an object is in the active set, and get it's last timestamp.
set.include?(1)
set.timestamp_for(1) # => Time
# ZSCORE active:objects "1"
If you'd like to hack on ActiveSet, start by forking the repo on GitHub:
https://github.com/technoweenie/redis_active_set
The best way to get your changes merged back into core is as follows:
technoweenie/redis_active_set
project.FAQs
Unknown package
We found that active_set 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.