
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
jsonschemer
Advanced tools
Automatically guesstimate a JSON Schema from the contents of a MongoDB collection
Automatically guesstimate a JSON Schema from the contents of a MongoDB collection
npm install jsonschemer
jsonschemer [options] <db connection string> <collection>
Valid options are:
-q, --query, filter the documents to analyze using the specified JSON query.-l, --limit, limit the number of documents to analyze.-m, --maxEnum, limit the number of possible enum values. When encountering a string
type, the tool assume its possible values are fixed and starts adding each encountered
value to an enum clause in the schema. If more than maxEnum different values are found,
the enum is dropped from the schema.jsonschemer -q '{ "surname":"Smith" }' mongodb://10.0.0.1:27017/my_db users
The exports of the library are a single function, accepting an options object and returning a promise resolved to the resulting JSON Schema.
Options can have the following properties:
db, required, a MongoDB database object (as returned by MongoClient.connect) or a
connection URI string.collection, require, the MongoDB collection to query.q, optional, a query to filter the documents in the collection.limit, optional, maximum number of documents to analyze.maxEnum, optional, default 20, maximum number of items in a schema enum.var schemer = require('jsonschemer');
schemer({
db: 'mongodb://10.0.0.1:27017/my_db'
collection: 'users',
maxEnum: 20,
q: { surname: 'Smith' }
}).then(function(schema) {
console.log(JSON.stringify(schema, null, 2));
});
FAQs
Automatically guesstimate a JSON Schema from the contents of a MongoDB collection
The npm package jsonschemer receives a total of 2 weekly downloads. As such, jsonschemer popularity was classified as not popular.
We found that jsonschemer 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.

Research
A malicious package uses a QR code as steganography in an innovative technique.

Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.