
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).
mocks-server-lite
Advanced tools
Credit: This is heavily inspired by mocks-server and takes some of the main concepts from it. It is massively simplified though, currently with only the core functionality as well as being TypeScript first. I created this because the mocks-server
project doesnt currently seem to be very active and doesnt come with types and a few other features I think is key, which are listed below.
Node.js mock server that can run live, interactive mocks in place of real APIs. It allows you to define many different responses for a same route, so you can change the whole mocked API behavior by simply changing the response of one or many routes while the server is running. This really helps with local FrontEnd development when the BackEnd isnt ready/available and also really good for automated test runs where you want to change how the backing server behaves whilst it is still running.
No advantages per se but different in the fact youre actually calling a mocked server served at a URL rather than the request being intercepted at any level in code. Also different in that I don't see this as a mocking tool to use with jest
or vitest
, more to use with local development (if a BackEnd isnt ready/available) or supporting an E2E test run (using tools like cypress
or playwright
) where you dont want it hit a real BackEnd.
https://github.com/burt202/mocks-server-lite-example
mocks/
, with the mock server being created in mocks/server.ts
setMockCollection
which in turn calls POST /__set-collection
with a new collection nameFAQs
Mocking server supporting multiple route variants and mocks
We found that mocks-server-lite 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.