
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.
Simple and lightweight dependency injection for Node TypeScript.
npm install --save tsnode-di
import { Injector } from 'tsnode-di';
import { Injectable } from 'tsnode-di';
@Injectable()
class ProviderClass {
private aId: number;
constructor() {
this.aId = Math.ceil(Math.random() * 100000);
}
public get id(): number {
return this.aId;
}
}
@Injectable()
class ConsumerClass1 {
// using constructor DI to resolve Provider class
constructor(public provider: ProviderClass) { }
public get provider():ProviderClass {
return this.provider;
}
}
@Injectable()
class ConsumerClass2 {
// using @Resolve decorator to resolve ProviderClass
@Resolve(ProviderClass)
public provider: ProviderClass;
constructor() { }
public get provider():ProviderClass {
return this.provider;
}
}
// use Injector to resolve the consumer classes
const obj1 = Injector.resolve<ConsumerClass1>(ConsumerClass1);
const obj2 = Injector.resolve<ConsumerClass2>(ConsumerClass2);
// the following statement will not throw, because
// DI will provide the same instance of ProviderClass
// to both ConsumerClass1 and ConsumerClass2!
if(obj1.provider.id !== obj2.provider.id)
throw new Error("DI Failed!");
FAQs
Simple and lightweight dependency injection for Node TypeScript.
We found that tsnode-di 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.