
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
grpc-ts-middleware
Advanced tools
A library that allows easy implementation of gRPC middleware, for both pre-call, and post-call.
npm install grpc-ts-middleware --save
import * as grpc from 'grpc';
import GrpcMiddleware, { GrpcCall } from 'grpc-ts-middleware';
import { EchoReply, EchoRequest } from './proto/echo_pb';
import { EchoManagerService } from './proto/echo_grpc_pb';
const serviceName = 'echo.EchoManager';
function doEcho(call: grpc.ServerUnaryCall<EchoRequest>, callback: grpc.sendUnaryData<EchoReply>) {
const reply = new EchoReply();
reply.setMessage(call.request.getMessage());
callback(null, reply);
}
function start(): grpc.Server {
// Create the server
const server: grpc.Server = new grpc.Server();
// Create the middleware object
const grpcMiddleware = new GrpcMiddleware(
server,
[
(call: GrpcCall) => AppLogger.logger.debug('Pre-call handler 1', call),
(call: GrpcCall) => AppLogger.logger.debug('Pre-call handler 2', call)
],
[
(error: grpc.ServiceError | null, call: GrpcCall) =>
AppLogger.logger.debug('Post-call handler 1', call, error),
(error: grpc.ServiceError | null, call: GrpcCall) =>
AppLogger.logger.debug('Post-call handler 2', call, error)
]
);
// Add gRPC services that you want the middleware to monitor
grpcMiddleware.addService(EchoManagerService, { echo: this.doEcho });
// Enable propagation of Jaeger tracing headers
grpcMiddleware.enableTracing();
// Bind and start the server
server.bind('localhost:9090', grpc.ServerCredentials.createInsecure());
server.start();
return server;
}
start();
FAQs
gRPC pre-call and post-call middleware
The npm package grpc-ts-middleware receives a total of 2 weekly downloads. As such, grpc-ts-middleware popularity was classified as not popular.
We found that grpc-ts-middleware 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.