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.
The purpose of Simple Stats Store is to provide a simple and lightweight method for multiple processes to dump data into an SQLite database without contention.
It is appropriate to be used when:
This is achieved by the threads dropping uniquely named files into a common directory containing the statistics which are then picked up by a single thread that is the sole accessor of the database.
Create the repository for temporary data files:
require 'simple_stats_store/file_dump'
dir = '/path/to/temporary/data/directory'
Dir.mkdir(dir)
data_dump = SimpleStatsStore::FileDump.new(dir)
Set up the database:
require 'simple_stats_store/server'
require 'active_record'
db_file = '/path/to/database.sql'
ActiveRecord::Base.establish_connection(
adapter: :sqlite3,
database: db_file,
timeout: 200
)
ActiveRecord::Schema.define do
create_table :table do |table|
table.column :timestamp, :string
table.column :key_1, :integer
table.column :key_2, :float
# etc.
end
end
class Table < ActiveRecord::Base
end
ssss = SimpleStatsStore::Server.new(
data_dump: data_dump,
models: { table_ref: Table },
name: 'process_name' # Optional
)
t_next = Time.new + 300
server_pid = ssss.run do
if Time.new >= t_next
# Code to be executed every 5 minutes
# ...
t_next += 300
end
end
Write data
data_dump.write(
table_ref,
{
timestamp: Time.new.to_s,
key_1: value_1,
key_2: value_2,
# etc.
}
)
Simple Stats Store is available to everyone under the terms of the MIT open source licence. Take a look at the LICENSE file in the code.
Copyright (c) 2015 BBC
FAQs
Unknown package
We found that simple_stats_store 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.