
Research
/Security News
Intercom’s npm Package Compromised in Ongoing Mini Shai-Hulud Worm Attack
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.
@essent/serverless-request-handler
Advanced tools
A request handler that uses class-transformer and class-validator to create a type-safe serverless handler!
A request handler that uses class-transformer and class-validator to create a type-safe serverless handler
Serverless request handler is a micro-framework that's here to make your life easier. You give it an options object with what you expect the request to look like; and it does the object request transformation, request validation, response validation and error handdling.
A typical handler will look like this.
class CreateUserDto {
@IsEmail()
userName: string;
@IsString()
@MinLength(7)
password: string;
}
class UserPathParams {
@IsNumber()
userId: number;
}
const options = {
body: {
classType: CreateUserDto
},
pathParameters: {
classType: UserPathParams
}
};
const createUser = handler(options, async (event) => {
return Result.Ok(201, userService.create(event.pathParameters.userId, event.body));
});
Install module:
npm install serverless-request-handler --save
reflect-metadata shim is required, install it too:
npm install reflect-metadata --save
and make sure to import it in a global place, like server.ts:
import "reflect-metadata";
class-validator and class-transfrormer are required peer dependencies
npm install class-validator class-transfrormer --save
ES6 features are used, if you are using old version of node.js you may need to install es6-shim:
npm install es6-shim --save
and import it in a global place like app.ts:
import "es6-shim";
FAQs
A request handler that uses class-transformer and class-validator to create a type-safe serverless handler!
The npm package @essent/serverless-request-handler receives a total of 15 weekly downloads. As such, @essent/serverless-request-handler popularity was classified as not popular.
We found that @essent/serverless-request-handler demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 70 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
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.

Research
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.