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.
mongoose-revisionist
Advanced tools
Creates Mongo's oplog-like records for Mongoose operations.
Use npm
: npm install mongoose-revisionist
Each creation, update or removal will create a Revisionist record with appropriate versioning information. This allows for easy tracking of changes to records through time as well as providing an auditing mechanism.
The Mongoose plugin adds a handful of fields to the schema if they do not exist already:
Date
- when the document was last modified.String
- who/what last modified the document.Date
- when the document was created.String
- who/what created the document.Number
- the revision of the document, autoincremented every save.The plugin will also add a collection of revisions that are close to (but not quite exactly) oplog records:
Date
- the timestamp of the operation, defaults to Date.now
.Number
- the Mongoose-internal version of the document.String
- the operation type.Mixed
- depends on operation:
_$set
, ID inclusive._$set
for changes and additions, _$unset
for removals, ID exclusive.Mixed
- depends on operation:
Use as you would any Mongoose plugin:
var mongoose = require('mongoose'),
Revisionist = require('mongoose-revisionist'),
schema = new mongoose.Schema({ ... });
schema.plugin(Revisionist.plugin);
If more help is needed, have a look in tests/models.
The Revisionist plugin also takes an options hash using the plugin syntax:
schema.plugin(Revisionist.plugin, options);
Revisionist
.0.1.0
Initial release.
FAQs
Oplog-like tracking for mongoose
The npm package mongoose-revisionist receives a total of 0 weekly downloads. As such, mongoose-revisionist popularity was classified as not popular.
We found that mongoose-revisionist 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.