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.
Has related is used by Reevoo to create similar product recommendations.
Example Index Builder:
namespace :apache do
desc "Parse the last apache logs for similar products"
task :find_similar_products => :environment do
log_files = ENV["LOG_FILES"] || "/var/log/httpd/access.*.gz"
prefs = Hash.new{|h,k| h[k] = Hash.new(0) }
Dir.glob(log_files) do |filename|
File.open(filename) do |f|
Zlib::GzipReader.new(f).each_line do |line|
product_id, ip = parse_log_line(line)
if product_id and ip
prefs[product_id][ip] += 1
end
end
end
end
HasRelated.dump_dataset(prefs, "Product")
end
end
(You will need to define your own parse_log_line
method)
Example Usage:
class Product < ActiveRecord::Base
has_related "related_products"
end
most_related_product = Product.related_products.first
Happy hunting.
FAQs
Unknown package
We found that cwninja-has_related 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.