
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).
express-subapp
Advanced tools
Utility to merge locals into a sub app for inclusion in an Express app
Utility to wrap the properties from a master express app into any number of route based sub apps.
Basic usage gives the ability to set up route-based sub applications:
var express = require('express');
var subApp = require('express-subapp')(
function onCreate(app) {
// optionally, set up the main application
},
function onSubApp(subApp, app) {
// optionally, set up any other application
}
);
// make and return an app
var app = subApp.create(express());
// attach paths as normal
app.get('/path', routeHandler);
// name a context root with a required in app.
// module.exports for some-context.js should be an express app
subApp.route('/some-context', require('./routes/some-context.js'));
// alternatively don't set the root in the subApp, do it manually instead
app.use('/context', subApp.route(require('./routes/context.js')));
More commonly, you would use the following properties to name the properties to copy from the main application into the sub apps:
var subApp = require('express-subapp')(onCreate, onSubApp);
// add the names of any keys in the locals of the main application that should be added to the sub apps
subApp.locals.push('some-key', 'another-key');
// add the names of any 'app.get' properties in the main application to be set on the sub apps
subApp.merged.push('some-key', 'another-key');
MIT, use it, play with it, fork it, make pull requests at will.
FAQs
Utility to merge locals into a sub app for inclusion in an Express app
The npm package express-subapp receives a total of 0 weekly downloads. As such, express-subapp popularity was classified as not popular.
We found that express-subapp 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 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.