
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).
env-restorer
Advanced tools
Utility that snapshots the environment variables from process.env
and can restore
them on demand. Initially developed for testing vandium.
Install via npm.
npm install env-restorer
A snapshot of the environment variables is created automatically when the library is loaded.
const envRestorer = require( 'env-restorer' );
// change environment variables
process.env.MY_SPECIAL_VALUE = '42';
envRestorer.restore();
// restore environment variables back to initial state (MY_SPECIAL_VALUE will no longer exist)
To create another snapshot of the environment variables state, simply call snapshot()
:
const envRestorer = require( 'env-restorer' );
// change environment variables
process.env.MY_SPECIAL_VALUE = '42';
const snapshot = envRestorer.snapshot();
// change environment variables
process.env.MY_SPECIAL_VALUE = '43';
snapshot.restore();
// process.env.MY_SPECIAL_VALUE will now equal '42'
envRestorer.restore();
// restore environment variables back to initial state (MY_SPECIAL_VALUE will no longer exist)
We'd love to get feedback on how to make this tool better. Feel free to contact us at feedback@vandium.io
FAQs
Automatically snapshots and restores environment variables
We found that env-restorer 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.