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.
block-sequence-mongo
Advanced tools
A MongoDB implementation of block-sequence.
const BlockArray = require('block-sequence').BlockArray
const init = require('block-sequence-mongo')
const MongoClient = require('mongodb').MongoClient
// Initialise the Mongo Block Sequence Driver
init({ url: 'mongodb://localhost/sequences', client: MongoClient, options: { } }, (err, driver) => {
if (err) throw err
// Ensure the sequence exists
driver.ensure({ name: 'my-sequence' }, (err, sequence) => {
if (err) throw err
// Create a block array containing 1000 ids per block (defaults to 2 blocks)
var idGenerator = new BlockArray({ block: { sequence: sequence, driver: driver, size: 1000 } })
// Grab the next id
idGenerator.next((err, id) => {
if (err) throw err
console.log(id)
})
})
})
See https://www.npmjs.com/package/mongodb for all connection parameters
[2.0.0]
FAQs
A mongo implementation of block-sequence
The npm package block-sequence-mongo receives a total of 0 weekly downloads. As such, block-sequence-mongo popularity was classified as not popular.
We found that block-sequence-mongo 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.