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.
(piggy-back)
Any pure function in the form (...args) => Promise
, can be passed to deduper
and subsequent
requests with the same arguments will wait for the result of the first one that arrived.
This is meant to prevent unnecessary http or database requests.
npm install
/**
* @param keyFn function that generates key for the internal cache, receives same params as the deduped function
* @param fn function whose invocation is being deduplicated
* @param options { timeout } - timeout in ms after which the task fails, default is 10s
* @returns promise (same as the fn)
*/
import { deduper } from 'pback';
// an expensive async task that'll be repeated
const getUser = (userId: number) => {
return fetch(`/api/user/${userId.toString()}`)
};
const dedGetUser = deduper(id => id, getUser, {
timeout: 1000,
});
// Consecutive requests will make only 2 fetches (as long as they arrive)
getUser(1);
// later
getUser(2);
// ...
getUser(2);
// ...
getUser(1);
// ...
getUser(1);
FAQs
_(piggy-back)_
The npm package pback receives a total of 0 weekly downloads. As such, pback popularity was classified as not popular.
We found that pback 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
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.