Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
aws-lambda-helper
Advanced tools
Collection of helper methods for lambda
$ npm install aws-lambda-helper --save
const helper = require('aws-lambda-helper');
Function to get environment from context object
Example:
const context = {
invokedFunctionArn: 'arn:123:abs:prod'
};
var env = helper.getEnvironment(context); // 'prod';
In case of incorrect context or misconfigured function ARN it will return null
.
Function to validate input data with defined schema
import payloadSchema from '../schemas/validationSchema';
const data = {
a: 1,
b: 'Hello World'
};
var result = helper.validateWithSchema(data, payloadSchema); // true
In case of validation error it will throw an error, so for safest coding practices use try/catch
statements.
try {
helper.validateWithSchema(data, payloadSchema);
} catch (error) {
// handle an error
}
FAQs
Collection of helper methods for lambda
The npm package aws-lambda-helper receives a total of 1 weekly downloads. As such, aws-lambda-helper popularity was classified as not popular.
We found that aws-lambda-helper demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 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
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.