
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
@meetup/fetch-request
Advanced tools
fetch-request
is a library that provides a simple way to perform HTTPS requests in your lambda.
This library comes with AWS XRay integration and tracing out of the box (our very own lambda-xray
package!) and
follows an async/await
pattern that we've been using in all our lambdas. We found ourselves copy-pasting a lot
of our code between repos, so we decided to centralize our best practice patterns.
npm install @meetup/fetch-request
import httpsHelper from '@meetup/fetch-request';
const callMyApi = async (): Promise<string> => {
const requestOpts = {
host: 'fun-api.com',
path: '/my-favorite-food?myname=juanbi',
method: 'GET',
};
const response: string = await httpsHelper.fetchRequest<string>(requestOpts);
return response;
};
You can also specify a payload and your own response/error handlers!
import httpsHelper from '@meetup/fetch-request';
const httpResponseHandler = <T>(
response: import('http').IncomingMessage,
buffer: string,
payload: string,
resolve: (data: T) => void,
reject: (error: RequestError) => void,
): void => {
if (response.statusCode && response.statusCode === 200) {
// Do something with this response!
const parsedBuffer = JSON.parse(buffer);
resolve(parsedBuffer);
} else {
// Do something else with error!
console.error('Error!');
reject({ message: 'Serious error..', error: "I'm not kidding", statusCode: 500 });
}
};
const callMyApi = async (): Promise<string> => {
const requestOpts = {
host: 'fun-api.com',
path: '/my-favorite-food?myname=juanbi',
method: 'GET',
};
const response: string = await httpsHelper.fetchRequest(requestOpts, 'IMPORTANT-PAYLOAD', httpResponseHandler);
return response;
};
We use the Node https
library behind the scenes, so check their documentation out for information on what types of options and requests you can make: https://nodejs.org/api/https.html
Made with :heart: by Comms Tools squad
FAQs
HTTP Request Helpers
The npm package @meetup/fetch-request receives a total of 0 weekly downloads. As such, @meetup/fetch-request popularity was classified as not popular.
We found that @meetup/fetch-request 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.