Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@aws-sdk/abort-controller
Advanced tools
The @aws-sdk/abort-controller npm package provides a mechanism to abort one or more Web requests before they have completed. It is primarily used to enhance the management of API requests, particularly in environments where network requests can hang or need to be manually terminated to manage resources effectively.
Abort HTTP requests
This code sample demonstrates how to use the AbortController to abort an HTTP fetch request. The 'signal' is passed to the fetch request, and the request can be aborted by calling 'controller.abort()'.
const { AbortController } = require('@aws-sdk/abort-controller');
const controller = new AbortController();
const signal = controller.signal;
fetch('https://api.example.com/data', { signal })
.then(response => response.json())
.catch(err => {
if (err.name === 'AbortError') {
console.log('Fetch aborted');
} else {
console.error('Fetch error:', err);
}
});
// Abort the request
controller.abort();
The 'abort-controller' package provides a similar functionality to @aws-sdk/abort-controller by implementing the AbortController interface to abort fetch requests. It is widely used for managing fetch-based network requests and is compatible with the standard web API, making it a direct alternative.
The 'node-abort-controller' package is another alternative that implements the AbortController API for Node.js environments. It allows developers to abort asynchronous tasks and HTTP requests. It is similar to @aws-sdk/abort-controller but is specifically tailored for Node.js, unlike the more general-purpose @aws-sdk/abort-controller which is designed with AWS SDK integrations in mind.
3.374.0 (2023-07-20)
FAQs
A simple abort controller library
The npm package @aws-sdk/abort-controller receives a total of 2,548,586 weekly downloads. As such, @aws-sdk/abort-controller popularity was classified as popular.
We found that @aws-sdk/abort-controller demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.