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.
Clerobee - a featureful UID generator
======== clerobee is a very handy utility library allowing to generate UIDs considering actual time, network resources and process in a distributed environment.
Following use cases are supported:
Normal UIDs: Identifiers for general usage with length between 4 and 256. Can be used as cryptographic keys, user IDs, session keys, etc.
Derived UIDs: To express ownership-like relations between identifiers.
If you have to identify devices and be able to link them to a user with verify the ownership against the userID, then simply generate a UID for the user and generate derived UIDs for the devices.
Therethrough the ownership of the device where for example a REST request is coming, can be verified.
Sourced UIDs: Using a JS object data as source for the generation process.
For example to generate product/license keys based on user information and to check if they can be matched while a possible registration process later on.
var Cerobee = require('clerobee');
// optional default length for the IDS is passed.
// 16 would be used if nothing is given.
var cerobee = new Cerobee( 128 );
...
// generate a normal UID with length of 128
var nID = cerobee.generate();
// generate a normal UID with length of 16
var nID_2 = cerobee.generate( 16 );
...
// Generates derived UID using the 'nID' as basis.
// Its length will be the same: 128
var sID = cerobee.generate( nID );
// Tests if 'sID' is really derived from 'nID'.
// Test will fail will any other UIDs but 'sID'
var test_1 = cerobee.isDerived( nID, sID );
...
// Creates user data
var customer = { email:'test@provider.org' };
// Generates Sourced UID based on customer data with length of 128
var pID = cerobee.generate( customer, 128 );
// Tests if the given sourced UID relly carries the given user data.
// Test will fail with any other pair of user data and UID but this
var test_2 = cerobee.isSourced( reference, 128, pID );
And that's it!
FAQs
A featureful dependency-free UID generator
The npm package clerobee receives a total of 209 weekly downloads. As such, clerobee popularity was classified as not popular.
We found that clerobee demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.