Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
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 10 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 malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.