
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
@edirect/lock
Advanced tools
The EDirectInsure Distributed Lock module.
$ npm i --save @edirect/lock
Import and register LockModule on AppModule (app.module.ts):
import { ConfigService } from '@edirect/config';
...
imports: [
LockModule.registerAsync({
imports: [ConfigModule],
useFactory: async (configService: ConfigService) => ({
lockOwner: configService.get(Variables.NAMESPACE),
redis: {
host: configService.get(Variables.REDIS_HOST),
password: configService.get(Variables.REDIS_PASS),
port: +configService.get(Variables.REDIS_PORT),
},
}),
inject: [ConfigService],
}),
...
]
Use the public methods in the code, where applicable:
/**
* Timed Lock
*/
public lock(key: string, callback: (unlock: () => void) => void, ttl?: number): void
/**
* Redis Values
*/
public set(key: string, value: string, override = false): Promise<void>
public get(key: string): Promise<string>
public del(key: string): Promise<void>
/**
* Distributed Lock
*/
public async getLockOwner(): Promise<string>
public async setLockOwner(): Promise<string>
public async removeLockOwner(): Promise<void>
public async isLockOwner(): Promise<boolean>
For example, the usage of the Distributed Lock:
if (await this.lockService.isLockOwner()) {
// Logic that should run on only one cluster
}
And for the Timed Lock:
this.lockService.lock('locked-task-name', async (unlock) => {
// Logic that should be executed in exclusivity, across all instances
unlock();
});
FAQs
The EDirectInsure Distributed Lock module.
We found that @edirect/lock 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 researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.