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.
Clones a function (creates wrapper function), with the same signature as source function
Clones a function (creates wrapper function), with the same signature as source function
compression | size |
---|---|
fulcon.js | 1.03 kB |
fulcon.min.js | 686 B |
fulcon.min.js.gz | 386 B |
$ npm install --save fulcon
var fulcon = require('fulcon');
function original(a, b, c)
{
return 42 + a + b + c;
}
assert.strictEqual(original.length, 3, 'signature of the original function has 3 arguments');
assert.strictEqual(original(1, 2, 3), 48, 'original function returns 48');
var cloned = fulcon(original);
assert.notStrictEqual(original, cloned, 'original and cloned functions are not the same function');
assert.strictEqual(cloned.length, 3, 'signature of the cloned function has 3 arguments');
assert.strictEqual(cloned(1, 2, 3), 48, 'cloned function returns 48');
Note: Beware of functions with side-effects! Cloned function calls original function under the hood, so it has same side-effects for better or for worst. Check test.js for details.
More examples can be found in test.js.
Or open an issue with questions and/or suggestions.
Fulcon is released under the MIT license.
FAQs
Clones a function (creates wrapper function), with the same signature as source function
The npm package fulcon receives a total of 40,149 weekly downloads. As such, fulcon popularity was classified as popular.
We found that fulcon 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
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.