
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@arabesque/core
Advanced tools
Functional micro-framework
Arabesque is a lightweight, modular and functional micro-framework.
Arabesque provides a minimal foundation to create applications and micro-services, consisting of three types and a function.
declare type Listener<Channel, Context> = (channel: Channel, handler: (context: Context) => Promise<Context>) => Promise<() => Promise<void>>;
The fundamental part of an Arabesque application, the Listener is passed by the application a channel, that the Listener is expected to subscribe to, and a handler, that the Listener must call whenever it receives something from the channel. The Listener must return a promise that resolves to an argument-less function that, when executed, stop the Listener.
A channel can take any imaginable form, for example:
declare type Middleware<Context> = (context: Context, next: (context: Context) => Promise<Context>) => Promise<Context>;
The operational part of an Arabesque application, the Middleware is passed by the application a context, coming from either the Listener or a previous Middleware, and a next function, that the Middleware may call with a Context to execute the next Middleware, if any.
declare type Application<Channel> = (channel: Channel) => Promise<() => Promise<void>>;
The Arabesque Application itself that, when executed, returns a Promise that resolves to an argument-less function that, when executed, stop the Application.
import {Middleware} from "./index";
declare const createApplication: <Channel, Context>(
listen: Listener<Channel, Context>,
middleware: Middleware<Context>
) => Application<Channel, Context>;
The factory that creates an Arabesque Application from a Listener and a Middleware.
import type {Listener} from "@arabesque/core";
import {createApplication} from "@arabesque/core";
const listener: Listener<string, string> = (channel, handler) => {
return handler(channel).then(() => {
return () => Promise.resolve();
});
};
const start = createApplication(listener, (context, next) => {
console.log(`I am the middleware and I received ${context}`);
return next(context);
});
return start('foo').then((stop) => {
return stop();
});
FAQs
A nano-framework to build applications
We found that @arabesque/core demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.