
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
caught-exception
Advanced tools
import { Catch, HttpException, Injectable } from '@nestjs/common';
import { HttpExceptionFilter } from 'caught-exception';
import dataDogTracer from './config/datadog/tracer';
@Injectable()
@Catch(HttpException)
export class HttpExceptionFilterInject extends HttpExceptionFilter {
dataDogTracer = dataDogTracer;
}
require('./config/datadog/tracer');
import { HttpExceptionFilterInject } from './src/config/caught-exception/caught-exception.filter.ts';
async function bootstrap() {
// const app = await NestFactory.create(RootModule, {
app.useGlobalFilters(new HttpExceptionFilterInject());
// ...
}
import tracer from 'dd-trace';
const dataDogTracer = tracer.init();
export default dataDogTracer;
import axios from 'axios';
import dataDogTracer from './src/config/datadog/tracer';
require('caught-exception/dist/common/api/http-request-global.axios')({
axios,
dataDogTracer,
});
import { HttpExceptionFilterInject } from './caught-exception';
import { APP_FILTER } from '@nestjs/core';
@Module({
// imports: [],
// controllers: [],
providers: [
{
provide: APP_FILTER,
useClass: HttpExceptionFilterInject,
},
],
});
import { LoggerMiddlewareToModule } from './caught-exception';
// replace this:
// export class RootModule {};
// to:
export class RootModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer.apply(LoggerMiddlewareToModule).forRoutes('*');
}
}
DD_LOGS_CONFIG_CONTAINER_COLLECT_ALL= true
DD_LOGS_ENABLED= true
DD_LOGS_INJECTION= true
DD_PROCESS_CONFIG_ENABLED= true
DD_PROFILING_ENABLE= true
DD_TRACE_ANALYTICS_ENABLED= false
DD_TRACE_ENABLED= true
DD_TRACE_HEADER_TAGS= Host:origin,Referer:referer,x-forwarded-for:x-forwarded-for
DD_VERSION= 4.14.0
// intercept
CATCH_EXCEPTION_TRACE_ROUTES_RULES= { "intercept": { } }
// Intercept: /auth/login
// Don't exclude: /path/document/example
CATCH_EXCEPTION_TRACE_ROUTES_RULES= { "intercept": { "include": ["login"], "exclude": ["document"] } }
// Axios intercept prod
CATCH_EXCEPTION_TRACE_ROUTES_RULES= { "intercept": { "production": true } }
FAQs
Error handler and http status code and validate request
The npm package caught-exception receives a total of 36 weekly downloads. As such, caught-exception popularity was classified as not popular.
We found that caught-exception 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
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.