
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).
Environment variable middleware for the middy framework
npm install middy-env
The specified environment variables will be parsed and passed into the handler.
cache
(boolean) (optional): Set it to true
to skip further lookups of environment variables. Defaults to false
.cacheExpiryInMillis
(int) (optional): Time in milliseconds for values to remain cached. Defaults to undefined
.setToContext
(boolean) (optional): This will assign the parsed values to the context
object
of the function handler rather than to process.env
. Defaults to true
.names
(object) (required): Map of environment variables to parse, where the key is the destination.['KEY', 'string', 'fallbackValue']
.By default parameters are assigned to the function handler's context
object. They can instead be assigned to the Node.js process.env
object by setting the setToContext
flag to false
.
If no fallback value is provided a ReferenceError will be thrown if an environment variable is undefined.
string
int
float
bool
const middy = require('middy');
const env = require('middy-env');
const handler = (event, context, callback) => {
callback(null, `Hello ${context.firstName} ${context.lastName}`);
};
module.exports = middy(handler)
.use(env({
names: {
firstName: ['FIRST_NAME', 'string', 'World'],
lastName: 'LAST_NAME'
},
cache: true,
cacheExpiryInMillis: 3600000
}));
2.0.0 (2021-09-09)
FAQs
Environment variable middleware for the middy framework
The npm package middy-env receives a total of 0 weekly downloads. As such, middy-env popularity was classified as not popular.
We found that middy-env 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.