
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).
0-deps async context management for Node.js
Using yarn:
yarn add conode
Using npm:
yarn add conode
Quick start
import { createContext } from 'conode';
interface RequestContext { userId: string }
const reqCtx = createContext<RequestContext>();
async function handleRequest() {
console.log(reqCtx.getContext()?.userId);
}
await reqCtx.contextualize({ userId: 'abc123' }, handleRequest);
// Logs: 'abc123'
Functional approach
import { createContext } from '../index';
const auth = createContext();
const action = () => {
const jwt = auth.getContext();
console.log(jwt);
};
auth.contextualize(jwt, action);
Class approach with decorator
import { contextualize, Contextable } from '../index';
const action = () => {
const service = Service.getContext();
console.log(service.getSomething());
};
class Service extends Contextable() {
@contextualize
async run() {
await action();
}
getSomething() {
return 'something';
}
}
const service = new Service();
service.run();
License Apache-2.0 Copyright (c) 2022-present Ivan Zakharchanka
FAQs
0-Deps, simple and fast context library for NodeJS
The npm package conode receives a total of 2,469 weekly downloads. As such, conode popularity was classified as popular.
We found that conode demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
/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.