
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
@s3pweb/nestjs-common
Advanced tools
A repo containing all the common utilities for our NestJS projects:
npm i @s3pweb/nestjs-common
On a controller to protect all routes:
@Controller('v1/cats')
@IpWhitelist('0.0.0.0', '::1')
@UseGuards(IpWhitelistGuard)
export class CatsController {}
Directly on a route (with the guard on the controller):
@Post()
@IpWhitelist('192.168.1.1')
async createCat() {}
To use the LoggingModule, add it to the imports of the AppModule, and then:
@Injectable()
export class Service {
private readonly log: any;
constructor(
logger: LoggingService,
) {
this.log = logger.getLogger(Service.name);
}
}
To be able ton inject it correctly, you need a metrics module exporting a service implementing the MetricsInterface:
@Global()
@Module({
providers: [
{
provide: METRICS_SERVICE,
useClass: PromService,
},
],
controllers: [PromController],
exports: [
{
provide: METRICS_SERVICE,
useClass: PromService,
},
],
})
export class PromModule {
// -- Empty
}
To use the PromService in a Controller or a Service, you can inject it in a constructor with:
@Inject(METRICS_SERVICE) private readonly metricsService: PromService,
This interface enables you to implements the required functions for the LoggingService.
FAQs
A NestJS guard to authorise only the given IP(s)
The npm package @s3pweb/nestjs-common receives a total of 0 weekly downloads. As such, @s3pweb/nestjs-common popularity was classified as not popular.
We found that @s3pweb/nestjs-common 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.