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.
https://github.com/cho45/node-here.js
node-here.js is here-document feature for node.js.
This is implemeneted with block comment syntax.
var here = require('here').here;
var string = here(/*
foo
bar
baz
*/);
here(/* document */)
here
function returns block comment on argument as string like object.
Any characters can be escaped by backslash \
like following:
here(/*
/\* *\/
*/); //=> '/* */'
here(/* \\ */); //=> '\\'
If a here document starts with ''/*
, it is wysiwyg mode which does not translate any escape characters.
here(''/*
\foo\bar\baz
*/); //=> '\\fooo\\bar\\baz'
In this case, string */
can be apeared in here document.
here()
returns not string but String object. That is like following:
var a = here(/* foobar */);
typeof a === 'object';
a.valueOf(); //=> 'foobar'
"Hello, " + a; //=> 'Hello, foobar';
Returning String object hav unindent()
utility method which removes indent in a string.
here(/*
foo
bar
baz
*/).unindent()
is convert to following:
foo
bar
baz
FAQs
here-document on node.js
We found that here 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.