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.
@homeofthings/nestjs-utils
Advanced tools
HomeOfThings - NestJs Utils: various utilities and common types
npm install @homeofthings/nestjs-utils
export const MY_MODULE_OPTIONS_TOKEN = 'MY_MODULE_OPTIONS_TOKEN';
export interface MyModuleOptions {
....
}
@Module({
providers: [MyService],
exports: [MyService],
})
export class MyModule extends createDynamicRootModule<MyModule, MyModuleOptions>(MY_MODULE_OPTIONS_TOKEN) {
}
NOTE: additional module properties for 'imports', 'exports', 'providers' or 'controllers' can be passed as second parameter to this function
NOTE: of course the module can also be global scoped by the @Global() decorator
const myModuleOptions: MyModuleOptions = {
...
}
@Module({
imports: [MyModule.forRoot(MyModule, myModuleOptions)],
})
export class AppModule {}
const myAsyncModuleOptions: AsyncModuleOptions<MyModuleOptions> = {
...
}
@Module({
imports: [MyModule.forRootAsync(MyModule, myAsyncModuleOptions)],
})
export class AppModule {}
NOTE: forRoot/forRootAsync throws if the module is already registered. You can call register/registerAsync if you really want to register it more than once
@Module({
imports: [MyModule.forChild()],
})
export class ChildModule {}
NOTE: no need to do this if the module is global scoped
forRoot
or forRootAsync
register
or registerAsync
(e.g. providing multiple connections)class LruCache<T>
- LRU cacheclass AsyncContext<T>
- wrapper for AsyncLocalStorage
function writeFileIfChanged(outputPath: string, content: string): Promise<boolean>
- write a file if provided content is different to exiting contentFAQs
HomeOfThings - NestJs Utils: various utilities and common types
The npm package @homeofthings/nestjs-utils receives a total of 7 weekly downloads. As such, @homeofthings/nestjs-utils popularity was classified as not popular.
We found that @homeofthings/nestjs-utils demonstrated a healthy version release cadence and project activity because the last version was released less than 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
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.