
Research
/Security News
Intercom’s npm Package Compromised in Ongoing Mini Shai-Hulud Worm Attack
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.
dustjs-onload-context
Advanced tools
dustjs-onload-context extends dustjs to support dust.onLoad callbacks which accept the current rendering context as the second
parameter. This can be useful when it's necessary to resolve templates based on state in the render context.
'use strict';
var dust = require('dustjs-linkedin'),
contextify = require('dustjs-onload-context');
var undo = contextify(dust);
dust.onLoad = function (name, context, cb) {
var str;
// context.get('foo');
// do stuff ...
cb(null, str);
};
NOTE: The
dustjs-linkedinmodule is required, but is not an explicit dependency of this module.
To enable support for the context argument, simply require dustjs-onload-context and invoke the exported function
(which will decorate dustjs). Then, you can assign a function which accepts three arguments to the onLoad dust property.
Functions assigned to onLoad which only accept 2 arguments are considered a noop and are treated the same as the
original dust onLoad API.
To revert dust back to its original functional, this module returns a function once invoked. Invoking this function will
revert dust and onLoad to their original behavior.
var contextify = require('dustjs-onload-context');
contextify(dust, [onload]); // See below for supported options
dust (Object) the dustjs module to be decorated
onload (Function, optional) Provides an alternate onLoad implementation to use instead of dust.onLoad. This could
be useful for scenarios in which one wants to intercept calls to the default onLoad behavior, modify context and
delegate to the default onLoad defined elsewhere in the application.
$ npm test
$ npm run-script cover && open coverage/lcov-report/index.html
```
FAQs
Extend dustjs onLoad to accept rendering context
We found that dustjs-onload-context 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
Compromised intercom-client@7.0.4 npm package is tied to the ongoing Mini Shai-Hulud worm attack targeting developer and CI/CD secrets.

Research
Socket detected a malicious supply chain attack on PyPI package lightning versions 2.6.2 and 2.6.3, which execute credential-stealing malware on import.

Research
A brand-squatted TanStack npm package used postinstall scripts to steal .env files and exfiltrate developer secrets to an attacker-controlled endpoint.