
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@opens/express
Advanced tools
Este pacote encapsula as funcionalidades de um serviço http (express) e oferece novas funcionalidades, para executar funções antes ou depois da função principal
Este serviço consome mensagens da fila audit.log
no RabbitMQ. Cada mensagem deve conter um JSON com a seguinte estrutura:
// Exemplo de uso
import express, { Application } from 'express';
import { Application, ExpressWrapper, HttpRequest } from "@opens/express"
const api = new ExpressWrapper(); // Export uma instancia do express
const app = api.getApp();
// Funções para serem executadas antes ou depois
const logBefore = ({ req }: HttpRequest) => {
console.log(`Antes da chamada`);
};
const logAfter = ({ req }: HttpRequest) => {
console.log(`Depois da chamada`);
};
// Função principal para ser executada
const handler = ({ req }: HttpRequest) => {
return req.body;
};
// Criando uma rota com handlers antes e depois
api.addRoute({
method: 'get',
path: '/teste',
handler: handler,
hooks: {
after: [logAfter],
before: [logBefore],
},
});
// Integrando ao app Express
app.use('/api', api.getRouter());
api.start(3000);
Baixe o pacote:
npm i @opens/http_server
Importe o pacote no local escolhido e utilize como no exemplo a cima
FAQs
Http Server Package
The npm package @opens/express receives a total of 1 weekly downloads. As such, @opens/express popularity was classified as not popular.
We found that @opens/express demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 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
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.