
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).
A typed environment variable parser with support for choices, custom parsers, and more.
import { createEnv } from 'typed-env';
const env = createEnv({
PORT: { type: 'number', default: 80 }
});
env.PORT; // number
import { createEnv } from 'typed-env';
const env = createEnv({
NODE_ENV: {
type: 'string',
choices: ['development', 'production']
}
});
env.NODE_ENV; // 'development' | 'production'
You can pass a parser
function to return your own custom type
import { createEnv } from 'typed-env';
const env = createEnv({
HOMEPAGE: { parser: url => new URL(url) }
});
env.HOMEPAGE; // URL
If you want to use a custom env, pass env
in the options
parameter, otherwise it will load from process.env
interface Options {
env?: Record<string, string> | NodeJS.ProcessEnv;
}
#198
#188
#150
#127
#6
#2
3f77290
tsup
, update project structure 900d538
a04525a
efb61b8
6ab981d
ee457e0
60cf251
efa73c1
28ae0d9
bc4ae9d
3a16a65
9756cf6
e24b2e3
31f292e
e878608
5d38561
neon-env
a94cac4
config
to createEnv
, add tests 8d947bf
2e1f38a
436c611
9d497a6
a655f80
sideEffects
field 26e7da4
823f07b
FAQs
Typed environment variable parser
We found that typed-env demonstrated a healthy version release cadence and project activity because the last version was released less than 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.