
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).
Capture, cache, and replay HTTP queries in your tests using Nock.
__http__/
.__http__/
and used instead of real queries.Snapsnap behaves similarly to Jest Snapshots. If an HTTP query has not been snapshotted, a real HTTP query will be made. Otherwise, a cached version of the query will be returned.
To signal that a test should be snapshotted, simply use it.snap()
instead of it()
. The framework will manage the rest.
it.snap(
'should query the API',
async () => {
const result = await request('https://postman-echo.com/get?foo1=bar1&foo2=bar2');
const json = await result.json();
expect(json).toMatchSnapshot();
}
);
Supports Jest with Circus (=default) test runner.
Snapsnap is implemented as a test environment that extends Jest's built-in NodeEnvironment
.
// ./jest.config.js
module.exports = {
testEnvironment: 'snapsnap/jest-env.js'
};
Based on Jest Nock Back and Jest Nock.
FAQs
Tools for snapshotting, replaying, and mocking HTTP queries with Jest
The npm package snapsnap receives a total of 277 weekly downloads. As such, snapsnap popularity was classified as not popular.
We found that snapsnap 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.