
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).
Get environment variables from the shell
Especially useful for Electron apps as GUI apps on macOS doesn't inherit the environment variables defined in your dotfiles (.bash_profile/.zshrc/etc).
$ npm install shell-env
import {shellEnv} from 'shell-env';
console.log(await shellEnv());
//=> {TERM_PROGRAM: 'Apple_Terminal', SHELL: '/bin/zsh', ...}
console.log(await shellEnv('/bin/bash'));
//=> {TERM_PROGRAM: 'iTerm.app', SHELL: '/bin/zsh', ...}
Note that for Bash, it reads .bash_profile
, but not .bashrc
.
Return a promise for the environment variables.
Returns the environment variables.
Type: string
Default: User default shell
Shell to read the environment variables from.
FAQs
Get environment variables from the shell
The npm package shell-env receives a total of 21,578 weekly downloads. As such, shell-env popularity was classified as popular.
We found that shell-env demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.