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.
activerecord_worm_table
Advanced tools
= activerecord_worm_table
activerecord_worm_table manages multiple backing tables for an ActiveRecord model. there is a single active table, a different working table, and one or more history tables [default 1]
inserts are done to the working table. the model's class method advance_version then makes the the active table history, the working table active, and creates a new working table with identical schema to the base table
the model's +table_name+ method is overwritten to reflect the active table, so all ActiveRecord model methods, like finders, work transparently
to use, just include ActiveRecord::WormTable into your model :
class Foo < ActiveRecord::Base include ActiveRecord::WormTable end
there are class methods to get the different table names, and manipulate the version :
the active table name is maintained as a row in an automatically created auxilliary table, [foos_switch in the case of Foo], and this is updated in a transaction
the presence of the historical tables [which are recycled] means that even though a transaction may advance_version, other transactions already in progress will continue to see the old active table_name, and selects in progress will continue to completion without rollback [ provided they don't take longer to complete than it takes to recycle all history tables ]
== Dependencies
only works with MySQL at the moment : ddl statements are too database specific, and rails' schema operations too limited, to easily make it generic. wouldn't be too hard to extend for another db tho
== Note on Patches/Pull Requests
== Copyright
Copyright (c) 2009 mccraig mccraig of the clan mccraig. See LICENSE for details.
FAQs
Unknown package
We found that activerecord_worm_table 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.